admin管理员组

文章数量:1302273

Previously, in PyCharm I was able to run this line of the code and it would set the working directory as the current directory of the script that I was running.

sys.path.append(os.getcwd())
prem_20_22_query = open('sql/prem_20_22.txt').read()

However, now the os.getcwd() command returns the C drive as the default CWD.

'C:\Windows'

本文标签: pythonPycharm not recognizing the CWD of the scriptStack Overflow