How to move to one folder back in python

后端 未结 7 2173
眼角桃花
眼角桃花 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)

提交回复
热议问题