Re: can I import the module twice (under differnet names)

2006-11-02 Thread Steve Holden
alf wrote: > Hi, > > wonder if in the python I could treat modules imorts like classes > instances. It means I could import it twice or more times under > different names. > If you want to repeat the full import, and have each imported version get an independent namespace as well as independen

Re: can I import the module twice (under differnet names)

2006-11-01 Thread Thomas Nelson
alf wrote: > Hi, > > wonder if in the python I could treat modules imorts like classes > instances. It means I could import it twice or more times under > different names. > > -- > alfz1 You can always give any object as many names as you want: >>> import sys >>> s1 = sys >>> s2 = sys >>> s1.path

Re: can I import the module twice (under differnet names)

2006-11-01 Thread Ben Finney
alf <[EMAIL PROTECTED]> writes: > wonder if in the python I could treat modules imorts like classes > instances. It means I could import it twice or more times under > different names. No need to import more than once. The 'import' statement binds a module object to the specified name, and you ca

can I import the module twice (under differnet names)

2006-11-01 Thread alf
Hi, wonder if in the python I could treat modules imorts like classes instances. It means I could import it twice or more times under different names. -- alfz1 -- http://mail.python.org/mailman/listinfo/python-list