[Tutor] Global presets ?

Dave S pythontut at pusspaws.net
Sat Dec 4 11:43:47 CET 2004


Hi there,

I have some common data directories, like

/home/dave/mygg/gg1.3/logs
/home/dave/mygg/gg1.3/data
/home/dave/mygg/gg1.3/datacore
/home/dave/mygg/gg1.3/arch_data

which increasing numbers of scripts are accessing. At the begining of 
each script
I end up putting in declarations like

arch_data_dir='/home/dave/mygg/gg1.3/arch_data'
data_dir='/home/dave/mygg/gg1.3/data'
....

over & over. This is OK until I want to move a directory

Somewhere I read about importing a script to define common globals for 
all the scripts that import it.

I tried this, and failed - the variable was only valid for the module, 
to be expected really :)

Can anyone make a suggestion howto set up common global presets.

Cheers
Dave






More information about the Tutor mailing list