Improve and extend the _read() method availability for its users and related methods. Part 3: Implement _read() in File() #712
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This is part 3 of the series to improve and extend the availability of the _read() method.
Part 1: #709
Part 2: #711
Part 3: Add the
_read()method to theFile()connector:This fixes #622 by adding an initial implementation of the
_read()method to theFile()connector that, until now, was lacking this feature and was raising aNotImplementedErrorexception.The only way I found for this to work is by the use of the low level
osmodule thanks to its ability to manage file descriptors. No other file access/read method has been successful, at least for me.This implementation does not include any timeout/cancellation ability in case of the file not being accessible, although this is not currently planned for the near future.
Features:
Part 4: #714
Tested with
TM-U210 Parallel port printer
Regular files