The following program gives different results under IDLE:
------------------------
''' To explore the Name given to a program, using DOS, PythonWin and IDLE.
'''
print 'The name is:', __name__
-----------------------
DOS command line returns: The name is: __main__
PythonWin returns: The name is: __main__
IDLE returns: The name is: Incompatibility
Since test routines typically rely on the former, such routines, as for example
urllib.py,
fail under IDLE.
Colin W.
------------------------
''' To explore the Name given to a program, using DOS, PythonWin and IDLE.
'''
print 'The name is:', __name__
-----------------------
DOS command line returns: The name is: __main__
PythonWin returns: The name is: __main__
IDLE returns: The name is: Incompatibility
Since test routines typically rely on the former, such routines, as for example
urllib.py,
fail under IDLE.
Colin W.