Why 'import' keyword is importing OS module commands along with the parent class that I want to import?

26 Views Asked by At

I've saved my parent class "RE" in a parent.py file and while working in a child class inside another child.py file, i used "from parent import RE" and it successfully imported the main class, however it also imported the OS module and the following print commands below OS, however it did't import CSV nor anything else from the 'parent.py' file! Why is this happening?

import csv
import os
print('HELLO, THIS IS THE PARENT CLASS MODULE.\n\n')
print('Old Directory Address:',os.getcwd())
os.chdir('C:/Users/dim63838/PycharmProjects/pythonProject')
print("Updated Directory Address",os.getcwd(), '\n')
class RE:
     pass

Any help will be highly appreciated!

0

There are 0 best solutions below