Question about the article "py2exe compiler" in Python Cookbook by Alexander Semenov

D

Daniel Mark

Hello all:

I follow the following tutorial

http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/108598
Description:
script for making executables with py2exe
##############
from distutils.core import setup
import sys, os, py2exe

name = sys.argv[1]
sys.argv[1] = 'py2exe'
sys.path.append(os.path.dirname(os.path.abspath(name)))

setup(name=name[:-3], scripts=[name])
##############

However, I can not get the expected results.

1> save the above script as file makexe.py under the folder
C:\Program Files\Python24\Tools\Scripts

2> add this path to system path

3> C:\> makexe.py myscript.py

What I got from the "dist" folder are as follows:
C:\dist\unicodedata.pyd
C:\dist\w9xpopen.exe
C:\dist\zlib.pyd
C:\dist\bz2.pyd
C:\dist\library.zip
C:\dist\MSVCR71.dll
C:\dist\python24.dll

Suppose I should get an executable file under this folder.

What should I do to solve this problem?


Thank you
-Daniel
 
T

Thomas Heller

Daniel said:
Hello all:

I follow the following tutorial

http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/108598
Description:
script for making executables with py2exe
##############
from distutils.core import setup
import sys, os, py2exe

name = sys.argv[1]
sys.argv[1] = 'py2exe'
sys.path.append(os.path.dirname(os.path.abspath(name)))

setup(name=name[:-3], scripts=[name])
##############

However, I can not get the expected results.

Someone should correct this recipe. In newer py2exe-versions,
you have to use 'console=[name]' in the above script.

Thomas
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top