Home Get Variables to Use for Exec() from other file
 I have a class file for python and I have a command called dataEnviroment()  The contents of dataEnviroment(): def dataEnviroment(): while True: try: cmd = raw_input("jData> "); if cmd == "exit": exit(); exec(cmd); except Exception as error: print("Error: " + str(error));  Now if I put this in the file that I import the my class module everything works smoothly. But, if I put this in the class file I can't do anything with the variables in the file I work in. And I can't import the file I work in because I am already importing the class file.