I have several python functions that I am trying to create into a package. Each function exists in its own python file, and uses global variables to return some objects back to the global environment , some of which get used by the other python functions.
When these functions are standalone functions that have been defined in the python console, they work just fine, but when I put them all together into a python package, the global variables are not being returned as a global variable any longer.
Why do functions that are defined with a package file not return global variables / how can I bypass this?
A very simple example:
python_function1.py
def function1(x):
global new_table
new_table = x
python_function2.py
def function2(new_table):
global new_table2
new_table2 = new_table