Python Forum

Full Version: Python program cannot close
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi, I need some help on this peculiar problem.

I have 2 ubuntu machines running the same python program using 2.7 IDLE.

On machine A, when I close the Python Shell console window, python program is close completely.
On machine B, when I close the Python Shell console window, console window closes, by the python is still running in the background. I need to run sudo pkill python to close the program completely.

Another observation,
On machine A, when I run the program from IDLE, Python shell console shows "RESTART <program_name.py>"
on machine B, when I run the program from IDLE, Python shell console shows "NO SUB PROCESS" without showing "RESTART <program_name.py>"

I believe it is due to some environment setting.
Can someone enlighten me on this problem?

Thanks and in advance.

kwekey
If idle is run with the -n command line switch, it will run without a subprocess, which means that Idle won't start a new process when you hit F5 to run your program.

In recent pythons, starting Idle without subprocess throws a deprecation warning.
Hi Gribouillis,

Thanks for your enlightenment. My problem is solved..