I found an old version of my code. It was just slightly more
complicated than I thought. Here's a version of the wrapper that I
was using:
import sys
sys.path.append('/home/mlerner/work/src/PyMOL_Plugins/')
import SomethingOrOtherTools
def __init__(self):
self.menuBar.addmenuitem('Plugin', 'command',
'SomethingOrOther',
label='SomethingOrOther...',
command = lambda s=self:
getSomethingOrOtherTools(s))
def getSomethingOrOtherTools(thing):
reload(SomethingOrOtherTools)
return SomethingOrOtherTools.SomethingOrOtherTools(thing)
Let me know if you have any more questions.
-michael
On 2/24/07, Michael Lerner <[email protected]> wrote:
Actually, I did this when I was developing the APBS Plugin. I put all
of the interesting code in a module called _apbs_tools. apbs_tools
was just a little wrapper where the init function would import and
reload _apbs_tools and then call through to it.
-Michael
On 2/24/07, DeLano Scientific <[email protected]> wrote:
> I believe this is a limitation of Python: once a code module is loaded and
> initialized, it is difficult to reload it...you might be able to hack it
> though.
>
> > -----Original Message-----
> > From: [email protected]
> > [mailto:[email protected]] On Behalf
> > Of bgbg bg
> > Sent: Saturday, February 24, 2007 5:19 AM
> > To: [email protected]
> > Subject: [PyMOL] reload modified wizard
> >
> > Hello,
> > I develop several custom PyMol wizards. Is there any way to
> > reload a modified wizard, without restarting PyMol?
> >
> > Thank you.
> >
> > --------------------------------------------------------------
> > -----------
> > Take Surveys. Earn Cash. Influence the Future of IT Join
> > SourceForge.net's Techsay panel and you'll get the chance to
> > share your opinions on IT & business topics through brief
> > surveys-and earn cash
> > http://www.techsay.com/default.php?page=join.php&p=sourceforge
> > &CID=DEVDEV
> > _______________________________________________
> > PyMOL-users mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/pymol-users
>
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys-and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> PyMOL-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/pymol-users
>
--
Biophysics Graduate Student
Carlson Lab, University of Michigan
http://www.umich.edu/~mlerner http://lernerclan.net
--
Biophysics Graduate Student
Carlson Lab, University of Michigan
http://www.umich.edu/~mlerner http://lernerclan.net