Re: [PyMOL] reload modified wizard

2007-02-25 Thread Michael Lerner

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  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  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: pymol-users-boun...@lists.sourceforge.net
> > [mailto:pymol-users-boun...@lists.sourceforge.net] On Behalf
> > Of bgbg bg
> > Sent: Saturday, February 24, 2007 5:19 AM
> > To: pymol-users@lists.sourceforge.net
> > 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
> > PyMOL-users@lists.sourceforge.net
> > 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
> PyMOL-users@lists.sourceforge.net
> 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



Re: [PyMOL] reload modified wizard

2007-02-24 Thread Michael Lerner

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  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: pymol-users-boun...@lists.sourceforge.net
> [mailto:pymol-users-boun...@lists.sourceforge.net] On Behalf
> Of bgbg bg
> Sent: Saturday, February 24, 2007 5:19 AM
> To: pymol-users@lists.sourceforge.net
> 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
> PyMOL-users@lists.sourceforge.net
> 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
PyMOL-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pymol-users




--
Biophysics Graduate Student
Carlson Lab, University of Michigan
http://www.umich.edu/~mlerner http://lernerclan.net



Re: [PyMOL] reload modified wizard

2007-02-24 Thread DeLano Scientific
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: pymol-users-boun...@lists.sourceforge.net 
> [mailto:pymol-users-boun...@lists.sourceforge.net] On Behalf 
> Of bgbg bg
> Sent: Saturday, February 24, 2007 5:19 AM
> To: pymol-users@lists.sourceforge.net
> 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
> PyMOL-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pymol-users




[PyMOL] reload modified wizard

2007-02-24 Thread bgbg bg

Hello,
I develop several custom PyMol wizards. Is there any way to reload a
modified wizard,  without restarting PyMol?

Thank you.