I am trying to run a python script from another python script. When I call the second script, I want to pass a variable to it.
For instance,
Let's say I have python module A (A.py) and it has the variable oDesktop. When I run a second module B.py, I want to be able to access that oDestkop variable. I am not sure how to do this.
pseudocode:
A.py
oDesktop = DesktopClass();
# RUN SOME CODE
run_module("B.py", oDesktop)
B.py
oDesktop.some_func();
To clarify, I do not have a main in B.py. I have some global variable that I need to keep global.