dsf-python 3.3.1 released (successor of pydsfapi)
-
Hallo,
recently we decided to split the project DSF-APIs (https://github.com/Duet3D/DSF-APIs) into separate ones. Since this split the python part moved into dsf-python and can be found either at
Features:
- split go and python repositories
- official support of pip installer via the python package index
Bugs:
- fixed default socket file name
- deleted flush function from intercept connection
Official package can now be found at https://pypi.org/project/dsf-python/3.3.1/
Help to make this project better and report bugs, ideas or wishes here.
-
@mfs12 We are testing this out (dsf-python) and need a gentle push to get started.. This is on a RPi 4b as the SBC. DSF-Python is installed.
To test, we are using send_simple_code.py:
#!/usr/bin/env python3 """ Example of a command connection to send arbitrary commands to the machine Make sure when running this script to have access to the DSF UNIX socket owned by the dsf user. """ from dsf.connections import CommandConnection def send_simple_code(): command_connection = CommandConnection(debug=True) command_connection.connect() try: # Perform a simple command and wait for its output res = command_connection.perform_simple_code("M115") print("M115 is telling us:", res) finally: command_connection.close() if __name__ == "__main__": send_simple_code()
But receiving the following error:
from dsf.connections import CommandConnection ModuleNotFoundError: No module named 'dsf.connections'; 'dsf' is not a package
Any help would be appreciated. Once we can connect, I think we'll be in good shape. Thanks
-
Replying once more as we got this example to work from within the dsf-python/example folder. That's good, as it proves it's working, but how can we get around the error when executing the script from another folder? That's the scenario tried from my previous post..
-
@oozebot, you can install this package, and this is the recommended way except you plan to changes to dsf-python.
You have two options
system-wide:
$ pip install dsf-python
or for a single user:
$ pip install --user dsf-python
then you can import the module like any other as well.
-
-
New version released. Check...
https://forum.duet3d.com/topic/26102/dsf-python-3-3-2-released
-