0

I wrote a simple ' Hello, World! ' programme in Python 2.7 to play around with py2app. I made the setup.py file and then I ran python setup.py helloWorld.py

Now it created a build folder and a dist folder and inside the dist folder is the .app application of my helloWorld python script.

Now, here is the issues. Everytime that I try to run said .app, it opens and closes instantly.

What is happening? Is it printing Hello, World and then closing too fast for me to see it? Is there a way to prevent it from closing?

Thanks in Advance!

4

1 回答 1

0

>> Is there a way to prevent it from closing?"

this code will wait for user input and after it will closes

>>> print 'Hello World'
Hello World
>>> raw_input('press any key to exit')
press any key to exit
''
>>>
于 2012-09-04T06:05:30.593 回答