Simple Modules Question

Akira Kiyomiya akira.kiyomiya at autodesk.com
Thu Apr 27 23:20:06 CEST 2000


I see NameError when I try to do string.atoi("45").

Is it because 'string' is at a different location??

Thanks

Akira


from string import atoi    # imports 'string'
                                     # places atoi in current namespace
print atoi("12345")         # invokes 'atoi' without module name

string.atoi("45")             # NameError: string





More information about the Python-list mailing list