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
Refactor of PR #56 #60
Conversation
…into CatherineH-ch-tc200
if ack_expected is not None: | ||
ack = self.read() | ||
if ack != ack_expected: | ||
raise IOError("Incorrect ACK message received: got {} " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I should make new errors called AckError
and PromptError
or something. Thoughts what the correct base they should inherit from @cgranade ?
def __init__(self, stdin=None, stdout=None): | ||
AbstractCommunicator.__init__(self) | ||
self._terminator = '\n' | ||
self._stdout = stdout | ||
self._stdin = stdin | ||
|
||
## PROPERTIES ## |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just curious - does removing this extra pound sign mess up the sphinx docs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope, they were just there to look pretty when looking at the source, but pylint likes to complain about them.
I might disable that rule in a .pylintrc file because I kinda like the ##
for visual distinction
But then again I'm lazy and I use autopep8 and its removing it anyways soooooo
I think we're good now with this PR. |
_ack_expected
function">"
) after finishing with a previous commandRegarding ack and prompt strings, here is the assumed format:
Sending a command:
CMD=1
returns[ack][term][prompt][term]
Sending a query:
CMD?
returns[ack][term]response term[prompt][term]