Re: Question about import and namespace

2006-09-01 Thread jdemoor
Ok, thanks again. That was helpful. -- http://mail.python.org/mailman/listinfo/python-list

Re: Question about import and namespace

2006-09-01 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, jdemoor wrote: >> from module import * >> import module >> >> as these kinds of import are not mutually exclusive. > > Would this run the code in 'module' twice, or just make the objects in > it accessible by several names ? The code at module level is only executed at fi

Re: Question about import and namespace

2006-09-01 Thread Peter Otten
[EMAIL PROTECTED] wrote: > Thanks for the replies. > >> You can do both >> >> from module import * >> import module >> >> as these kinds of import are not mutually exclusive. > > Would this run the code in 'module' twice, or just make the objects in > it accessible by several names ? The latter

Re: Question about import and namespace

2006-09-01 Thread jdemoor
Thanks for the replies. > You can do both > > from module import * > import module > > as these kinds of import are not mutually exclusive. Would this run the code in 'module' twice, or just make the objects in it accessible by several names ? -- http://mail.python.org/mailman/listinfo/python-l

Re: Question about import and namespace

2006-09-01 Thread Peter Otten
[EMAIL PROTECTED] wrote: > I'm new to Python and have the following problem : > I have an application started by a main.py file, which does a ' from > module_1 import * '. > main.py is responsible from the creation of an object which is then > used in module_1. > What is the best way to make that

Re: Question about import and namespace

2006-09-01 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, jdemoor wrote: > I have an application started by a main.py file, which does a ' from > module_1 import * '. > main.py is responsible from the creation of an object which is then > used in module_1. > What is the best way to make that object visible in the module_1 > namesp

Question about import and namespace

2006-09-01 Thread jdemoor
Hi, I'm new to Python and have the following problem : I have an application started by a main.py file, which does a ' from module_1 import * '. main.py is responsible from the creation of an object which is then used in module_1. What is the best way to make that object visible in the module_1 na