-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathEZSave.py
33 lines (28 loc) · 934 Bytes
/
EZSave.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
class save:
def SaveInt(self, name : str, tosave : int):
output = open(f'{name}.txt', 'w')
output.write(str(tosave))
output.close()
def GetInt(self, name : str):
inp = open(f'{name}.txt', 'r')
get = int(inp.read())
inp.close()
return get
def SetFloat(self, name : str, tosave : float):
output = open(f'{name}.txt', 'w')
output.write(str(tosave))
output.close()
def GetFloat(self, name : str):
inp = open(f'{name}.txt', 'r')
get = float(inp.read())
inp.close()
return get
def SetStr(self, name : str, tosave : str):
output = open(f'{name}.txt', 'w')
output.write(tosave)
output.close()
def GetStr(self, name : str):
inp = open(f'{name}.txt', 'r')
get = inp.read()
inp.close()
return get