Python not importing module from same directory
Question:
Expecting it to open the file to access a class.
Code is as follows:
import pandas as pd
import os
print("Working dir:", os.getcwd())
import OfficeContextAgent
Answers:
Make sure that you name the file OfficeContextAgent.py and not just OfficeContextAgent. Python modules end in .py [ docs.python.org entry on modules ]
Expecting it to open the file to access a class.
Code is as follows:
import pandas as pd
import os
print("Working dir:", os.getcwd())
import OfficeContextAgent
Make sure that you name the file OfficeContextAgent.py and not just OfficeContextAgent. Python modules end in .py [ docs.python.org entry on modules ]