how to talk to __main__?

Fredrik Lundh effbot at telia.com
Mon Feb 14 12:13:55 EST 2000


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.

</F>





More information about the Python-list mailing list