[GRASS-user] Problems with GRASS python code in osgeo4w
hamish_b at yahoo.com
Mon Jul 13 21:59:51 EDT 2009
> > > Okay, so Python is working fine.
> > If python is working, can you explain why my first example
> > ( C:\Temp\printargs.py this is a test ) only prints out sys.argv
> > ?
> Sorry, I overlooked that one.
> > I believe that my problem has nothing to do with g.parser. I
> > believe that the arguments to a python script are being stripped
> > when you rely on ftype.
> Okay; I think I know what's going on.
> It appears that assoc and ftype set the registry keys:
> [or py_auto_file, if that's what you use.]
> The shell uses:
> which are "virtual" keys which refer to either:
> or the above HKLM keys, with the HKCU versions taking
> precedence. So you can't use assoc/ftype to change the file
> associations if the HKCU keys exist.
> The confusion arose because both sets of keys were set to
> exactly the same thing on my system.
> FWIW, you do need the %* at the end of the command. If I
> remove that from the HKCU keys, the arguments cease to be passed.
just to note that the osgeo4w build is >2 months out of date now,
and the version that is shipping does not include the .py association
PATHEXT (etc.) and PATH fixes to lib/init/init.bat (etc.)
so this may be fighting battles already fought.
More information about the grass-user