Why does IDLE (Python 2.x) start with -n when launched from appication menu

Asked by Jason Gervich

When you launch IDLE from the Application Menu the Shell menu does not appear in the Shell window menu bar. This is because IDLE is launched with the -n option.

If you type IDLE in a terminal window (without the -n option), the Shell menu does appear in the IDLE shell window. Why does Ubuntu install IDLE with the -n option, preventing the IDLE shell to display the Shell menu with the Restart feature?

I would have expected IDLE to be launched with the Shell menu appearing as the default. There is no mention of this option being used or why in Ubuntu. I happened to find out about it in the Python forum.

Thank you.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Dmitry Tantsur
Solved:
Last query:
Last reply:
Revision history for this message
Best Dmitry Tantsur (divius) said :
#1

Mmmm... Maybe you'd better report it as a bug? You know most of us are not Ubuntu maintainers.
Anyway you can change command line for the menu using Gnome's "Main menu" options.

Revision history for this message
Jason Gervich (gervich) said :
#2

This from the Python forum:

You'll need to modify the IDLE menu item to remove the "-n" using
Ubuntu's menu modification tool, usually found under System->Preferences.

Presently, using a subprocess only allows for one instance of IDLE
running on a machine, whereas running with no subprocess allows for many
instances of IDLE. This architecture is by design.

This from the Ubuntu forum:

Running with subprocess (default) idle tries to bind to TCP/IP-Port 8833. This prevents running more than one idle-instances on a single computer at the same time. On a multiseat-system with e.g. four simultaneous X-sessions only one user can use idle without the -n-Option.

So if you have a single user system you can run IDLE without the -n option. If you run IDLE from the Terminal type "IDLE" and it will run without the -n option. The shell with have the Shell menu with the Restart option. Restart doesn't restart the shell, it just separates the output of one program run from the next with =================RESTART=========================.