import and global namespace
Bruno Desthuilliers
onurb at xiludom.gro
Wed Jul 12 04:21:24 EDT 2006
Dennis Lee Bieber wrote:
> On Wed, 12 Jul 2006 02:48:44 +0200, Bruno Desthuilliers
> <bdesth.quelquechose at free.quelquepart.fr> declaimed the following in
> comp.lang.python:
>
>
>>nate a écrit :
>>
>>>I'd like a module than I'm importing to be able to use objects in the
>>>global namespace into which it's been imported. is there a way to do
>>>that?
>
> <snip>
>
>>NB : FWIW, the clean solution probably involve a class...
>
>
> Or a common module that both (all) import...
I'm afraid this would be as messy. Having one module depending on
implicits external names is a good way to spaghetti code.
--
bruno desthuilliers
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
p in 'onurb at xiludom.gro'.split('@')])"
More information about the Python-list
mailing list