cmd.get_wizard() takes no arguments and returns the current active wizard. If
there is no active wizard, it returns None.
PyMOL> print cmd.get_wizard()
None
PyMOL> cmd.wizard("mutagenesis")
PyMOL> print cmd.get_wizard()
<pymol.wizard.mutagenesis.Mutagenesis instance at 0x1149332d8>
There is no wizard architecture documentation other than code, I'm sorry.
Here is an example script that adds a new wizard:
https://github.com/speleo3/pymol-psico/blob/master/psico/wizards.py
Cheers,
Thomas
On 11 Oct 2016, at 15:09, Timothy Craig <[email protected]> wrote:
> Yes I totally agree, the question I have is "What needs to go there?". I
> tried using things like:
>
> pymol.cmd.get_wizard("mutagenesis").set_dep("dep")
>
> since in the previous line I called:
>
>
> pymol.cmd.wizard("mutagenesis")
>
> but then I get this error:
>
> -----------------------
>
> Traceback (most recent call last):
>
> File "pngCSVmutate.py", line 141, in <module>
>
> pymol.cmd.get_wizard("Mutagenesis").set_dep("dep")
>
> File
> "/Users/craigt2/anaconda/pymol/lib/python2.7/site-packages/pymol/wizarding.py",
> line 166, in get_wizard
>
> _self.unlock(r,_self)
>
>
> AttributeError: 'str' object has no attribute 'unlock'
>
> ---------------------------------
>
> Which makes it look like it's not looking for a string to tell it which
> wizard I'm wanting to use. Very confusing.
>
> Thanks,
>
> -Tim
>
>
> On Tue, Oct 11, 2016 at 12:03 PM, Sampson, Jared M.
> <[email protected]> wrote:
> Hi Tim - It seems to me that cmd.get_wizard() needs some argument to be
> passed to it, because right now that function is returning `None`. This
> explains the error, which states you're trying to call .set_dep() of a `None`
> object.
>
> Hope that helps.
>
> Cheers,
> Jared
>
>> On Oct 11, 2016, at 2:48 PM, Timothy Craig <[email protected]> wrote:
>>
>> Hello,
>> I'm trying to adapt this script in python to do a variety of different
>> mutations from a csv file using this previous message as a template.
>>
>> https://sourceforge.net/p/pymol/mailman/message/11671708/
>>
>> I'm a python novice so please excuse me if this is something simple. Here is
>> a line that I have in my script that is giving me an error, which is now
>> quite long so I don't want to post it all here now:
>> -----------
>> pymol.cmd.get_wizard().set_dep("dep")
>>
>> error:
>>
>> Error: unable to get setting type.
>>
>> Traceback (most recent call last):
>>
>> File "pngCSVmutate.py", line 141, in <module>
>>
>> pymol.cmd.get_wizard().set_dep("dep")
>>
>> AttributeError: 'NoneType' object has no attribute 'set_dep'
--
Thomas Holder
PyMOL Principal Developer
Schrödinger, Inc.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
PyMOL-users mailing list ([email protected])
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/[email protected]