nvaccess / nvda

NVDA, the free and open source Screen Reader for Microsoft Windows
https://www.nvaccess.org/
Other
2.1k stars 634 forks source link

Python 3: FTDI2 module is not yet compatible #8819

Closed LeonarddeR closed 5 years ago

LeonarddeR commented 6 years ago

Steps to reproduce:

  1. Install python 3
  2. Try to load the ftdi2 python module

Actual behavior:

D:\Development\nvda\miscDeps\python>py -3 ftdi2.py
  File "ftdi2.py", line 100
    raise FTDeviceError,status
                       ^
SyntaxError: invalid syntax

Expected behavior:

Module loads properly

Related issues

7587

LeonarddeR commented 5 years ago

I did some additional research on the ftdi2 interface. There is an awesome programming reference.

The FTDI dll offers functions that behave like win32 functions. These include FT_W32_CreateFile to create a handle, FT_W32_ReadFile to read from the device, FT_W32_WriteFile with support for overlapped i/o using FT_W32_GetOverlappedResult. It looks like all these functions are missing from the current FTDI2 wrapper anyway, so we might as well just drop it in favour of something new that integrates perfectly into hwIo. The problem is that I really need a device to do this, and I currently don't have one.

LeonarddeR commented 5 years ago

Just filed https://github.com/nvaccess/nvda-misc-deps/pull/13.

I really need a device to get rid of this wrapper and create something that fits into hwIo. This module should work for now.

LeonarddeR commented 5 years ago

I have a papenmeier device to test with and am converting that code to hwIo. Closing this issue in favour of #7587.

LeonarddeR commented 5 years ago

I've started with an attempt to update the Papenmeier driver to support braille display auto detection. However, the current driver can be considered the most complex driver in core and is coded in a very non object oriented way. Therefore, I don't dare to touch the driver without official protocol documentation from the manufacturer.

As it might take some time to get this documentation and it also requires time to test things with multiple displays, this is definitely not going to succeed before the Python 3 transition. Therefore, I'm reopening this. I'm sorry for the confusion here.

feerrenrut commented 5 years ago

Closed with nvaccess/nvda-misc-deps#13

lukaszgo1 commented 4 years ago

@leonardder May I ask what device you've tested this with? I've recently receive report from someone that Python 3 versions of NVDA did not work with Papenmeier Braillex Trio hence my question

zstanecic commented 4 years ago

@lukaszgo1

I can also reference one message on the one polish mailing list.

One user sent the same issue, it simply throws an error.

LeonarddeR commented 4 years ago

I think this issue was reported in https://github.com/nvaccess/nvda/issues/10780. There, it turns out not ftdi, but brxcom, is the culprit.

It would help to have a log for these cases.