From: Larry B. <lar...@we...> - 2006-04-08 17:54:26
|
Podi wrote: > I followed the instructions from > http://starship.python.net/crew/theller/moin.cgi/SingleFileExecutable > > Copied the second setup.nsi, setup.py, single.py and everything works like a > champ. > > I then replaced "single.exe" by "hello.exe" in setup.nsi. Created hello.py as > follows: > > #! python > def main(): > print 'Hello world' > > if __name__ == '__main__': > main() > #End of file > > And changed setup.py as follows: > > #! python > from distutils.core import setup > import py2exe > sys.argv.append('py2exe') > > setup( console=["hello.py"] ) > # End of file > > > After running python setup.py, dist\hello.exe was created and it runs fine > ("Hello world" printed on the console). > > Compiled setup.nsi, and hello.exe was created in current directory. However, > when executed, nothing was printed. > > I might just missed something obvious. Can anyone help me? > > Thanks very much, > P > > > > ------------------------------------------------------- > This SF.Net email is sponsored by xPML, a groundbreaking scripting language > that extends applications into web and mobile media. Attend the live webcast > and join the prime developer group breaking into this new coding territory! > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 I'm just guessing but since you don't pause after print "Hello world" it may be printing and exiting so fast that you can't see it. Insert a x=raw_input() or time.sleep(5) to see. Console apps don't keep console open after exiting unless they are executed from the console manually. -Larry Bates |