Address some issues of the example apps - #59
Open
pheest wants to merge 1 commit into
Open
Conversation
Changed Python files to work with Python3. Added bplstorage.db to the relevant makefile.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When I open the box on a module like pyDevSup, the first thing I'm going to seek to do is run the example apps.
These do not currently work for the reasons outlined below.
This tends to give a less than ideal first impression.
In my view, the examples need maintenance and upgrade.
I deem it reasonable to assume that 64-bit Linux and Windows will be used.
For Windows use, I have written batch script(s) that extract PY_VER and PY_LIBDIRS by parsing the CONFIG_PY.Common.windows-x64 file.
PY_VER is used for launching the IOC irrespective of which Python version has been used to build the code.
PY_LIBDIRS is then used to find the Python install directory, in my case e.g. C:\Python313(\libs removed). This is used to provide the PATH to python.dll.
I lack the Linux/bash skill to do something similar for use there.
Users can of course edit the st.cmd file to launch the desired softIocPy%PY_VER%
In disect.py, InstanceType is imported is imported for Python2 usage.
This will fail with Python3 and the exception is caught.
The value of InstanceType is checked for None later.
However in these circumstances the value is not None but undefined, causing the application to fail.
disect.py is used by iocFPM and iocweatherbnl.
I have removed the Python2 usage altogether.
Of the 5 example apps:
The iocapplmon module is dependant on archApp\bplreport.py which I updated to use Python 3 rather than Python 2.
It is also dependant on the bplstorage.db. It needed to be added to the makefile.
The module now runs (on Windows and Linux), but it cannot work because the address capp02.cs.nsls2.local:17665 is not accessible.
I also tried arcapp01.cs.nsls2.local:17665.
This address may have been changed, or possibly is not accessible to unauthenticated users?
@mdavidsaver would you be able to advise about this? Thanks.