Jan-11-2017, 12:16 PM
Hi guys,
During my undergraduation I wrote a program in MatLab. This program have functions separated in different files that are called in the main file. I want to pass the code to Python 3.5.2.
My program read a huge data base recorded with sensors installed on airplanes. I load this data base in the main program and every column is stored in vectors that are global variables. That way the functions can access the values without necessity to load the data base again.
The problem is that every explanation that I read, showed which I need to change the value of a global variable when I call it. For example:
During my undergraduation I wrote a program in MatLab. This program have functions separated in different files that are called in the main file. I want to pass the code to Python 3.5.2.
My program read a huge data base recorded with sensors installed on airplanes. I load this data base in the main program and every column is stored in vectors that are global variables. That way the functions can access the values without necessity to load the data base again.
The problem is that every explanation that I read, showed which I need to change the value of a global variable when I call it. For example:
def func1(): global myGlobal myGlobal = 42But I want to do something like that:
def func1(): global myGlobal local = myGlobal # do any math which I need in this function with the "local" variableI appreciate all help with this question.