A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2009-February/086055.html below:

[Python-Dev] .Idle.py init file

[Python-Dev] .Idle.py init file [Python-Dev] .Idle.py init fileMitchell L Model MLMLists at Comcast.net
Thu Feb 12 23:34:09 CET 2009
I was trying to disentangle some IDLE behavior today and discovered 
that If the user has a .Idle.py file IDLE will run it when it starts 
up. This is independent of running IDLESTARTUP or PYTHONSTARTUP when 
the -s switch is given. It is run by Tk.readprofile as called from 
Tk.__init__. The "Idle" comes from the name passed to TK() when 
PyShell.py creates its Tk root. In fact, not only is it independent, 
but it works differently: any imports done in .Idle.py go into Tk's 
name space, whereas IDLESTARTUP/PYTHONSTARTUP is exec'd and imports 
go into the interpreter's namespace.

I don't think this behavior is documented anywhere, although since I 
had a .Idle.py file I must have seen something about this somewhere 
at some point. It's very hard to search for ".Idle.py" when "idle.py" 
is a file whose name appears frequently in discussions.

Is this something that I should submit as an Issue or is it widely 
known behavior? It should at least be documented.
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4