[GRASS-dev] G_parser and python

Danho Fursy Rodelec Neuba danho_f at yahoo.fr
Thu Jun 4 20:03:03 EDT 2009


Hi,
i am try to use option and flag in python script in this code: 
     1. import sys
     2. sys.path.append("/usr/local/grass-6.4.0svn/etc/python")
     3. from grass.lib import grass as gl6
     4. import random
     5. 
     6. gl6.G_gisinit('')
     7. 
     8. mapset=gl6.G_mapset()
     9. 
    10. opt=gl6.Option()
    11. opt=gl6.G_define_option()
    12. opt.key='debug'
    13. opt.description='Option test'
    14. opt.type=gl6.TYPE_STRING
    15. opt.required=gl6.YES
    16. 
    17. 
    18. if (gl6.G_parser(0,gl6.sys.argv)):
    19. 	exit()
    20. 
and i got the following error:
	Traceback (most recent call last):
  File "grass2.py", line 18, in <module>
    if (gl6.G_parser(0,gl6.sys.argv)):
TypeError: in method 'G_parser', argument 2 of type 'char **'



	

	
		
___________________________________________________________________________ 
Yahoo! Mail réinvente le mail ! Découvrez le nouveau Yahoo! Mail et son interface révolutionnaire.
http://fr.mail.yahoo.com


More information about the grass-dev mailing list