Answer the question
In order to leave comments, you need to log in
How to open file from child class directory by parent class method?
There is a parent class machine in the machine folder. There is a child class machine5 in the machine 5 folder. I know how to get the directory of the current script via os.getcwd() and os.path.dirname, but this gives the parent class folder because the method is physically described in it. Can I somehow refer to the folder of the child class that this method calls? Should I send the address directly to the method?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question