2013-06-13 14:04:04 +00:00
|
|
|
import argparse
|
|
|
|
|
|
|
|
parser = argparse.ArgumentParser()
|
2013-06-15 22:10:53 +00:00
|
|
|
parser.add_argument('--var', type=int)
|
2011-08-02 23:06:29 +00:00
|
|
|
|
|
|
|
var = 0
|
2013-06-15 22:10:53 +00:00
|
|
|
def start(ctx, argv):
|
2013-06-13 14:04:04 +00:00
|
|
|
global var
|
2013-06-15 22:10:53 +00:00
|
|
|
var = parser.parse_args(argv[1:]).var
|
2013-06-13 14:04:04 +00:00
|
|
|
|
2011-08-02 23:06:29 +00:00
|
|
|
def here(ctx):
|
|
|
|
global var
|
|
|
|
var += 1
|
|
|
|
return var
|
|
|
|
|
|
|
|
def errargs():
|
|
|
|
pass
|