summaryrefslogtreecommitdiffstats
path: root/skeletons/opt_parse.py.erb
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2022-03-07 14:43:44 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2022-03-07 14:43:44 +0100
commitcbcab8684e06379c9f5c51cfc9cac68d8684fe0c (patch)
treed03b04e9a7f8e3aae70e590953408f90deed077c /skeletons/opt_parse.py.erb
parent721a7ea65d23e7b149ba73968a1d75727a55b390 (diff)
downloadvim-cbcab8684e06379c9f5c51cfc9cac68d8684fe0c.zip
vim-cbcab8684e06379c9f5c51cfc9cac68d8684fe0c.tar.gz
move to old
Diffstat (limited to 'skeletons/opt_parse.py.erb')
-rw-r--r--skeletons/opt_parse.py.erb60
1 files changed, 0 insertions, 60 deletions
diff --git a/skeletons/opt_parse.py.erb b/skeletons/opt_parse.py.erb
deleted file mode 100644
index 658f9c0..0000000
--- a/skeletons/opt_parse.py.erb
+++ /dev/null
@@ -1,60 +0,0 @@
-<%= header 'python.hdr' %>
-
-""" Module Description """
-
-#----------------------------------------------------------------------------
-
-__version__ = '0.1.0'
-
-#----------------------------------------------------------------------------
-
-#import
-
-#----------------------------------------------------------------------------
-
-__all__ = [
- '<%= @filename_base %>'
- ]
-
-#----------------------------------------------------------------------------
-class <%= @filename_base %>:
-
- def __init__( self, parser, options ):
- self.parser = parser
- self.options = options
-
-#----------------------------------------------------------------------------
-def my_callback( option, opt, value, parser ):
- print "option : %s" % option
- print "opt : %s" % opt
- print "value : %s" % value
- print "parser : %s" % parser
-
-#----------------------------------------------------------------------------
-def main( ):
- from optparse import OptionParser
- parser = OptionParser( usage="usage : %prog [-h] [-v]", version= "%prog version " + __version__ )
-# action store store_true store_false store_const append count callback help
-# type string int long choice float complex
-# dest action="store*"
-# default
-# nargs int
-# const action="store_const"
-# choices
-# callback
-# callback_args
-# callback_kwargs
-# help help tring
-# metavar
- parser.add_option("-v", "--verbose", action="store_true", dest="verbose", default=False, help="produces noisy outputs." )
- parser.add_option("-c", "--callback", action="callback", callback=my_callback, help="print callback args" )
- parser.add_option("-s", "--string", action="store", type="string", dest="string", help="memorize a string" )
- ( options, args) = parser.parse_args( )
- print 'verbose : %s' % options.verbose
- return 0
-
-#----------------------------------------------------------------------------
-
-if __name__ == '__main__':
- import sys
- sys.exit( main( ) )