Incompatibility.py

Colin J. Williams cjw at connection.com
Mon Jul 26 12:24:19 EDT 1999


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.








More information about the Python-list mailing list