2013-06-13 14:04:04 +00:00
|
|
|
import argparse
|
|
|
|
|
|
|
|
parser = argparse.ArgumentParser()
|
|
|
|
parser.add_argument('--var')
|
2011-08-02 23:06:29 +00:00
|
|
|
|
|
|
|
var = 0
|
2013-06-13 14:04:04 +00:00
|
|
|
def __init__(ctx, argv):
|
|
|
|
global var
|
|
|
|
var = parser.parse_args(argv).var
|
|
|
|
|
2011-08-02 23:06:29 +00:00
|
|
|
def here(ctx):
|
|
|
|
global var
|
|
|
|
var += 1
|
|
|
|
return var
|
|
|
|
|
|
|
|
def errargs():
|
|
|
|
pass
|