How can I make sure my python exit

kyosohma at gmail.com kyosohma at gmail.com
Wed Apr 4 22:01:31 CEST 2007


On Apr 4, 2:58 pm, "ying... at gmail.com" <ying... at gmail.com> wrote:
> Hi,
>
> I have a python script:
> At the end of the script, I have:
>
> print "Build Done!"
>
> my question is does that mean my python script exits after it prints
> "Build done!"
>
> I have a java program which calls this python script. But i run into a
> problem in which the python script never returns to the java program
> after it performs a system call to execute that python script.


Typically when the last piece of code executes, the program ends. You
could import sys and explicitly exit by calling sys.exit(0).

Mike




More information about the Python-list mailing list