Can a python script located in D:\Folder_A\Folder_B\
be used to change variables in another python script located in D:\Folder_A\Folder_C\
, and then print them out on the console?
NOTE: I'm a beginner in Python, and I'm using v2.7.8.
EDIT: To answer @Rik Verbeek, I created a python file in location A (D:\Folder_A\Folder_B\
), and another file at location B (D:\Folder_A\Folder_C\
), with both the folders (Folder_B
& Folder_C
) located in D:\Folder_A\
. In the 2nd .py file, I wrote the following:
a = 0
b = 0
Now I want to change these variables from the 1st .py file to 5
and 10
respectively, and print them to the console. Also, these files are not in the Python libraries, but are instead, located in another folder(Folder_A
).
To answer @Kasra (and maybe @cdarke), I don't want to import a module, unless it is the only way.