Care to share what unexpected behavior you are observing?
Well, I'm not exactly sure of where to put the test.py file. If I put it on the desktop and then just run command prompt, it says python is not recognized. This makes sense since python is not saved on the desktop :p
So I tried moving my test.py file to the python directory, and then changing the command prompt directory to that. When I do this I get:
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
C:\Documents and Settings\James>cd C:\python26
C:\Python26\lib\site-packages\py2exe\build_exe.py:16: DeprecationWarning: the se
ts module is deprecated
usage: test.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: test.py --help [cmd1 cmd2 ...]
or: test.py --help-commands
or: test.py cmd --help
error: no commands supplied
And I'm not really sure what to do with that.
Py2exe scripts are usually run like this:
python [script] py2exe
so yours would become:
python test.py py2exe
A tip on running scripts from the command line:
Add C:\Python26 to your PATH environment variable (see http://www.computerhope.com/issues/ch000549.htm).
Now the python command is available from any directory (you have to re-open command prompt first), so instead of littering your python directory with your scripts, you can just navigate to the directory that your script is in and in command prompt do
python script.py .
Better yet (I know this works on Vista and 7; not sure about XP), if python is registered to handle .py files (the installer sets this), you can just navigate to the script directory and do
script.py and windows would load it into python for you.