[PyMOL] running script on startup

2009-02-20 Thread Martin Höfling

Hey folks,

I am trying to fire up a script with pymol -r doit.pml

PyMOLrun doit.pml,main
Traceback (most recent call last):
  File /sw/lib/pymol-py25/modules/pymol/parser.py, line 334, in parse
 
parsing 
.run_file(exp_path(layer.args[0]),__main__.__dict__,__main__.__dict__)
  File /sw/lib/pymol-py25/modules/pymol/parsing.py, line 455, in  
run_file

execfile(file,global_ns,local_ns)
  File doit.pml, line 2
 select resname SOL
  ^
 SyntaxError: invalid syntax

Can't I use these commands or any ideas what I am doing wrong there? :-)

Best
Martin



Re: [PyMOL] running script on startup

2009-02-20 Thread Pete Meyer
 I am trying to fire up a script with pymol -r doit.pml

pymol doit.pml should be sufficient (no need for -r).

File doit.pml, line 2
   select resname SOL

Unless the syntax has changed, try 'select resname, SOL'.  Does this
script work when run from an already started pymol?

Pete



Re: [PyMOL] running script on startup

2009-02-20 Thread Warren DeLano
Martin,

-r is for running Python programs in the __main__ namespace.

For PyMOL command scripts, simply:

pymol doit.pml

Cheers,
Warren


 -Original Message-
 From: Martin Höfling [mailto:martin.hoefl...@gmx.de]
 Sent: Friday, February 20, 2009 8:50 AM
 To: pymol-users@lists.sourceforge.net
 Subject: [PyMOL] running script on startup
 
 Hey folks,
 
 I am trying to fire up a script with pymol -r doit.pml
 
 PyMOLrun doit.pml,main
 Traceback (most recent call last):
File /sw/lib/pymol-py25/modules/pymol/parser.py, line 334, in parse
 
 parsing
 .run_file(exp_path(layer.args[0]),__main__.__dict__,__main__.__dict__)
File /sw/lib/pymol-py25/modules/pymol/parsing.py, line 455, in
 run_file
  execfile(file,global_ns,local_ns)
File doit.pml, line 2
   select resname SOL
^
   SyntaxError: invalid syntax
 
 Can't I use these commands or any ideas what I am doing wrong there? :-)
 
 Best
   Martin
 
 --
 
 Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco,
 CA
 -OSBC tackles the biggest issue in open source: Open Sourcing the
 Enterprise
 -Strategies to boost innovation and cut costs with open source
 participation
 -Receive a $600 discount off the registration fee with the source code:
 SFAD
 http://p.sf.net/sfu/XcvMzF8H
 ___
 PyMOL-users mailing list
 PyMOL-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/pymol-users
 
 
 





Re: [PyMOL] running script on startup

2009-02-20 Thread Martin Höfling


Am 20.02.2009 um 17:54 schrieb Pete Meyer:


I am trying to fire up a script with pymol -r doit.pml


pymol doit.pml should be sufficient (no need for -r).


Oh ok, without -r it works :-)

Best
Martin