[Tutor] Py2exe Help (fwd)

Tom Jenkins tjenkins@devis.com
06 Dec 2001 08:41:35 -0500


Hi Cow,

[snip]

> ---------- Forwarded message ----------
> Date: Wed, 5 Dec 2001 16:34:13 -0800 (PST)
> From: Cow <cow@esweeet.com>
> To: Danny Yoo <dyoo@hkn.eecs.berkeley.edu>
> Subject: Re: [Tutor] Py2exe Help
> 
> First off, i have a file called 'a.py', the file i want to compile into a .exe file.  Next, i make a file called 'cow.py'.  'cow.py' is to be the setup file.  I put the following code into it (cow.py):
> 
[snip]

> i go into dos, type 'CD Python22' to get to the folder with all of the files in it and type the following command to run cow.py:
> 
> python cow.py py2exe
> 
> it should work and next convert 'a.py' into an executable file, but instead i get the following error:
> 
> C:\PYTHON22>python cow.py py2exe
> usage: cow.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
>    or: cow.py --help [cmd1 cmd2 ...]
>    or: cow.py --help-commands
>    or: cow.py cmd --help
> 
> error: invalid command 'py2exe' (no module named 'distutils.command.py2exe')
> 
> does anyone know what i can do to get my setup program working?
> 
> Thanks a lot
> -Ryan
> 

I believe you have the parameters reversed.  Try:
python py2exe cow.py

this tells python to run py2exe.py and pass cow.py to py2exe as a
parameter.
 
-- 

Tom Jenkins
Development InfoStructure
http://www.devis.com