Accessing global namespace from module

Reuben D. Budiardja techlist at pathfinder.phys.utk.edu
Tue Jun 12 16:51:53 EDT 2007


On Monday 11 June 2007 23:49:14 Gabriel Genellina wrote:
> En Mon, 11 Jun 2007 22:19:15 -0300, Reuben D. Budiardja
><snip>
> >It'll be great if I can 
> > put
> > this trick on a single file that is included by the main scripts, to
> > avoid
> > violating DRY principle.
>
> According to your description on how things work, you will need the
> globals() from mainscript.py; try this:
>
Hi Gabriel,
This works great ! Thanks a lot (and to John Krukoff too).

RDB
-- 
Reuben D. Budiardja
Dept. Physics and Astronomy
University of Tennessee, Knoxville, TN



More information about the Python-list mailing list