I'm trying to create an executable from a .py file, and if I do things exactly as the py2exe tutorial says, it works. I put
setup(console=["thingyIdLikeToDo.py"]) in my setup.py file, then type
python setup.py py2exe into my console, and it works.
BUT. This means that whenever I want to make another python file into an executable, I have to go open and edit setup.py. And I'd rather do something else:
from distutils.core import setup
from sys import argv
##This was originally setup(console=["MyTargetFile.py"]) and it DOES work that way
And then type in
python setup.py MyTargetFile.py py2exe. On account of it being
invalid command name 'MyTargetFile.py'
I've also tried it by changing the order, making it
python setup.py py2exe MyTargetFile.py and changing the
argv. I get the exact same error message.
I mean, I DO have a functioning way to make my .py files into .exe files, but I'm really annoyed that something that seems like it ought to be such a simple change is't working. What am I missing here?