[Tutor] Weird import problem with PythonIDE on Mac (was 'import problem')

Chris Smith smichr at bigfoot.com
Fri Apr 22 01:07:08 CEST 2005


> From: Kent Johnson
> Is it possible that the script is not running as __main__? Add
> print __name__
> to the script and see what it says...
>
>

It says '__main__'.  Here is the end of the output after printing 
vars() if that helps:

'__file__': '/Users/csmith/Desktop/misc python/timeit eg.py',
't': <timeit.Timer instance at 0x1ed5dc8>,
'y1': <function y1 at 0x1eed4f0>,
'__name__': '__main__',
'y2': <function y2 at 0x1eed530>

/c



More information about the Tutor mailing list