MCPcopy Create free account
hub / github.com/chasingboy/Xtools / exec_command

Function exec_command

utils.py:238–247  ·  view source on GitHub ↗
(cmd)

Source from the content-addressed store, hash-verified

236
237
238def exec_command(cmd):
239 if platform == 'windows':
240 os.system('start cmd /k ' + cmd)
241 elif platform == 'osx':
242 tell.app('Terminal','do script"{cmd}"'.format(cmd=cmd),background=True)
243
244 elif platform == 'linux':
245 os.system("gnome-terminal -e 'bash -c \"{cmd}\"'".format(cmd=cmd))
246 else:
247 sublime.message_dialog('[waring] <Run Command> module is not supported this system')
248
249
250def write_file(workdir,text):

Callers 2

runMethod · 0.85
runMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected