Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 4. Upgrading an existing configuration for remapping
- The minimal prerequisites for using REMAP statements are as follows:
- the Python plugin must be activated by specifying a [PYTHON]TOPLEVEL=<path-to-toplevel-script> in the ini file.
- the toplevel script needs to import the remap module, which can be initially empty, but the import needs to be in place.
- The Python interpreter needs to find the remap.py module above, so the path to the directory where your Python modules live needs to be added with [PYTHON]APPEND=<path-to-your-local-Python-directory>
- Recommended: import the stdglue handlers in the remap module. In this case Python also needs to find stdglue.py - we just copy it from the distribution so you can make local changes as needed. Depending on your installation the path to stdglue.py might vary.
- Assuming your configuration lives under /home/user/xxx and the ini file is /home/user/xxx/xxx.ini, execute the following commands.
- cd /home/user/xxx
- mkdir python
- cd python
- cp /home/cinci15cc/linuxcnc-dev/nc_files/remap_lib/python-stdglue/stdglue.py .
- echo 'from stdglue import *' >remap.py
- echo 'import remap' >toplevel.py
- Now edit /home/user/xxx/xxx.ini and add the following:
- [PYTHON]
- TOPLEVEL=/home/user/xxx/python/toplevel.py
- PATH_APPEND=/home/user/xxx/python
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement