![]() If you can get a working version on Windows with the ENABLE_PYTHON and USE_PYTHON_PLUGINS switches merged I can have another look. Currently Blockly and Lua work the same way (as does the previous Python implementation) so he may have a view on the user impact of a new approach From looking at your sample Python library so seem to be suggesting a move away from the commandArray structure.Have a look at Plugins::Initialise, its pretty easy to create one rather than initialising the whole Python engine. I use this to keep plugins separated from each other and the event system needs to be separated from the plugins in the same way. Python 3 uses interpreters to create isolated Python environments within the program it is embedded in. ![]() I didn't see use of a Python interpreter in your code and you will need to use one.I believe that will be removed completely, wasn't sure what used it apart from the event system There seemed to be some references back to boost python.Do you have a VS 2017 setup? Most of the devs seem to use that first then confirm functionality on Linux. I commented out a few bits but it didn't link either. It doesn't compile for me on Windows, it passes the checks on github because ENABLE_PYTHON is disabled by default. ![]() It looks pretty good overall but I had a number of questions/comments: I'll make sure it still compiles and works (for a while) using my latest changes, and then make pull request into the python-plugins merged your pull request into the Python-Plugins path and had a look at it on the weekend. I'm not sure how to interpret the following, but I have discovered that domoticz takes longer to crash when the domotics directory are stored on a USB-drive, rather than on the raspberry pi SD-card, so I guess it might have something to do with file access. I guess porting the old code requires the least work, since namespaces are already in place, coding using python3-libraries will probably require a lot more work, but I kind of like the idea of creating a module using just python3. That also crashes the event-system as well after a while, and I kind of gave up. I got as far as creating the log-function, and a script that just logs the name of the changed device. When that failed when domoticz was run as a service, I discarded most of the old code, and tried using "pure" python libraries. First I took the existing code, updating the code using python 3 style module initializing etc, using boost compiled with python3.
0 Comments
Leave a Reply. |