Hi Ritu,

when using the API, you need to quote the text label twice:

cmd.label("chain d and name C1", "'whatever'")

It's a string in a string :)

Cheers,
   Thomas

Rituparna Sengupta wrote, On 05/30/12 22:42:
> Hi,
> 
> Can anyone tell me how to label something using the API. I'm having
> trouble with it and the API usage is not listed in PyMol wiki.
> I use
> 
> label chain d, "whatever"
> 
> from the command line and it works fine. But I want to use it in a
> script. I tried using
> 
> cmd.label("chain d", "whatever")
> 
> but it generates an error; name 'whatever' not defined. Does anyone
> know what I should do? The command I want to use is
> 
> label chain d and name C1, "whatever"
> 
> what is the equivalent of this in API?
> 
> Thanks,
> Ritu

-- 
Thomas Holder
MPI for Developmental Biology
Spemannstr. 35
D-72076 Tübingen

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net

Reply via email to