[Tutor] Re: [Pythonmac-SIG] Re: Weird import problem with PythonIDE on Mac (was 'import problem')

2005-04-23 Thread Just van Rossum
Jack Jansen wrote: > As always, reading the source provides the answer. > > If you look in PyEdit.py, method Editor.execstring(), you'll see that > the only thing "run as __main__" does is set the module name to > "__main__". It does *not* change the globals dictionary to __main__. > > I'm not

[Tutor] Re: [Pythonmac-SIG] Re: Weird import problem with PythonIDE on Mac (was 'import problem')

2005-04-22 Thread gandreas
On Apr 22, 2005, at 12:21 AM, Bob Ippolito wrote: On Apr 21, 2005, at 9:06 PM, Chris Smith wrote: ### def y1(): pass def foo(): from __main__ import y1 pass foo() ### Here is a version of the code, stripped of the timeit code. The above segment exhibits the same symptoms as the previo

[Tutor] Re: [Pythonmac-SIG] Re: Weird import problem with PythonIDE on Mac (was 'import problem')

2005-04-22 Thread Bob Ippolito
On Apr 21, 2005, at 9:06 PM, Chris Smith wrote: ### def y1(): pass def foo(): from __main__ import y1 pass foo() ### Here is a version of the code, stripped of the timeit code. The above segment exhibits the same symptoms as the previously submitted one. Even though I am running this

[Tutor] Re: [Pythonmac-SIG] Re: Weird import problem with PythonIDE on Mac (was 'import problem')

2005-04-22 Thread Jack Jansen
On 22 Apr 2005, at 03:06, Chris Smith wrote: ### def y1(): pass def foo(): from __main__ import y1 pass foo() ### Here is a version of the code, stripped of the timeit code. The above segment exhibits the same symptoms as the previously submitted one. Even though I am running this as