Discuss / Python / db_file = os.path.join(os.path.dirname(__file__), 'test.db')运行出错啊

db_file = os.path.join(os.path.dirname(__file__), 'test.db')运行出错啊

Topic source

好像应该这样:

db_file = os.path.join(os.path.dirname('__file__'), 'test.db')

为什么呢?


  • 1

Reply