Start to support version read/write

This commit is contained in:
WQY\qiong
2023-03-21 21:29:33 +08:00
parent 6ed7e00e03
commit 398ba09106
3 changed files with 12 additions and 12 deletions

View File

@@ -246,7 +246,7 @@ def parse_file(project: str, inp: str) -> None:
print(f"Total (in second): {(end-start).seconds}(s)")
def read_inp(project: str, inp: str) -> bool:
def read_inp(project: str, inp: str, version: str = '3') -> bool:
if is_project_open(project):
close_project(project)
@@ -267,7 +267,7 @@ def read_inp(project: str, inp: str) -> bool:
return True
def import_inp(project: str, cs: ChangeSet) -> bool:
def import_inp(project: str, cs: ChangeSet, version: str = '3') -> bool:
if 'inp' not in cs.operations[0]:
return False

View File

@@ -32,7 +32,7 @@ from .s27_backdrop import inp_out_backdrop
#from .s28_end import *
def dump_inp(project: str, inp: str):
def dump_inp(project: str, inp: str, version: str = '3'):
if not have_project(project):
return
@@ -144,7 +144,7 @@ def dump_inp(project: str, inp: str):
close_project(project)
def export_inp(project: str) -> ChangeSet:
def export_inp(project: str, version: str = '3') -> ChangeSet:
if not have_project(project):
return ChangeSet()