[Tutor] Where is this tr function?

Alan Gauld alan.gauld at btinternet.com
Fri Jul 4 18:35:10 CEST 2008

"Kent Johnson" <kent37 at tds.net> wrote

> tr() is not a standard part of Python. My guess is that it is a
> wrapper function that helps with localization.

So far as I can see it's not a native part of wxPython either - at
least its not mentioned in the book anywhere and I've
never seen/used it personally.

>> When I type print tr('some string') in PyShell that comes with 
>> wxPython, no
>> error. But if I type that line in a .py file and run it, I get an 
>> error:
>> NameError: name 'tr' is not defined

To the OP:
Are you importing any other modules? Is this a specific application's
code you are looking at?

Alan G. 

More information about the Tutor mailing list