Issue 39 in pylibnidaqmx: python 3 support

7 views
Skip to first unread message

pylibn...@googlecode.com

unread,
Jan 3, 2014, 6:41:34 PM1/3/14
to pylibnida...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 39 by jpko...@gmail.com: python 3 support
http://code.google.com/p/pylibnidaqmx/issues/detail?id=39

pylibnidaqmx doesn't support python3. Are there any plans to do so? I can
assist.


--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

pylibn...@googlecode.com

unread,
Jan 6, 2014, 4:54:58 AM1/6/14
to pylibnida...@googlegroups.com

Comment #1 on issue 39 by pearu.peterson: python 3 support
http://code.google.com/p/pylibnidaqmx/issues/detail?id=39

Hi,
I don't have near future plans regarding python3 support.
However, your assistance is most welcome. I can give you svn write access
if you are interested.
Thanks,
Pearu

pylibn...@googlecode.com

unread,
Jan 6, 2014, 1:12:29 PM1/6/14
to pylibnida...@googlegroups.com

Comment #2 on issue 39 by jpko...@gmail.com: python 3 support
http://code.google.com/p/pylibnidaqmx/issues/detail?id=39

Sure, I'll take write access. I'm a big fan of pylint, so I was going to
fix some of the things that it complains about first. Then I'll rewrite
things in such a way that 2to3 can convert it automatically, and figure out
how to run that during installation. I can send patches for review before
committing.

pylibn...@googlecode.com

unread,
May 9, 2014, 9:34:08 AM5/9/14
to pylibnida...@googlegroups.com

Comment #3 on issue 39 by richard.hoechenberger: python 3 support
http://code.google.com/p/pylibnidaqmx/issues/detail?id=39

Any progress on this one, jpkotta? :)

pylibn...@googlecode.com

unread,
May 13, 2014, 8:53:01 PM5/13/14
to pylibnida...@googlegroups.com

Comment #4 on issue 39 by jpko...@gmail.com: python 3 support
http://code.google.com/p/pylibnidaqmx/issues/detail?id=39

Sorry, I completely forgot about this. I've just pushed the clean up
stuff. Pylint is pretty quiet now, I have all the __future__ imports, and
2to3 generates a pretty small diff. There shouldn't be any user-visible
changes.

I tested with a 6259 PCI DAQ on Windows. My application, which sets analog
outs, reads analog ins, and measures frequency, ran without issues.

pylibn...@googlecode.com

unread,
Dec 9, 2014, 9:03:56 AM12/9/14
to pylibnida...@googlegroups.com

Comment #5 on issue 39 by qoqi.lei...@gmail.com: python 3 support
https://code.google.com/p/pylibnidaqmx/issues/detail?id=39

I just ran pylibnidaqmx on python 3.4 on windows XP 32 bit.

Next to runnning 2to3, I had to make some little adjustments to the source.
Is there a way to share this with you?

pylibn...@googlecode.com

unread,
Dec 9, 2014, 11:39:55 AM12/9/14
to pylibnida...@googlegroups.com

Comment #6 on issue 39 by jpko...@gmail.com: python 3 support
https://code.google.com/p/pylibnidaqmx/issues/detail?id=39

Attach a patch here or email it to me.

pylibn...@googlecode.com

unread,
Jan 15, 2015, 8:21:29 AM1/15/15
to pylibnida...@googlegroups.com

Comment #7 on issue 39 by qoqi.lei...@gmail.com: python 3 support
https://code.google.com/p/pylibnidaqmx/issues/detail?id=39

I had to make some minor changes to the code. The most significant change
is the deprecation of namedtuples to customtuple. Functions in python3 are
restricted to have less than 256 arguments. The namedtuple class does not
work in that case.

In the patch file that I attached, are some changes I did before running
2to3. Afterwards, I had to change 1 extra line:
libnidaqmx.py:264:
new_args.append (bytes(a, encoding='utf-8'))

There might be a better way to circumvent this, in python 3, strings are
unicode by default.

Furthermore, all _h_*_*.py files should be regenerated, or just deleted
from the repository.

Attachments:
customtuple.py 1.1 KB
libnidaqmx.py.patch 1.7 KB
Reply all
Reply to author
Forward
0 new messages