salabim 24.0.11__tar.gz → 24.0.11.post1__tar.gz

Sign up to get free protection for your applications and to get access to all the features.
Files changed (26) hide show
  1. {salabim-24.0.11 → salabim-24.0.11.post1}/PKG-INFO +1 -1
  2. {salabim-24.0.11 → salabim-24.0.11.post1}/pyproject.toml +1 -1
  3. {salabim-24.0.11 → salabim-24.0.11.post1}/salabim/salabim.py +12 -15
  4. {salabim-24.0.11 → salabim-24.0.11.post1}/salabim.egg-info/PKG-INFO +1 -1
  5. {salabim-24.0.11 → salabim-24.0.11.post1}/README.md +0 -0
  6. {salabim-24.0.11 → salabim-24.0.11.post1}/salabim/DejaVuSansMono.ttf +0 -0
  7. {salabim-24.0.11 → salabim-24.0.11.post1}/salabim/LICENSE.txt +0 -0
  8. {salabim-24.0.11 → salabim-24.0.11.post1}/salabim/__init__.py +0 -0
  9. {salabim-24.0.11 → salabim-24.0.11.post1}/salabim/calibri.ttf +0 -0
  10. {salabim-24.0.11 → salabim-24.0.11.post1}/salabim/mplus-1m-regular.ttf +0 -0
  11. {salabim-24.0.11 → salabim-24.0.11.post1}/salabim.egg-info/SOURCES.txt +0 -0
  12. {salabim-24.0.11 → salabim-24.0.11.post1}/salabim.egg-info/dependency_links.txt +0 -0
  13. {salabim-24.0.11 → salabim-24.0.11.post1}/salabim.egg-info/top_level.txt +0 -0
  14. {salabim-24.0.11 → salabim-24.0.11.post1}/setup.cfg +0 -0
  15. {salabim-24.0.11 → salabim-24.0.11.post1}/tests/test salabim.py +0 -0
  16. {salabim-24.0.11 → salabim-24.0.11.post1}/tests/test_cap_now.py +0 -0
  17. {salabim-24.0.11 → salabim-24.0.11.post1}/tests/test_componentgenerator.py +0 -0
  18. {salabim-24.0.11 → salabim-24.0.11.post1}/tests/test_datetime.py +0 -0
  19. {salabim-24.0.11 → salabim-24.0.11.post1}/tests/test_distributions.py +0 -0
  20. {salabim-24.0.11 → salabim-24.0.11.post1}/tests/test_misc.py +0 -0
  21. {salabim-24.0.11 → salabim-24.0.11.post1}/tests/test_monitor.py +0 -0
  22. {salabim-24.0.11 → salabim-24.0.11.post1}/tests/test_process.py +0 -0
  23. {salabim-24.0.11 → salabim-24.0.11.post1}/tests/test_queue.py +0 -0
  24. {salabim-24.0.11 → salabim-24.0.11.post1}/tests/test_state.py +0 -0
  25. {salabim-24.0.11 → salabim-24.0.11.post1}/tests/test_store.py +0 -0
  26. {salabim-24.0.11 → salabim-24.0.11.post1}/tests/test_timeunit.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: salabim
3
- Version: 24.0.11
3
+ Version: 24.0.11.post1
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
@@ -8,7 +8,7 @@ authors = [
8
8
  {name = "Ruud van der Ham", email = "rt.van.der.ham@gmail.com"}
9
9
  ]
10
10
  description = "salabim - discrete event simulation in Python"
11
- version = "24.0.11"
11
+ version = "24.0.11-1"
12
12
  readme = "README.md"
13
13
  requires-python = ">=3.7"
14
14
  dependencies = [
@@ -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):
@@ -151,9 +151,11 @@ if Pythonista:
151
151
  inf = float("inf")
152
152
  nan = float("nan")
153
153
 
154
- _yieldless = not Pythonista # True, unless running under Pythonista
155
-
156
-
154
+ if Pythonista or AnacondaCode or PythonInExcel:
155
+ _yieldless = False
156
+ else:
157
+ _yieldless=True
158
+
157
159
  class QueueFullError(Exception):
158
160
  pass
159
161
 
@@ -26942,6 +26944,7 @@ def reset() -> None:
26942
26944
  g.tkinter_loaded = "?"
26943
26945
  g.image_container_cache = {}
26944
26946
  g._default_cap_now = False
26947
+ g._captured_stdout=[]
26945
26948
 
26946
26949
  random_seed() # always start with seed 1234567
26947
26950
 
@@ -26999,15 +27002,11 @@ Environment.{name}.__doc__ = {name}.__doc__"""
26999
27002
  exec(f"Environment.{name}={name}")
27000
27003
 
27001
27004
 
27002
- _captured_store = []
27003
-
27004
-
27005
27005
  def clear_captured_stdout():
27006
27006
  """
27007
27007
  empties the captured stdout
27008
27008
  """
27009
- global _captured_store
27010
- _captured_store.clear()
27009
+ g._captured_stdout.clear()
27011
27010
 
27012
27011
 
27013
27012
  def captured_stdout_as_str() -> str:
@@ -27019,7 +27018,7 @@ def captured_stdout_as_str() -> str:
27019
27018
  captured stdout : str
27020
27019
  """
27021
27020
 
27022
- return "".join(_captured_store)
27021
+ return "".join(g._captured_stdout)
27023
27022
 
27024
27023
 
27025
27024
  def captured_stdout_as_file(file: Union[str, Path, "file"], mode: str = None):
@@ -27097,16 +27096,14 @@ class capture_stdout:
27097
27096
  sys.stdout = self.stdout
27098
27097
 
27099
27098
  def write(self, data):
27100
- global _captured_store
27101
- _captured_store.append(data)
27099
+ g._captured_stdout.append(data)
27102
27100
  if self.include_print:
27103
27101
  self.stdout.write(data)
27104
27102
 
27105
27103
  def flush(self):
27106
- global _captured_store
27107
27104
  if self.include_print:
27108
27105
  self.stdout.flush()
27109
- _captured_store.append("\n")
27106
+ g._captured_stdout.append("\n")
27110
27107
 
27111
27108
 
27112
27109
  class redirect_stdout:
@@ -27164,7 +27161,7 @@ class redirect_stdout:
27164
27161
  self.close()
27165
27162
 
27166
27163
  def write(self, data):
27167
- global _captured_store
27164
+ global _captured_stdout
27168
27165
  self.file.write(data)
27169
27166
  if self.include_print:
27170
27167
  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.post1
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
File without changes
File without changes