Re: Inter-module globals

2006-03-09 Thread Joel Hedlund
> Use a module and a class variables for that. I think we could manage a little example too ;-) This one is a fictitious little game project where the user can define a custom graphics directory on the command line. Three files: game.py, graphics.py and common.py. The common.py file contains

Re: Inter-module globals

2006-03-09 Thread Schüle Daniel
Anton81 wrote: > Hi, > > I want to use globals that are immediately visible in all modules. My > attempts to use "global" haven't worked. Suggestions? > > Anton I think a dictionary would work here as well as list but not strings and int's # module1 settings = { "release" : "1.0",

Re: Inter-module globals

2006-03-09 Thread Jorge Godoy
Anton81 <[EMAIL PROTECTED]> writes: > I want to use globals that are immediately visible in all modules. My > attempts to use "global" haven't worked. Suggestions? Use a module and a class variables for that. Import your module and read/update class variables as you need them. -- Jorge Godoy

Inter-module globals

2006-03-09 Thread Anton81
Hi, I want to use globals that are immediately visible in all modules. My attempts to use "global" haven't worked. Suggestions? Anton -- http://mail.python.org/mailman/listinfo/python-list