How to pass parameter to a module?

M-a-S NO-MAIL at hotmail.com
Thu Sep 18 22:17:37 CEST 2003


That's what I asked. Thanks!
M-a-S

"Michael Peuser" <mpeuser at web.de> wrote in message news:bkd0rb$qb2$01$1 at news.t-online.com...
>
> "M-a-S" <NO-MAIL at hotmail.com>
>
> > I thought about the third module. It doesn't sound good.
> > I hoped there're some tricks with __dict__, frames and
> > other __...__ objects.
> >
>
> Well, there are some tricks ;-)
>
>
> myVariable='great surprise'
> import x
> .......
>
> "This is modul X"
> import sys
> print sys.modules['__main__'].myVariable
>
>
> But generally the namespace of a module is ... the module.
>
> Kindly
> Michael P






More information about the Python-list mailing list