repl.it
@AlexanderHall4/

ARS Vstripped

Python

the first official release of ARS discord

fork
loading
Files
  • main.py
  • main.ARS
main.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
#class for reading and writing to files
class tree:
  def r(a):
    c = open(a, "r")
    return c.read()
    c.close()
imput = {}
z = True
#trys to load from main
try:
  b = tree.r("main.ARS").split(";")
  for i in range(len(b)):
    c = b[i].split(".")
    imput[c[0]] = c[1]  
except:
  pass
#start of code-------------------
helptext = ("""commands are: 
;list | lists all possible inputs 
;exit | stops the program""")
print("""
PyARS Discord Edition \nBy Alex Hall\n
%s\n""" % helptext)
#setup for "a" value and resetting logic items
while True:
  a = input()
  save = ""
  z = True
  if a != "":
#command inputs / text inputs checker
    if a[0] == ";" and a != ";":
      a1 = list(imput.keys())
#;list cmd
      if a == ";list":
        for i in range(len(a1)):
          save += (";%s; | " %(a1[i]))
        print(save)
#;exit cmd
      elif a == ";exit":
        print("exiting")
        break
#end adding text, interpreter below
    else:
      if imput != {} and a in imput.keys():
        print(imput[a])
?