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 diff --git a/ImportLibrary.py b/ImportLibrary.py index 7903a2d0..16ebbd99 100644 --- a/ImportLibrary.py +++ b/ImportLibrary.py @@ -178,10 +178,14 @@ 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() + 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) @@ -525,4 +529,4 @@ def OnQuit(self, event): if __name__ == '__main__': app = TestApp(0) - app.MainLoop() \ No newline at end of file + app.MainLoop() 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