Skip to content

Instantly share code, notes, and snippets.

@brianthelion
Created July 18, 2016 15:38
Show Gist options
  • Save brianthelion/36e79c9c20e33efa7b799ad702454174 to your computer and use it in GitHub Desktop.
Save brianthelion/36e79c9c20e33efa7b799ad702454174 to your computer and use it in GitHub Desktop.
import argparse
GLOBAL_X = None
def dialog_fn():
return GLOBAL_X
def matlab_ported_fn():
print(dialog_fn())
def main():
global GLOBAL_X
parser = argparse.ArgumentParser()
parser.add_argument('-x', type=int, required=True)
ns = parser.parse_args()
GLOBAL_X = ns.x
matlab_ported_fn()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment