Hi all,
I wrote some functions (usually loaded via .pymolrc.py) that establish
some information
which I would like to use from Plugins, too. In particular, everytime a
PQS/PDB protein complex is loaded,
I retrieve SCOP data and color domains accordingly.
I would like to maintain a dictionary that keeps track with loaded SCOP
domains. In pymolrc I declare it global,
but a plugin that is supposed to read out that dictionary, cannot access
PyMOL's global name space:
The plugin function call contains:
global colorDict
print colorDict
and causes
NameError: global name 'colorDict' is not defined
though the direct call from the Prompt works:
PyMOL>print colorDict ## This still works!
{'blue': '/1ewf//A/1-217 and not hetatm', 'yellow': '/1ewf//A/218-456
and not hetatm'}
Is it the only possibility to put all functions that share memory in the
same plugin?
At the moment I simply do it with scripts (which can access global
vars), not plugins.
But in general, is there some info on plugin name spacing
(and should it be put to the Wiki Plugin tutorial)?
Cheers,
Andreas
--
Andreas Henschel
Bioinformatics Group
TU Dresden
Tatzberg 47-51
01307 Dresden, Germany
Phone: +49 351 463 40063
EMail: a...@biotec.tu-dresden.de