Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- s = str(input('Enter command'))
- if 'cd' not in s:
- out = os.popen(s).read()
- print(out)
- else:
- try:
- sh.cd(s[s.index("d")+2:])
- print(f'''Changed directory to {s[s.index("d")+2:]}''')
- except:
- print("Something went not right.....")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement