/
cmd.py
58 lines (44 loc) · 1.66 KB
/
cmd.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# uncompyle6 version 2.9.10
# Python bytecode 2.7 (62211)
# Decompiled from: Python 2.7.10 (default, Feb 6 2017, 23:53:20)
# [GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.34)]
# Embedded file name: cmd.py
import _dsz
import sys
def LastId():
return _dsz.dszObj.cmd_get_last_id()
def Prompt(c, flags=0, checkForStop=True):
if checkForStop and _dsz.dszObj.check_for_stop():
sys.exit(-1)
if _dsz.dszObj.prompt("Do you want to run command '%s'?" % c, True):
return _dsz.dszObj.run(c, flags)
else:
return False
def Run(c, flags=0, checkForStop=True):
if checkForStop and _dsz.dszObj.check_for_stop():
sys.exit(-1)
rtn = _dsz.dszObj.run(c, flags)
return rtn[0]
def RunEx(c, flags=0, checkForStop=True):
if checkForStop and _dsz.dszObj.check_for_stop():
sys.exit(-1)
return _dsz.dszObj.run(c, flags)
class data:
def Clear(cmdId):
return _dsz.dszObj.cmd_data_clear(cmdId)
def Get(name, type, cmdId=0, checkForStop=True):
if checkForStop and _dsz.dszObj.check_for_stop():
sys.exit(-1)
return _dsz.dszObj.cmd_data_get(name, type, cmdId)
def ObjectGet(obj, name, type, cmdId=0, checkForStop=True):
if checkForStop and _dsz.dszObj.check_for_stop():
sys.exit(-1)
return _dsz.dszObj.cmd_data_obj_get(obj, name, type, cmdId)
def Size(name, cmdId=0, checkForStop=True):
if checkForStop and _dsz.dszObj.check_for_stop():
sys.exit(-1)
return _dsz.dszObj.cmd_data_get_size(name, cmdId)
Clear = staticmethod(Clear)
Get = staticmethod(Get)
ObjectGet = staticmethod(ObjectGet)
Size = staticmethod(Size)