Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop Python bindings? #66

Open
simonvanderveldt opened this issue Nov 17, 2019 · 10 comments
Open

Drop Python bindings? #66

simonvanderveldt opened this issue Nov 17, 2019 · 10 comments
Assignees

Comments

@simonvanderveldt
Copy link
Member

As mentioned by @artfwo in #65

I've never heard of anybody using the libmonome's python bindings though, so we could as well deprecate them.

Would it be an idea to simply remove the Python bindings?

@artfwo I assume that most people would/should be using pymonome instead?
Are there any advantages to libmonome's Python bindings over pymonome?

@artfwo
Copy link
Member

artfwo commented Nov 17, 2019

@artfwo I assume that most people would/should be using pymonome instead?

generally, yes, reasons are: there's a tutorial on grid studies, the API is a bit more pythonic, it uses the OSC protocol and so handles multiple devices gracefully.

Are there any advantages to libmonome's Python bindings over pymonome?

It doesn't need serialosc, but then again, i don't know if that's an advantage - the rest of "bindings" we have on grid studies also depend on serialosc.

For extreme cases you can always use pyserial with standardised event loops, which I think I would prefer over libmonome's module.

@tehn
Copy link
Member

tehn commented Nov 17, 2019

i'd be fine dropping it, but i'm also not aware if anyone is actually using it. as far as i know @artfwo is the foremost monome-in-python user :)

@simonvanderveldt
Copy link
Member Author

@artfwo Do you think there would be an advantage in refresh rate for libmonome's Python bindings over pymonome?

@artfwo
Copy link
Member

artfwo commented Nov 18, 2019

@simonvanderveldt when directly accessing devices through libmonome you don't hit the the UDP buffer size limits (which you will hit with serialosc), you will hit the serial i/o buffer though. in practice the framerates in both cases can go crazy high (beyond visible refreshing), for example i currently run the arc at 100 fps through serialosc/pymonome in my live setup, but if I set the framerate to 1000 it will still work - actual framerate will be probably lower due to some UDP packets skipped, but i won't be able to notice this with naked eye.

@simonvanderveldt
Copy link
Member Author

simonvanderveldt commented Nov 18, 2019

@artfwo Thanks for the explanation, sounds like pymonome is plenty fast :)
Unless anything else comes up it seems like it should be fine to drop the Python bindings I guess? Shall I try to create a PR or would you prefer that you do it?

@artfwo
Copy link
Member

artfwo commented Nov 19, 2019

@simonvanderveldt please do so if you like, sorry, i have somehow busy week again.

@catfact catfact assigned catfact and unassigned tehn and artfwo Mar 6, 2021
@catfact
Copy link
Contributor

catfact commented Mar 6, 2021

i'm gonna go ahead and nuke the python bindings and monomeserial from this library, which will henceforth be focused on offering a clean C binding to serial devices. (since the other tools handle the other jobs better, and are better maintained.)

@catfact
Copy link
Contributor

catfact commented Mar 6, 2021

on second thought, may as well leave the Cython bindings. it does offer a lightweight means of directly controlling the serial device, handling protocol detection/rotation/etc.

@artfwo
Copy link
Member

artfwo commented Mar 19, 2021

@catfact an alternative to Cython bindings is pyserial that provides a more pythonic API and is compatible with standard Python event loops (pyserial-asyncio), but the downside is of course that you have to write a grid protocol layer on top of it.

@shakfu
Copy link

shakfu commented Jan 8, 2022

Please don't nuke the python bindings:

  1. It works works perfectly with the latest python (tested on 3.9.9)
  2. The cython code is really minimal (without the header section which doesn't change, it's just 861 words (using wc -w) and 343 lines (using wc -l) which is hardly a maintenance burden.
  3. It's a great place for python-centric people to grok the c-api and experiment with libmonome via python scripting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants