That sounds reasonable to me but I know next to nothing about python.
Maybe I should have included the misbehaving script, which was taken directly 
from the PyMOL wiki script library:

## This is just a quick hack. For something more meaty see;
## http://arcib.dowling.edu/sbevsl/

## Version 0.0.00-000/1


## Turn off the virtual_trackball
cmd.set("virtual_trackball", "off")


## spacefill
def spacefill(p1=''):
    if(p1=='off'):
        cmd.hide("spheres")
    elif(p1==''):
        cmd.show("spheres")
    else:
        print("feh!")
cmd.extend("spacefill", spacefill)

## cartoon
def cartoon(p1=''):
    if(p1=='off'):
        cmd.hide("cartoon")
    elif(p1==''):
        cmd.show("cartoon")
    else:
        print("feh!")
cmd.extend("cartoon", cartoon)

## wireframe
def wireframe(p1=''):
    if(p1=='off'):
        cmd.hide("lines")
    elif(p1==''):
        cmd.show("lines")
    else:
        print("feh!")
cmd.extend("wireframe", wireframe)


## exit
def exit():
    cmd.quit()
cmd.extend("exit", exit)

Any part of it works fine when pasted, but no part works when invoked by 
"run..."

Evan




On 2/28/08 10:02 PM, "gilleain torrance" <gilleain.torra...@gmail.com> wrote:

Hmm. Running scripts has always worked for me on a mac.

Could it be a tab/space problem, or just a character missing at the
end from a copy/paste?

gilleain torrance

On Thu, Feb 28, 2008 at 2:50 PM, Sadler, Evan <esad...@dom.wustl.edu> wrote:
> I can run scripts by pasting them, but they fail when I try to read them
>  from a file, as in:
>
>  PyMOL> run ~/scriptfolder/rasmolify.py
>
>  This generates lots of errors:
>
>  Traceback (most recent call last):
>   File "/Applications/MacPyMOL.app/pymol/modules/pymol/parser.py", line 333,
>  in parse
>
>  parsing.run_file(exp_path(layer.args[0]),self.pymol_names,self.pymol_names)
>   File "/Applications/MacPyMOL.app/pymol/modules/pymol/parsing.py", line
>  456, in run_file
>     execfile(file,global_ns,local_ns)
>   File "/Users/evansadler/pymolscripts/rasmolify.py", line 3
>
>      ^
>   SyntaxError: invalid syntax
>
>  Some result for MacPyMOL and X11 hybrid
>
>  What am I doing wrong?
>
>  Evan
>  --
>  J. Evan Sadler, M.D., Ph.D.
>  Howard Hughes Medical Institute
>  Washington University
>  660 S. Euclid Ave., Box 8022
>  St. Louis, MO   63110
>  Tel: 314-362-9067
>  FAX: 314-454-3012
>  email: esad...@wustl.edu
>
>
>
>  -------------------------------------------------------------------------
>  This SF.net email is sponsored by: Microsoft
>  Defy all challenges. Microsoft(R) Visual Studio 2008.
>  http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
>  _______________________________________________
>  PyMOL-users mailing list
>  PyMOL-users@lists.sourceforge.net
>  https://lists.sourceforge.net/lists/listinfo/pymol-users
>

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
PyMOL-users mailing list
PyMOL-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pymol-users


Reply via email to