Skip to content
Snippets Groups Projects
Commit c1f52c46 authored by Faris Hasim Syauqi's avatar Faris Hasim Syauqi
Browse files

update file to segment

parent 0fd2dfdc
Branches
No related merge requests found
from typing import List
from segment import *
class FileBuffer:
def __init__(self):
pass
def read(self, filename) -> List[Segment]:
# To-Do
# return array of segment
return
def write(self, segments:List[Segment], filename):
# To-Do
# write array of segment to file
return
...@@ -140,4 +140,5 @@ if __name__=="__main__": ...@@ -140,4 +140,5 @@ if __name__=="__main__":
seg.set_checksum(seg.count_checksum()) seg.set_checksum(seg.count_checksum())
seg.log() seg.log()
file = open("halo.txt", 'r')
seg.to_file("out.txt") seg.to_file("out.txt")
\ No newline at end of file
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment