[Tutor] Where is this tr function?

Kelie kf9150 at gmail.com
Fri Jul 4 23:31:09 CEST 2008


Kent Johnson <kent37 <at> tds.net> writes:
> You have to find where tr() is being imported. From PyShell type
> tr.__module__
> that should print the name of the module containing tr().
> 

Thanks Kent. Actually it isn't PyShell. It is in Ulipad's (Ulipad is a freeware
code editor) Python shell. I followed your instruction and found out tr seems to
be an alias of the ugettext function in the gettext module. On my computer, it
is this file: C:\Python25\Lib\gettext.py. Apparently it is for
internationalization and localization support. 

Thanks again.






More information about the Tutor mailing list