Skip to content

Commit

Permalink
Deal with tempfile on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcCote committed May 17, 2024
1 parent c1ccc6c commit 2ca446e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Binary file modified scienceworld/scienceworld.jar
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package scienceworld.runtime.pythonapi

import java.io.PrintWriter
import java.io.{File, FileOutputStream,PrintWriter}

import main.scala.scienceworld.runtime.SimplifierProcessor
import scienceworld.environments.EnvironmentMaker
Expand Down Expand Up @@ -331,7 +331,8 @@ class PythonInterface() {
val objTree = agentInterface.get.universe.toJSON()
if (path == "") return objTree

val pw = new PrintWriter(path)
val f = new File(path);
var pw = new PrintWriter(new FileOutputStream(f));
pw.print(objTree)
pw.close()
return ""
Expand Down

0 comments on commit 2ca446e

Please sign in to comment.