From aef1c39a47adc3db9e1804d6d340900baf4654c6 Mon Sep 17 00:00:00 2001 From: Capocchi L Date: Wed, 26 Feb 2020 16:29:50 +0100 Subject: [PATCH 1/4] bug fix --- Components.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Components.py b/Components.py index 0fc0d931..f4d97cfa 100644 --- a/Components.py +++ b/Components.py @@ -767,12 +767,13 @@ def GetBlock(filename, label): @param canvas: position of block is performed depending on canvas """ + ### exclude all chinese character (just for mac) + if wx.Platform == '__WXMAC__': + L = re.findall(u'[^\u4E00-\u9FA5]', filename) + filename = ''.join(filename) + ext = os.path.splitext(filename)[-1] - if wx.Platform == '__WXMAC__': - ### exclude all chinese character (just for mac) - filename = ''.join(re.findall(u'[^\u4E00-\u9FA5]', filename)) - ### catch candidtate class from extention if ext == '.amd': cls = AMDComponent From 63c77e80168b9ce91153c9ec3e92cb915ab511ee Mon Sep 17 00:00:00 2001 From: Capocchi L Date: Wed, 26 Feb 2020 16:47:56 +0100 Subject: [PATCH 2/4] Update README.md --- README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index 21dbaed5..830c49c2 100644 --- a/README.md +++ b/README.md @@ -6,12 +6,10 @@ # What is DEVSimPy -

DEVSimPy is an open Source project (under GPL V.3 license) supported by the [SPE](http://http://spe.univ-corse.fr/) (Sciences pour l'Environnement) team of the UMR CNRS 6134 Lab. of the [University of Corsica "Pasquale Paoli"](http://univ-corse.fr). This aim is to provide a GUI for the Modeling & Simulation of PyDEVS and [PyPDEVS](http://msdl.cs.mcgill.ca/projects/DEVS/PythonPDEVS) models. PyDEVS is an API allowing the implementation of the DEVS formalism in Python language. PyPDEVS is the parallel version of PyDEVS based on Parallel DEVS formalism which is an extension of the DEVS formalism. The DEVSimPy environment has been developed in Python with the [wxPython](http://www.wxpython.org) graphical library without strong dependencies other than the [Scipy](http://www.scipy.org) and the [Numpy](http://www.numpy.org) scientific python libraries. The basic idea behind DEVSimPy is to wrap the PyDEVS API with a GUI allowing significant simplification of handling PyDEVS/PyPDEVS models (like the coupling between models or their storage into libraries). -

# Requirements The use of DEVSimPy requires: @@ -47,6 +45,7 @@ All dependencies can be installed using requirements.txt file: ```sh $ pip install -r requirements.txt ``` +For os X users, python.app is required in order to use pythonw instead of python to execute the devismpy.py file. DEVSimPy don't require installation and works on all platforms (). To execute DEVSimPy: ```sh From cc5b98236356dce0ba40d760c3a2fd71c6d0330d Mon Sep 17 00:00:00 2001 From: lcapocchi Date: Fri, 6 Mar 2020 03:25:27 -0500 Subject: [PATCH 3/4] bug fix for macos and linux --- ImportLibrary.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/ImportLibrary.py b/ImportLibrary.py index 7903a2d0..3262e36c 100644 --- a/ImportLibrary.py +++ b/ImportLibrary.py @@ -178,10 +178,12 @@ def __init__(self, *args, **kwargs): self._cb = CheckListCtrl(rightPanel) try: - ### Populate Check List dynamicaly - pool = ThreadPoolExecutor(3) - future = pool.submit(self._cb.Populate, (D)) - future.done() + ### Populate Check List dynamicaly + with ThreadPoolExecutor(max_workers=5) as executor: + executor.submit(self._cb.Populate, (D)) + #pool = ThreadPoolExecutor(3) + #future = pool.submit(self._cb.Populate, (D)) + #future.done() except: self._cb.Populate(D) @@ -525,4 +527,4 @@ def OnQuit(self, event): if __name__ == '__main__': app = TestApp(0) - app.MainLoop() \ No newline at end of file + app.MainLoop() From a6f3eba1b986ee31c02f25ec1b6b76199ea0b295 Mon Sep 17 00:00:00 2001 From: Capocchi L Date: Fri, 6 Mar 2020 09:38:11 +0100 Subject: [PATCH 4/4] bug fix for windows --- ImportLibrary.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/ImportLibrary.py b/ImportLibrary.py index 3262e36c..16ebbd99 100644 --- a/ImportLibrary.py +++ b/ImportLibrary.py @@ -178,12 +178,14 @@ def __init__(self, *args, **kwargs): self._cb = CheckListCtrl(rightPanel) try: - ### Populate Check List dynamicaly - with ThreadPoolExecutor(max_workers=5) as executor: - executor.submit(self._cb.Populate, (D)) - #pool = ThreadPoolExecutor(3) - #future = pool.submit(self._cb.Populate, (D)) - #future.done() + if wx.Platform == '__WXMSW__': + pool = ThreadPoolExecutor(3) + future = pool.submit(self._cb.Populate, (D)) + future.done() + else: + ### Populate Check List dynamicaly + with ThreadPoolExecutor(max_workers=5) as executor: + executor.submit(self._cb.Populate, (D)) except: self._cb.Populate(D)