mitmproxy/test/scripts/a.py

22 lines
267 B
Python
Raw Normal View History

import argparse
parser = argparse.ArgumentParser()
2013-06-15 22:10:53 +00:00
parser.add_argument('--var', type=int)
var = 0
2015-05-30 00:03:28 +00:00
2013-06-15 22:10:53 +00:00
def start(ctx, argv):
global var
2013-06-15 22:10:53 +00:00
var = parser.parse_args(argv[1:]).var
2015-05-30 00:03:28 +00:00
def here(ctx):
global var
var += 1
return var
2015-05-30 00:03:28 +00:00
def errargs():
pass