Skip to content

Commit

Permalink
CAN NOW EDIT THE INTERNAL DATA HOLDER AND THE STORAGE THAT IS PROCESS…
Browse files Browse the repository at this point in the history
…ED AND TAKEN FROM, AS WELL AS THE FILE DURING RUNTIME TABTAN
  • Loading branch information
Gaurav-Ban22 committed Oct 3, 2022
1 parent f1a1e0b commit 18bbfd1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
10 changes: 5 additions & 5 deletions data.stoic
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
among
-sheesh: 2
among:
-sheesh: 2
potato: 4
test: 8
-testtest: 4
-thsisbelopw: 3
haugh
haugh:
sheeash: 4
shee
shee:
pog: 0
test: 3
test: 7
green: 2
9 changes: 4 additions & 5 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,12 +130,11 @@ def getBase(self, name):
return x

def reload(self, newData):

file = open(self.pathe, "r+")
lList = file.readlines()
for index, key in enumerate(newData.sections):
for indexo, keyo in enumerate(self.data.sections):
if key != keyo and int(index) == int(indexo):
lList[index] = (" " * newData.levels[index]) + key[0] + ": " + str(key[1]) + "\n"
lList[index] = (" " * newData.levels[index]) + key[0] + ": " + str(key[1]) + "\n"

with open(self.pathe, "w") as f:
f.writelines(lList)
Expand Down Expand Up @@ -220,8 +219,8 @@ def printOut(self):
#i just realized theres an error
print(zx)

stoic.getBase('shee').getSubsection('pog').getSubsection('test').setValue(5, stoic)
stoic.printOut()
stoic.getBase('shee').getSubsection('pog').getSubsection('test').setValue(7, stoic)
# stoic.printOut()

zx = stoic.getBase('shee').getSubsection('pog').getSubsection('test').getValue()
print(zx)
Expand Down

0 comments on commit 18bbfd1

Please sign in to comment.