MilesCranmer commited on
Commit
6a5e90d
·
1 Parent(s): e1ac1c9

Let Julia not PyJulia evaluate runfile

Browse files
Files changed (1) hide show
  1. pysr/sr.py +1 -3
pysr/sr.py CHANGED
@@ -518,10 +518,8 @@ def pysr(
518
  global already_ran_with_pyjulia
519
  if pyjulia:
520
  # Read entire file as a single string:
521
- with open(kwargs["runfile_filename"], "r") as f:
522
- runfile_string = f.read()
523
  print("Running main runfile in PyJulia!")
524
- Main.eval(runfile_string)
525
  already_ran_with_pyjulia = True
526
  else:
527
  _final_pysr_process(**kwargs)
 
518
  global already_ran_with_pyjulia
519
  if pyjulia:
520
  # Read entire file as a single string:
 
 
521
  print("Running main runfile in PyJulia!")
522
+ Main.eval(f"include('{_escape_filename(kwargs['runfile_filename'])}')")
523
  already_ran_with_pyjulia = True
524
  else:
525
  _final_pysr_process(**kwargs)