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

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Daniel Mark

    #1

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

    Hello all:

    I follow the following tutorial


    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.dirnam e(os.path.abspa th(name)))

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

    However, I can not get the expected results.

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

    2add this path to system path

    3C:\makexe.py myscript.py

    What I got from the "dist" folder are as follows:
    C:\dist\unicode data.pyd
    C:\dist\w9xpope n.exe
    C:\dist\zlib.py d
    C:\dist\bz2.pyd
    C:\dist\library .zip
    C:\dist\MSVCR71 .dll
    C:\dist\python2 4.dll

    Suppose I should get an executable file under this folder.

    What should I do to solve this problem?


    Thank you
    -Daniel

  • Thomas Heller

    #2
    Re: Question about the article "py2exe compiler" in Python Cookbookby Alexander Semenov

    Daniel Mark schrieb:
    Hello all:
    >
    I follow the following tutorial
    >

    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.dirnam e(os.path.abspa th(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

    Comment

    Working...