How to move to one folder back in python

后端 未结 7 2046
眼角桃花
眼角桃花 2021-01-30 09:10

Actually need to go some path and execute some command and below is the code

code:

import os
present_working_directory = \'/home/Desktop         


        
相关标签:
7条回答
  • 2021-01-30 09:48

    My problem was fixed with this command first import os and after add os.path.normpath(os.path.abspath(__file__) + os.sep + os.pardir)

    0 讨论(0)
提交回复
热议问题