Hi,
First, the initial error you were seeing was a syntax error:
> from sys import argv
> my_argv =3D argv[argv.index("--"):]
> print my_argv[1], my_argv[2]
is failing because of the word "3D"
Second, that used to fail on Linux systems anyway (it worked on some
other systems). I tend to use optparse, which often requires things to
live in sys.argv. Here's my current workaround:
#argv = sys.argv[sys.argv.index('--') + 1:]
try:
argv = sys.argv
except AttributeError:
argv = pymol_argv
sys.argv = pymol_argv # this is necessary for optparse to
handle the --help option.
try:
argv = argv[argv.index('--') + 1:]
except IndexError:
argv = []
options,args = parser.parse_args(args=argv)
I haven't re-tested Linux recently, though. It might be that the
pymol_argv workaround is not necessary anymore.
-michael
--
IRTA Postdoctoral Fellow
Laboratory of Computational Biology NIH/NHLBI
5635 Fishers Lane, Room T909
http://www.umich.edu/~mlerner