0

Why is the run terminal reflecting imported python file?

For writing python, I am using Visual Studio Code. I have a class named "ClassStoredInfo", in a file, "StoredInfo.py" in a folder called "Calculator" I wish to use the class "ClassStoredInfo" in this new file I am importing from. BUT, when I import as below in the new file, run terminal to check if the code is working, it reflects every code that is written from not knly the new file but also "StoredInfo.py" file, and prints everything written on it... ----------------------------- from Calculator.StoredInfo import ClassStoredInfo ----------------------------- Can someone explain why and how to prevent other files/classes that are imported to run on terminal?? I just wish to divide my files for specific roles, and let terminal run based on just what file i am writing my code on.

18th Aug 2020, 3:48 PM
Whyi Jun Kim
Whyi Jun Kim - avatar
2 Respuestas
0
As i know there is a special stucture folder for import export data. Only your file bot enough. Need also python file with special name!!! So please check in python course
18th Aug 2020, 4:13 PM
george
george - avatar
0
I think this is secure issue from Visual Studio Code. It will be recommendet to test in a real environment i.e. server etc. For more information please see here: https://wiki.python.org/moin/IntegratedDevelopmentEnvironments
18th Aug 2020, 4:24 PM
JaScript
JaScript - avatar