Calling py2exe from another module?

Alexander Skwar lists.ASkwar at email-server.info
Wed Mar 12 11:36:47 CET 2003


Hello!

I'd like to create Windows executables for my application with
py2exe.  This works very fine, when I call "setup.py py2exe" from a
command line.

Now I'd like to call py2exe from a wrapper module, because besides
creating the EXE, I'd like to some other things as well.

Well, that's where I'm stuck.

I tried to import the setup module but I don't know what to do
next.  I also tried to instantiate a object of the class 
py2exe.build_exe.py2exe which I passed this parameter:

setup(
        name='XboxIfy', 
        scripts=['XboxIfy.py'], 
        description='Rename files in such a way, that they can be transferred to Xbox', 
        data_files=[('.',((glob.glob('*.gif') + glob.glob('*.ico')) + glob.glob('*.txt')))]
    )

But when I call my script which should call py2exe, I get the 
following "error":

usage: MakeEXE.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
   or: MakeEXE.py --help [cmd1 cmd2 ...]
   or: MakeEXE.py --help-commands
   or: MakeEXE.py cmd --help

error: no commands supplied

I suppose, I forgot to do something.

So, how do I call py2exe from within another module?

Thanks a lot,

Alexander Skwar
-- 
                       Uptime: 3 days 19 hours 11 minutes





More information about the Python-list mailing list