At present, wizards need to be located in the
$PYMOL_PATH/modules/pymol/wizard directory -- changing this would be
nontrivial, since all wizards are assumed to reside in the
FYI: module-name.__path__ has a different meaning than sys.path.
Warren L. DeLano, Ph.D. =20
. DeLano Scientific LLC =20
. 400 Oyster Point Blvd., Suite 213 =20
. South San Francisco, CA 94080 USA =20
. Biz:(650)-872-0942 Tech:(650)-872-0834 =20
. Fax:(650)-872-0273 Cell:(650)-346-1154
. mailto:warren@... =20
> -----Original Message-----
> From: Indraneel Majumdar [mailto:indraneel@...]=20
> Sent: Monday, February 27, 2006 5:51 PM
> To: pymol-users@...
> Cc: Warren DeLano
> Subject: wizard path option
> I notice that imp.find_module() uses wizard.__path__ instead=20
> of the default sys.path. Is there a problem in using=20
> wizard.__path__+sys.path ?
> I guess changing wizard.__path__ is probably a bad idea.
> How should one run wizards not located in the pymol tree (eg=20
> during testing)?
On Tue, Feb 28, 2006 at 10:38:40AM -0800, Warren DeLano wrote:
> At present, wizards need to be located in the
> $PYMOL_PATH/modules/pymol/wizard directory -- changing this would be
> nontrivial, since all wizards are assumed to reside in the
> "pymol.wizard" namespace.
So this means the user has to run a script that adds any local wizards
to sys.modules as pymol.wizard.modulename, before the first
"wizard modulename" call? (using imp.load_module).
Or assignment can be done directly by
pymol.wizard.modulename = module()
as in stereodemo.py (sys.modules is not notified here and "wizard
modulename" will not work) (I guess _wizard should also check if
pymol.wizard.modulename exists before checking sys.modules)
I guess this will not conflict as long as pymol.wizard.Wizard does not
assume file location (in the future, although there is no reason to,
since the second method of assignment does not even have __name__ or
__file__ defined for pymol.wizard.modulename).
> FYI: module-name.__path__ has a different meaning than sys.path.
Yes, I was guessing this.