最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

python - Pycharm not recognizing the CWD of the script - Stack Overflow

programmeradmin1浏览0评论

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'

发布评论

评论列表(0)

  1. 暂无评论