Skip to main content

I'm using universe 11.3.4 and want to pass in parameters in when running a python program using RUNPY is this possible?



------------------------------
Neil Sherwood
Analyst Programmer
HSBC Global Services (UK) Limited
London GB
------------------------------

I'm using universe 11.3.4 and want to pass in parameters in when running a python program using RUNPY is this possible?



------------------------------
Neil Sherwood
Analyst Programmer
HSBC Global Services (UK) Limited
London GB
------------------------------

Yes, there a shared variable between UV and Python called sys.argv.  works like the param variable.
Python:
     testparam.py

import sys

try:
my_param = sys.argv[1]
except:
my_param = 'Nothing_Passed'

print(my_param)

Universe:
  RUNPY testparam.py SomeText






------------------------------
Michael Brady
Application Architect
Integrated Supply Network Inc
Lakeland FL US
------------------------------