Open blueclowd opened 5 years ago
Inside cmd.py:
def cmd(cmd): try: import commands return commands.getoutput(cmd) except: import subprocess return subprocess.check_output(cmd, shell = True)
May i know where is commands and subprocess??Thanks
Got it. Commands module is no longer exists in Python 3
Inside cmd.py:
def cmd(cmd): try: import commands return commands.getoutput(cmd) except: import subprocess return subprocess.check_output(cmd, shell = True)
return os.system(cmd)
May i know where is commands and subprocess??Thanks