how to talk to __main__?

Michal Wallace sabren at manifestation.com
Mon Feb 14 12:21:29 EST 2000


Fredrik Lundh wrote in message ...
>Michal Wallace <sabren at manifestation.com> wrote:
>> I understand why __name__ evaluates to "__main__",
>> but how come you can't say __main__.x = 1 to reassign
>> some global variable x?
>
>of course you can -- provided you import it first.


oh! Well.... Duh!. :)

Thanks.

-Michal
http://www.sabren.com/





More information about the Python-list mailing list