mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-13 03:33:21 +00:00
DMM by default for dmm.py
This commit is contained in:
@@ -30,11 +30,11 @@ class DMM:
|
|||||||
def from_bytes(bytes):
|
def from_bytes(bytes):
|
||||||
return _parse(bytes.decode(ENCODING))
|
return _parse(bytes.decode(ENCODING))
|
||||||
|
|
||||||
def to_file(self, fname, tgm = True):
|
def to_file(self, fname, tgm = False):
|
||||||
with open(fname, 'w', newline='\n', encoding=ENCODING) as f:
|
with open(fname, 'w', newline='\n', encoding=ENCODING) as f:
|
||||||
(save_tgm if tgm else save_dmm)(self, f)
|
(save_tgm if tgm else save_dmm)(self, f)
|
||||||
|
|
||||||
def to_bytes(self, tgm = True):
|
def to_bytes(self, tgm = False):
|
||||||
bio = io.BytesIO()
|
bio = io.BytesIO()
|
||||||
with io.TextIOWrapper(bio, newline='\n', encoding=ENCODING) as f:
|
with io.TextIOWrapper(bio, newline='\n', encoding=ENCODING) as f:
|
||||||
(save_tgm if tgm else save_dmm)(self, f)
|
(save_tgm if tgm else save_dmm)(self, f)
|
||||||
|
|||||||
Reference in New Issue
Block a user