File tree Expand file tree Collapse file tree 2 files changed +10
-6
lines changed
Expand file tree Collapse file tree 2 files changed +10
-6
lines changed Original file line number Diff line number Diff line change 2626 field_data_refs ,
2727 load_antimony_file ,
2828 load_antimony_str ,
29- load_sbml_url ,
3029 load_sbml_file ,
3130 load_sbml_str ,
32- load_vcml_url ,
31+ load_sbml_url ,
3332 load_vcml_file ,
3433 load_vcml_str ,
34+ load_vcml_url ,
35+ restore_stdout ,
36+ suppress_stdout ,
3537 to_antimony_str ,
3638 to_sbml_str ,
3739 to_vcml_str ,
3840 update_biomodel ,
3941 write_antimony_file ,
4042 write_sbml_file ,
4143 write_vcml_file ,
42- suppress_stdout ,
43- restore_stdout ,
4444)
4545from pyvcell .vcml .vcml_reader import VcmlReader
4646from pyvcell .vcml .vcml_simulation import simulate
9292 "Field" ,
9393 "load_vcml_url" ,
9494 "load_sbml_url" ,
95+ "suppress_stdout" ,
96+ "restore_stdout" ,
9597]
Original file line number Diff line number Diff line change @@ -326,12 +326,14 @@ def refresh_biomodel(bio_model: Biomodel) -> Biomodel:
326326 return VcmlReader .biomodel_from_file (vcml_path = vcml_path )
327327
328328
329- def suppress_stdout ():
329+ def suppress_stdout () -> None :
330330 sys .stdout .flush () # Ensure all Python-level stdout is flushed
331331 devnull = os .open (os .devnull , os .O_WRONLY )
332332 os .dup2 (devnull , sys .stdout .fileno ())
333333
334334
335- def restore_stdout ():
335+ def restore_stdout () -> None :
336336 sys .stdout .flush ()
337+ if sys .__stdout__ is None :
338+ return
337339 os .dup2 (sys .__stdout__ .fileno (), sys .stdout .fileno ())
You can’t perform that action at this time.
0 commit comments