[GRASS-user] Newbie, running python on Mac, error on execl

AhmadKhaled vbkhp at yahoo.com
Tue Apr 6 13:31:02 EDT 2010


Hi,

I have just started writing scripts using python for Grass on Mac. I copied
the example below from the library and ran it. 

"
#!/usr/bin/env python

#%module
#% description: Checks if vector map is 3D
#% keywords: vector
#%end
#%option
#% key: map
#% type: string
#% gisprompt: old,vector,vector
#% key_desc: name
#% description: Name of vector map 
#% required: yes
#%end

import sys
import grass.script as grass

def main():
    info = grass.parse_command('v.info',
                               flags = 't',
                               map = options['map'])
    return 0

if __name__ == "__main__":
    options, flags = grass.parser()
    sys.exit(main())

"
When I ran the program using the GUI, it gave me an error without
explanation, so I tried the command line running from inside the Grass:

"python hi.py map=geology at PERMANENT"

 and I got the following error: 

"execl() failed: Permission denied"
 

I would appreciate if anyone can help.

Ahmad
-- 
View this message in context: http://n2.nabble.com/Newbie-running-python-on-Mac-error-on-execl-tp4860279p4860279.html
Sent from the Grass - Users mailing list archive at Nabble.com.


More information about the grass-user mailing list