From: gilleain t. <gil...@gm...> - 2007-07-04 19:13:22
|
Hmmm. With a little messing around, it seems that this works at the pymol prompt: for x in range(10): cmd.label("(name ca and resi %d)" % x, '"%s%s\" % (resi, resn)') The only difference is in the quoting. Double quotes inside single quotes. gilleain On 7/4/07, Clark, Louis <Lou...@co...> wrote: > > > > > Dear user-group, > > I'm trying to learn how to use python commands inside pymol .pml scripts. > I seem to be missing some understanding about how the interface works. > Could somebody tell me how to fix this command below? > > > > PyMOL>for x in range(10): cmd.label("(name ca and resi %d)" % x, "%s%s" > > PyMOL>% (resi, resn)) > > Traceback (most recent call last): > > File "/usr/local/pymol/modules/pymol/parser.py", line > 232, in parse > > exec(com2[nest]+"\n",pymol_names,pymol_names) > > File "<string>", line 1, in ? > > NameError: name 'resi' is not defined > > > > thanks much!! > > > > -Louis > > > > Louis Clark, Ph.D. > > lou...@co... > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > PyMOL-users mailing list > PyM...@li... > https://lists.sourceforge.net/lists/listinfo/pymol-users > > |