-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSeroScriptModule.py
More file actions
107 lines (85 loc) · 2.75 KB
/
Copy pathSeroScriptModule.py
File metadata and controls
107 lines (85 loc) · 2.75 KB
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
scriptnameEN = "SeroScript"
scriptnameKR = "새로스크립트"
scriptversion = "1.0"
def 강제종료(errorcode):
print(f"\n프로그램이 강제 종료 됬습나다. 종료 품목 번호: {errorcode}")
exit()
def warning(input):
print(f"\033[91m{input}\033[0m")
def 출력(input):
try:
print(input)
except:
warning("출력의 입력 형식이 올바르지 않습니다.")
강제종료(1)
def 만약(ifstatementfunc, executedcode):
try:
if f"{ifstatementfunc}":
exec(executedcode)
except:
warning("만약: 형식 오류")
강제종료(1)
def 길이(listinput):
return(len(listinput))
def 목록(listinput):
return(list(listinput))
def 반올림(numberinput):
return(int(round(numberinput)))
def 참일때(forstatementfunc, executedcode):
while f"{forstatementfunc}":
exec(executedcode)
def 입력(output):
return(input(output))
def 변수(variable, function, value):
globalvar = globals()
if variable not in globalvar:
globalvar[variable] = 0
if function == "더하기":
globalvar[variable] += value
elif function == "설정":
globalvar[variable] = value
elif function == "wassp":
globalvar[variable] = value
def 변수값(variable):
try:
globalvar = globals()
return globalvar[variable]
except:
warning("변수값 형식이 틀리거나 변수가 정의되지 않았습니다.")
강제종료(1)
def 예외처리(trycode,exceptcode):
try:
exec(trycode)
except:
exec(exceptcode)
def 숫자변환(number):
try:
return(int(number))
except:
warning("숫자변환 입력이 올바른 정수가 아닙니다.")
강제종료(1)
def 글자변환(input):
try:
return(str(input))
except:
warning("글자 변환 입력이 올바르지 않습니다.")
강제종료(1)
def 경고(input):
warning(input)
def 줄바꿈(times):
for i in range(times):
print()
def 도움이():
print(f"{scriptnameKR} {scriptversion} 도움이:")
print(f"{scriptnameEN} {scriptversion} Documentation:")
print("문서 자료가 아직 없습니다.")
def 버전():
print(f"{scriptnameKR} {scriptversion} 버전입니다.")
print(f"{scriptnameEN} V{scriptversion} by nohYoom")
def 도움이():
print(f"{scriptnameKR} {scriptversion} 도움이:")
print(f"{scriptnameEN} {scriptversion} Documentation:")
print("문서 자료가 아직 없습니다.")
def 버전():
print(f"{scriptnameKR} {scriptversion} 버전입니다.")
print(f"{scriptnameEN} V{scriptversion} by nohYoom")