salabim 24.0.10.post4__tar.gz → 24.0.10.post7__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {salabim-24.0.10.post4 → salabim-24.0.10.post7}/PKG-INFO +1 -1
- {salabim-24.0.10.post4 → salabim-24.0.10.post7}/pyproject.toml +1 -1
- {salabim-24.0.10.post4 → salabim-24.0.10.post7}/salabim/salabim.py +15 -14
- {salabim-24.0.10.post4 → salabim-24.0.10.post7}/salabim.egg-info/PKG-INFO +1 -1
- {salabim-24.0.10.post4 → salabim-24.0.10.post7}/README.md +0 -0
- {salabim-24.0.10.post4 → salabim-24.0.10.post7}/salabim/DejaVuSansMono.ttf +0 -0
- {salabim-24.0.10.post4 → salabim-24.0.10.post7}/salabim/LICENSE.txt +0 -0
- {salabim-24.0.10.post4 → salabim-24.0.10.post7}/salabim/__init__.py +0 -0
- {salabim-24.0.10.post4 → salabim-24.0.10.post7}/salabim/calibri.ttf +0 -0
- {salabim-24.0.10.post4 → salabim-24.0.10.post7}/salabim/mplus-1m-regular.ttf +0 -0
- {salabim-24.0.10.post4 → salabim-24.0.10.post7}/salabim.egg-info/SOURCES.txt +0 -0
- {salabim-24.0.10.post4 → salabim-24.0.10.post7}/salabim.egg-info/dependency_links.txt +0 -0
- {salabim-24.0.10.post4 → salabim-24.0.10.post7}/salabim.egg-info/top_level.txt +0 -0
- {salabim-24.0.10.post4 → salabim-24.0.10.post7}/setup.cfg +0 -0
- {salabim-24.0.10.post4 → salabim-24.0.10.post7}/tests/test salabim.py +0 -0
- {salabim-24.0.10.post4 → salabim-24.0.10.post7}/tests/test_cap_now.py +0 -0
- {salabim-24.0.10.post4 → salabim-24.0.10.post7}/tests/test_componentgenerator.py +0 -0
- {salabim-24.0.10.post4 → salabim-24.0.10.post7}/tests/test_datetime.py +0 -0
- {salabim-24.0.10.post4 → salabim-24.0.10.post7}/tests/test_distributions.py +0 -0
- {salabim-24.0.10.post4 → salabim-24.0.10.post7}/tests/test_misc.py +0 -0
- {salabim-24.0.10.post4 → salabim-24.0.10.post7}/tests/test_monitor.py +0 -0
- {salabim-24.0.10.post4 → salabim-24.0.10.post7}/tests/test_process.py +0 -0
- {salabim-24.0.10.post4 → salabim-24.0.10.post7}/tests/test_queue.py +0 -0
- {salabim-24.0.10.post4 → salabim-24.0.10.post7}/tests/test_state.py +0 -0
- {salabim-24.0.10.post4 → salabim-24.0.10.post7}/tests/test_store.py +0 -0
- {salabim-24.0.10.post4 → salabim-24.0.10.post7}/tests/test_timeunit.py +0 -0
@@ -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-
|
11
|
+
version = "24.0.10-7"
|
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())
|
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 (PythonInExcel 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 (PythonInExcel 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 (PythonInExcel 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 (PythonInExcel 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 (PythonInExcel 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 (PythonInExcel or AnacondaCode) else "line#")
|
14135
|
+
self.print_trace(len_s1 * "-", 20 * "-", 35 * "-", 48 * "-", "" if (PythonInExcel 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 (PythonInExcel 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 (PythonInExcel 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 (PythonInExcel 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 (PythonInExcel 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 (PythonInExcel 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 (PythonInExcel or AnacondaCode):
|
26565
26566
|
if PyDroid:
|
26566
26567
|
if not g.tkinter_loaded:
|
26567
26568
|
if try_only:
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|