Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- x = input("introduce el comando: ")
- subprocess.call([x, ''], shell=True)
- subprocess.call('cd ..', shell=True)
- def back():
- path=os.getcwd()
- print path
- s=path.split('\')
- length=len(s)
- x=0
- while x<(length-1):
- if x==0:
- back_path=s[x]+"\"
- else:
- back_path=back_path+s[x]+"\"
- x+=1
- os.chdir(back_path)
- os.chdir("..")
- os.system(“el codigo en bash a ejecutar”)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement