feat: reads potentions from ljc file
This commit is contained in:
@@ -1,12 +1,10 @@
|
||||
import subprocess
|
||||
from typing import Final
|
||||
|
||||
import diceplayer.dice.dice_input as dice_input
|
||||
|
||||
from pathlib import Path
|
||||
|
||||
from diceplayer.config import DiceConfig
|
||||
|
||||
import subprocess
|
||||
from pathlib import Path
|
||||
from typing import Final
|
||||
|
||||
|
||||
DICE_FLAG_LINE: Final[int] = -2
|
||||
DICE_END_FLAG: Final[str] = "End of simulation"
|
||||
@@ -22,8 +20,9 @@ class DiceWrapper:
|
||||
output_path = input_path.parent / (input_path.name + ".out")
|
||||
|
||||
with open(output_path, "w") as outfile, open(input_path, "r") as infile:
|
||||
bin_path = self.dice_config.progname.expanduser()
|
||||
exit_status = subprocess.call(
|
||||
self.dice_config.progname, stdin=infile, stdout=outfile
|
||||
bin_path, stdin=infile, stdout=outfile, cwd=self.working_directory
|
||||
)
|
||||
|
||||
if exit_status != 0:
|
||||
@@ -38,4 +37,3 @@ class DiceWrapper:
|
||||
|
||||
def extract_results(self) -> dict:
|
||||
return {}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user