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

Python3 support #10

Closed
mpastell opened this issue Aug 28, 2013 · 14 comments
Closed

Python3 support #10

mpastell opened this issue Aug 28, 2013 · 14 comments

Comments

@mpastell
Copy link

Hi,
I'd be very happy to see Python 3 support.

@davelopez01
Copy link
Collaborator

Hello,

Currently there are no plans for LabJackPython Python 3 support from LabJack. However there are a couple of forks with it:

https://github.com/hardbyte/LabJackPython3
https://github.com/sultanqasim/LabJackPython

@mpastell
Copy link
Author

Thanks for the quick response. I'll look into the forks. I also hope you'll consider official support in the future.

@aleifer
Copy link

aleifer commented Jan 24, 2014

Just chiming in to say, an official port would be greatly appreciated. Thanks.

@davelopez01
Copy link
Collaborator

We might look into porting LabJackPython to Python 3.0 in the future, but at the moment we have no plans on when that will be.

For our new cross-platform Modbus driver, LJM, we developed a Python wrapper with Python 2.5, 2.5, 2.7 and 3.x support. Currently that driver only supports the LabJack T7 and Digit, and we plan on it supporting future devices:

http://labjack.com/support/ljm/examples/python

@mnaberez
Copy link
Contributor

mnaberez commented Jan 5, 2015

@davelopez01 @rolsen I have been submitting pull requests with small, focused changes that I hope will be easy for you to review and merge (e.g. #37, #38, #40, #41). These changes are starting to fix some of the Python 3 issues without breaking the existing Python 2.5-2.7 support. Since 899470c, setup.py will refuse to install on versions that aren't officially supported (including Python 3). This will allow incremental work to be done and released without any change to your supported version policy.

@danwoodard
Copy link

Can LJM be extended to support the U6?

@rolsen
Copy link
Contributor

rolsen commented Jan 11, 2016

@danwoodard, no, LJM cannot be extended to support the U6, as much as we'd like to. The APIs of LJM and the U6 are not compatible.

@k7hoven
Copy link

k7hoven commented Jun 1, 2016

The scientific community has been fast in switching to Python 3. For us, the only reason left for using Python 3 and 2 in parallel is LabJack. How about official support?

@davelopez01
Copy link
Collaborator

At this time, there are still no plans to add official Python 3 support to LabJackPython. LabJackPython is for the LabJack U12, U3, U6 and UE9.

For the LabJack T7, Digit and upcoming devices there is the LJM Python interface which does support Python 3.

@davelopez01
Copy link
Collaborator

To update, we (LabJack) changed our plans and are now adding official Python 3 support to LabJackPython. There is no time frame on completion, but I have started pushing updates to the repository.

@shraken
Copy link

shraken commented Dec 20, 2016

any update on official python3 support? sultanqasim fork works on my mac osx and raspberry pi systems but is 220 commits behind labjack master at this point.

@davelopez01
Copy link
Collaborator

A lot of functionality has been updated, but we have yet to do a finalized test for Python 3 compatibility, a couple of examples still need to be updated and we are considering some additional changes I mention here:

#93

Python 3 development has been delayed recently as we are working on a new LabJack product release.

Try the current development version here on GitHub and let us know if you run into any issues.

@ygaudet
Copy link

ygaudet commented Feb 3, 2017

All, I'm running into a problem, in Python3 using a single counter for a Flowmeter.
When reading the counter using d.getFeedback(u3.Counter0(Reset = False)) from the u3.py documented example.
We get a TypeError: a bytes-like object is required, not 'str' from return unpack('<I', inStr)[0]
at line 2784 of u3.py
I tried to help the unpacking by using return unpack('<I', bytes(inStr, 'utf8') )[0] but that then fails randomly with struct.error: unpack requires a bytes object of length 4.
For what ever reason sometime the bytes(inStr, 'utf8') as a len of 5?
Any idea would help.

@davelopez01
Copy link
Collaborator

@ygaudet I pushed some Feedback Counter changes to fix the Python 3 error. I didn't see any issues with the Counter value being 5-bytes. Let me know if you run into further issues.

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

9 participants