Advertisement
rfmonk

getopt_long.py

Mar 3rd, 2014
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.30 KB | None | 0 0
  1. import getopt
  2.  
  3. opts, args = getopt.getopt(['--noarg',
  4.                             '--witharg', 'val',
  5.                             '--witharg2=another',
  6.                             ],
  7.                            '',
  8.                            ['noarg', 'witharg=', 'witharg2='])
  9. for opt in opts:
  10.     print opt
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement