salabim 24.0.10.post4__tar.gz → 24.0.10.post5__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.10.post4 → salabim-24.0.10.post5}/PKG-INFO +1 -1
  2. {salabim-24.0.10.post4 → salabim-24.0.10.post5}/pyproject.toml +1 -1
  3. {salabim-24.0.10.post4 → salabim-24.0.10.post5}/salabim/salabim.py +15 -14
  4. {salabim-24.0.10.post4 → salabim-24.0.10.post5}/salabim.egg-info/PKG-INFO +1 -1
  5. {salabim-24.0.10.post4 → salabim-24.0.10.post5}/README.md +0 -0
  6. {salabim-24.0.10.post4 → salabim-24.0.10.post5}/salabim/DejaVuSansMono.ttf +0 -0
  7. {salabim-24.0.10.post4 → salabim-24.0.10.post5}/salabim/LICENSE.txt +0 -0
  8. {salabim-24.0.10.post4 → salabim-24.0.10.post5}/salabim/__init__.py +0 -0
  9. {salabim-24.0.10.post4 → salabim-24.0.10.post5}/salabim/calibri.ttf +0 -0
  10. {salabim-24.0.10.post4 → salabim-24.0.10.post5}/salabim/mplus-1m-regular.ttf +0 -0
  11. {salabim-24.0.10.post4 → salabim-24.0.10.post5}/salabim.egg-info/SOURCES.txt +0 -0
  12. {salabim-24.0.10.post4 → salabim-24.0.10.post5}/salabim.egg-info/dependency_links.txt +0 -0
  13. {salabim-24.0.10.post4 → salabim-24.0.10.post5}/salabim.egg-info/top_level.txt +0 -0
  14. {salabim-24.0.10.post4 → salabim-24.0.10.post5}/setup.cfg +0 -0
  15. {salabim-24.0.10.post4 → salabim-24.0.10.post5}/tests/test salabim.py +0 -0
  16. {salabim-24.0.10.post4 → salabim-24.0.10.post5}/tests/test_cap_now.py +0 -0
  17. {salabim-24.0.10.post4 → salabim-24.0.10.post5}/tests/test_componentgenerator.py +0 -0
  18. {salabim-24.0.10.post4 → salabim-24.0.10.post5}/tests/test_datetime.py +0 -0
  19. {salabim-24.0.10.post4 → salabim-24.0.10.post5}/tests/test_distributions.py +0 -0
  20. {salabim-24.0.10.post4 → salabim-24.0.10.post5}/tests/test_misc.py +0 -0
  21. {salabim-24.0.10.post4 → salabim-24.0.10.post5}/tests/test_monitor.py +0 -0
  22. {salabim-24.0.10.post4 → salabim-24.0.10.post5}/tests/test_process.py +0 -0
  23. {salabim-24.0.10.post4 → salabim-24.0.10.post5}/tests/test_queue.py +0 -0
  24. {salabim-24.0.10.post4 → salabim-24.0.10.post5}/tests/test_state.py +0 -0
  25. {salabim-24.0.10.post4 → salabim-24.0.10.post5}/tests/test_store.py +0 -0
  26. {salabim-24.0.10.post4 → salabim-24.0.10.post5}/tests/test_timeunit.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: salabim
3
- Version: 24.0.10.post4
3
+ Version: 24.0.10.post5
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.10-4"
11
+ version = "24.0.10-5"
12
12
  readme = "README.md"
13
13
  requires-python = ">=3.7"
14
14
  dependencies = [
@@ -59,7 +59,8 @@ Windows = sys.platform.startswith("win")
59
59
  PyDroid = sys.platform == "linux" and any("pydroid" in v for v in os.environ.values())
60
60
  PyPy = platform.python_implementation() == "PyPy"
61
61
  Chromebook = "penguin" in platform.uname()
62
- PythonInExcel = not ("__file__" in globals()) or ("REF" in globals()) # REF is for AnacondaCode
62
+ PythonInExcel = not ("__file__" in globals())
63
+ AnacondaCode="pyscript" in sys.modules
63
64
 
64
65
  my_globals=globals()
65
66
 
@@ -76,7 +77,7 @@ def a_log(*args):
76
77
  class g: ...
77
78
 
78
79
 
79
- if PythonInExcel:
80
+ if (PythinInExcel or AnacondaCode):
80
81
  _pie_result = []
81
82
 
82
83
  def pie_result():
@@ -10208,7 +10209,7 @@ class Environment:
10208
10209
  self.stopped = False
10209
10210
  self._paused = False
10210
10211
  self.last_s0 = ""
10211
- if PythonInExcel:
10212
+ if (PythinInExcel or AnacondaCode):
10212
10213
  self._blind_animation = True
10213
10214
  else:
10214
10215
  self._blind_animation = blind_animation
@@ -11503,7 +11504,7 @@ class Environment:
11503
11504
  if self._video_pingpong:
11504
11505
  self._images.extend(self._images[::-1])
11505
11506
  if self._video_repeat == 1: # in case of repeat == 1, loop should not be specified (otherwise, it might show twice)
11506
- if PythonInExcel: # ***
11507
+ if (PythinInExcel or AnacondaCode): # ***
11507
11508
  with b64_file_handler(self._video_name, mode="b", result=_pie_result) as f:
11508
11509
  self._images[0].save(
11509
11510
  f,
@@ -11524,7 +11525,7 @@ class Environment:
11524
11525
  optimize=False,
11525
11526
  )
11526
11527
  else:
11527
- if PythonInExcel: # ***
11528
+ if (PythinInExcel or AnacondaCode): # ***
11528
11529
  with b64_file_handler(self._video_name, mode="b", result=_pie_result) as f:
11529
11530
  self._images[0].save(
11530
11531
  f,
@@ -13113,7 +13114,7 @@ class Environment:
13113
13114
  mode = "RGB"
13114
13115
  else:
13115
13116
  raise ValueError("extension " + extension + " not supported")
13116
- if PythonInExcel:
13117
+ if (PythinInExcel or AnacondaCode):
13117
13118
  with b64_file_handler(str(filename), mode="b", result=_pie_result) as f:
13118
13119
  format = "jpeg" if extension == ".jpg" else extension[1:]
13119
13120
  self._capture_image(mode, video_mode).save(f, format=format)
@@ -14130,15 +14131,15 @@ class Environment:
14130
14131
  note that the header is only printed if trace=True
14131
14132
  """
14132
14133
  len_s1 = len(self.time_to_str(0))
14133
- self.print_trace((len_s1 - 4) * " " + "time", "current component", "action", "information", "" if PythonInExcel else "line#")
14134
- self.print_trace(len_s1 * "-", 20 * "-", 35 * "-", 48 * "-", "" if PythonInExcel else 6 * "-")
14134
+ self.print_trace((len_s1 - 4) * " " + "time", "current component", "action", "information", "" if (PythinInExcel or AnacondaCode) else "line#")
14135
+ self.print_trace(len_s1 * "-", 20 * "-", 35 * "-", 48 * "-", "" if (PythinInExcel or AnacondaCode) else 6 * "-")
14135
14136
  for ref in range(len(self._source_files)):
14136
14137
  for fullfilename, iref in self._source_files.items():
14137
14138
  if ref == iref:
14138
14139
  self._print_legend(iref)
14139
14140
 
14140
14141
  def _print_legend(self, ref):
14141
- if PythonInExcel:
14142
+ if (PythinInExcel or AnacondaCode):
14142
14143
  return
14143
14144
  if ref:
14144
14145
  s = "line numbers prefixed by " + chr(ord("A") + ref - 1) + " refer to"
@@ -14156,7 +14157,7 @@ class Environment:
14156
14157
  return self.filename_lineno_to_str(frameinfo.filename, frameinfo.lineno)
14157
14158
 
14158
14159
  def filename_lineno_to_str(self, filename, lineno):
14159
- if PythonInExcel:
14160
+ if (PythinInExcel or AnacondaCode):
14160
14161
  return "n/a"
14161
14162
  if Path(filename).name == Path(__file__).name: # internal salabim address
14162
14163
  return "n/a"
@@ -24263,7 +24264,7 @@ def _set_name(name, _nameserialize, object):
24263
24264
 
24264
24265
  @functools.lru_cache()
24265
24266
  def _screen_dimensions():
24266
- if PythonInExcel:
24267
+ if (PythinInExcel or AnacondaCode):
24267
24268
  return 1024, 768
24268
24269
  if Pythonista:
24269
24270
  screen_width, screen_height = ui.get_screen_size()
@@ -26279,7 +26280,7 @@ def _std_fonts():
26279
26280
 
26280
26281
 
26281
26282
  def fonts():
26282
- if PythonInExcel:
26283
+ if (PythinInExcel or AnacondaCode):
26283
26284
  return []
26284
26285
  if not hasattr(fonts, "font_list"):
26285
26286
  fonts.font_list = []
@@ -26552,7 +26553,7 @@ def can_animate(try_only: bool = True) -> bool:
26552
26553
  except ImportError:
26553
26554
  ImageGrab = None
26554
26555
 
26555
- if not Pythonista and not PythonInExcel:
26556
+ if not Pythonista and not (PythinInExcel or AnacondaCode):
26556
26557
  from PIL import ImageTk
26557
26558
  except ImportError:
26558
26559
  if try_only:
@@ -26561,7 +26562,7 @@ def can_animate(try_only: bool = True) -> bool:
26561
26562
 
26562
26563
  g.dummy_image = Image.new("RGBA", (1, 1), (0, 0, 0, 0))
26563
26564
 
26564
- if not Pythonista and not PythonInExcel:
26565
+ if not Pythonista and not (PythinInExcel or AnacondaCode):
26565
26566
  if PyDroid:
26566
26567
  if not g.tkinter_loaded:
26567
26568
  if try_only:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: salabim
3
- Version: 24.0.10.post4
3
+ Version: 24.0.10.post5
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