User Tools

Site Tools


Writing /var/lib/dokuwiki/data/meta/tutorials/python_stuff.meta failed
tutorials:python_stuff

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
tutorials:python_stuff [2016/02/26 17:52] – ↷ Page moved from python_stuff to tutorials:python_stuff amoratutorials:python_stuff [2022/09/20 00:08] (current) – external edit 127.0.0.1
Line 17: Line 17:
  
  
- import sys, os +  import sys, os 
- import optparse +  import optparse 
-  +   
- #parsing args +  #parsing args 
- parser=optparse.OptionParser("usage: %prog [options]"+  parser=optparse.OptionParser("usage: %prog [options]"
- parser.add_option("-r", "--robot", dest="robot", default="lwr", type="string", help="robot name"+  parser.add_option("-r", "--robot", dest="robot", default="lwr", type="string", help="robot name"
- (options, args)=parser.parse_args(sys.argv[1:])+  (options, args)=parser.parse_args(sys.argv[1:])
  
 options.<variable> will contain the data you need from the command line. options.<variable> will contain the data you need from the command line.
tutorials/python_stuff.1456509161.txt.gz · Last modified: 2022/09/20 00:08 (external edit)