_
is used by the interactive interpreter to store the last evaluated result. Everytime you're trying to do something, you're inadvertently having your _
over-written. Also note that _
is quite often used as a shortcut for uggettext
and similar. Simplest solution is to avoid _
for now...
Thanks to thefourtheye for pointing out the relevant section from the Python documentation which states:
The special identifier _ is used in the interactive interpreter to store the result of the last evaluation; it is stored in the
__builtin__
module. When not in interactive mode,_
has no special meaning and is not defined. See section The import statement.Note The name
_
is often used in conjunction with internationalization; refer to the documentation for thegettext
module for more information on this convention.