salabim 24.0.11__py3-none-any.whl → 24.0.11.post0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
salabim/salabim.py CHANGED
@@ -60,7 +60,7 @@ PyDroid = sys.platform == "linux" and any("pydroid" in v for v in os.environ.val
60
60
  PyPy = platform.python_implementation() == "PyPy"
61
61
  Chromebook = "penguin" in platform.uname()
62
62
  PythonInExcel = not ("__file__" in globals())
63
- AnacondaCode = "pyscript" in sys.modules
63
+ AnacondaCode = sys.platform=="emscripten"
64
64
 
65
65
 
66
66
  def a_log(*args):
@@ -26942,6 +26942,7 @@ def reset() -> None:
26942
26942
  g.tkinter_loaded = "?"
26943
26943
  g.image_container_cache = {}
26944
26944
  g._default_cap_now = False
26945
+ g._captured_stdout=[]
26945
26946
 
26946
26947
  random_seed() # always start with seed 1234567
26947
26948
 
@@ -26999,15 +27000,11 @@ Environment.{name}.__doc__ = {name}.__doc__"""
26999
27000
  exec(f"Environment.{name}={name}")
27000
27001
 
27001
27002
 
27002
- _captured_store = []
27003
-
27004
-
27005
27003
  def clear_captured_stdout():
27006
27004
  """
27007
27005
  empties the captured stdout
27008
27006
  """
27009
- global _captured_store
27010
- _captured_store.clear()
27007
+ g._captured_stdout.clear()
27011
27008
 
27012
27009
 
27013
27010
  def captured_stdout_as_str() -> str:
@@ -27019,7 +27016,7 @@ def captured_stdout_as_str() -> str:
27019
27016
  captured stdout : str
27020
27017
  """
27021
27018
 
27022
- return "".join(_captured_store)
27019
+ return "".join(g._captured_stdout)
27023
27020
 
27024
27021
 
27025
27022
  def captured_stdout_as_file(file: Union[str, Path, "file"], mode: str = None):
@@ -27097,16 +27094,14 @@ class capture_stdout:
27097
27094
  sys.stdout = self.stdout
27098
27095
 
27099
27096
  def write(self, data):
27100
- global _captured_store
27101
- _captured_store.append(data)
27097
+ g._captured_stdout.append(data)
27102
27098
  if self.include_print:
27103
27099
  self.stdout.write(data)
27104
27100
 
27105
27101
  def flush(self):
27106
- global _captured_store
27107
27102
  if self.include_print:
27108
27103
  self.stdout.flush()
27109
- _captured_store.append("\n")
27104
+ g._captured_stdout.append("\n")
27110
27105
 
27111
27106
 
27112
27107
  class redirect_stdout:
@@ -27164,7 +27159,7 @@ class redirect_stdout:
27164
27159
  self.close()
27165
27160
 
27166
27161
  def write(self, data):
27167
- global _captured_store
27162
+ global _captured_stdout
27168
27163
  self.file.write(data)
27169
27164
  if self.include_print:
27170
27165
  self.stdout.write(data)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: salabim
3
- Version: 24.0.11
3
+ Version: 24.0.11.post0
4
4
  Summary: salabim - discrete event simulation in Python
5
5
  Author-email: Ruud van der Ham <rt.van.der.ham@gmail.com>
6
6
  Project-URL: Homepage, https://salabim.org
@@ -0,0 +1,10 @@
1
+ salabim/DejaVuSansMono.ttf,sha256=Z_oIXp5yp1Zaw2y2p3vaxwHhjHpG0MFbmwhxSh4aIEI,335068
2
+ salabim/LICENSE.txt,sha256=qHlBa-POyexatCxDTjSKMlYtkBFQDn9lu-YV_1L6V0U,1106
3
+ salabim/__init__.py,sha256=r7qPLvlmX0dkZDyjuTo8Jo3ex3sD1L4pmK6K5ib9vyw,56
4
+ salabim/calibri.ttf,sha256=RWpf8Uo31RfvGGNaSt9-2sXSuN87AVE_NFMRsV3LhBk,1330156
5
+ salabim/mplus-1m-regular.ttf,sha256=EuFHr90BJjuAn_r5MleJFN-WfkeWJ4tf7DweI5zr8tU,289812
6
+ salabim/salabim.py,sha256=OS8-t8T0hAAM4-VScSc4cJQSw1od-Grb2qZVCa1EJ_0,1097255
7
+ salabim-24.0.11.post0.dist-info/METADATA,sha256=nwX2_geOVzA3laKSeaLwg0_oxb_uaGy-cjUaIm7txBs,3456
8
+ salabim-24.0.11.post0.dist-info/WHEEL,sha256=Mdi9PDNwEZptOjTlUcAth7XJDFtKrHYaQMPulZeBCiQ,91
9
+ salabim-24.0.11.post0.dist-info/top_level.txt,sha256=UE6zVlbi3F6T5ma1a_5TrojMaF21GYKDt9svvm0U4cQ,8
10
+ salabim-24.0.11.post0.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (72.2.0)
2
+ Generator: setuptools (73.0.1)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -1,10 +0,0 @@
1
- salabim/DejaVuSansMono.ttf,sha256=Z_oIXp5yp1Zaw2y2p3vaxwHhjHpG0MFbmwhxSh4aIEI,335068
2
- salabim/LICENSE.txt,sha256=qHlBa-POyexatCxDTjSKMlYtkBFQDn9lu-YV_1L6V0U,1106
3
- salabim/__init__.py,sha256=r7qPLvlmX0dkZDyjuTo8Jo3ex3sD1L4pmK6K5ib9vyw,56
4
- salabim/calibri.ttf,sha256=RWpf8Uo31RfvGGNaSt9-2sXSuN87AVE_NFMRsV3LhBk,1330156
5
- salabim/mplus-1m-regular.ttf,sha256=EuFHr90BJjuAn_r5MleJFN-WfkeWJ4tf7DweI5zr8tU,289812
6
- salabim/salabim.py,sha256=4_MnkDN-cbMTmgGsSe0GVWTMDO1Bwk9tzArOUmdx8Yg,1097327
7
- salabim-24.0.11.dist-info/METADATA,sha256=GvOkBsH4ol5LofjZg7u_Qe4ZakqGpoIULeHC676vAe0,3450
8
- salabim-24.0.11.dist-info/WHEEL,sha256=HiCZjzuy6Dw0hdX5R3LCFPDmFS4BWl8H-8W39XfmgX4,91
9
- salabim-24.0.11.dist-info/top_level.txt,sha256=UE6zVlbi3F6T5ma1a_5TrojMaF21GYKDt9svvm0U4cQ,8
10
- salabim-24.0.11.dist-info/RECORD,,