Newbie namespace question

deelan ggg at zzz.it
Wed Dec 22 09:58:41 EST 2004


bcarlso at gmail.com wrote:
> I have a variable that I want to make global across all modules, i.e. I
> want it added to the builtin namespace.  Is there a way to do this?
i would not pollute built-ins namespace.
how about:

### a.py
FOO = "I'm a global foo!"

### b.py
import a

print a.FOO


HTH,
deelan

-- 
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
<#me> a foaf:Person ; foaf:nick "deelan" ;
foaf:weblog <http://blog.deelan.com/> .



More information about the Python-list mailing list