Rename the script from .py to .pml Regards, Gabriel Marques PyMOL
> On Oct 19, 2016, at 4:39 PM, #YEO JINGJIE# <jy...@e.ntu.edu.sg> wrote: > > Dear Users, > > I am trying to implement a script which uses a mix of pymol and python > scripting. I enclosed the main portion within the 'python' and 'python end' > commands. This runs perfectly fine in Pymol GUI mode, however when I tried it > with 'pymol -cg my_script.py', it generates an error: > > Traceback (most recent call last): > File "/usr/lib/python2.7/dist-packages/pymol/parser.py", line 338, in parse > parsing.run_file(path,self.pymol_names,self.pymol_names) > File "/usr/lib/python2.7/dist-packages/pymol/parsing.py", line 452, in > run_file > execfile(file,global_ns,local_ns) > File "/usr/lib/python2.7/dist-packages/pymol/parsing.py", line 447, in > execfile > b.execfile(filename, global_ns, local_ns) > File "bondH.py", line 122 > python end > ^ > SyntaxError: invalid syntax > > How do I overcome this problem? > > Best Regards, > Jingjie > **Disclaimer** The sender of this email does not represent Nanyang > Technological University and this email does not express the views or > opinions of the University. > > ------------------------------------------------------------------------------ > 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 (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 ------------------------------------------------------------------------------ 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 (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