Re: [Tutor] Confused about globals

2006-06-09 Thread Kent Johnson
Etrade Griffiths wrote: > Hi > > I have a series of python programs that plot stuff using PYX. Common to > these is the need to read in a list of (well) locations in (X,Y) coords so > I put that code in a separate module called shared_funcs.py. The coords > are stored in dictionaries which I

Re: [Tutor] Confused about globals

2006-06-09 Thread Dustin Mitchell
As a note, the "import" should be import shared_funcs In Python, most globals aren't really global -- they're local to the module. If you split your modules by functionality, then variables should naturally relate to a specific module, and be located there. So, for example, you could move

[Tutor] Confused about globals

2006-06-09 Thread Etrade Griffiths
Hi I have a series of python programs that plot stuff using PYX. Common to these is the need to read in a list of (well) locations in (X,Y) coords so I put that code in a separate module called shared_funcs.py. The coords are stored in dictionaries which I want to use later in the "main" prog