-
Notifications
You must be signed in to change notification settings - Fork 43
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
Dictionary lookup handler #61
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -343,6 +343,14 @@ def translateSimple(toTranslate, commands): | |
proc_in.stdout.close() | ||
return translated.decode('utf-8') | ||
|
||
@gen.coroutine | ||
def translateNoFlush(toTranslate, commands): | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This looks like the same as There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes indeed. I've removed it. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @sushain97 , the |
||
proc_in, proc_out = startPipeline(commands) | ||
yield gen.Task(proc_in.stdin.write, bytes(toTranslate, 'utf-8')) | ||
proc_in.stdin.close() | ||
translated = yield gen.Task(proc_out.stdout.read_until_close) | ||
proc_in.stdout.close() | ||
return translated.decode('utf-8') | ||
|
||
@gen.coroutine | ||
def translateDoc(fileToTranslate, fmt, modeFile, unknownMarks=False): | ||
|
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.
Looks like this function is repeated? Maybe we should extract it
BaseHandler
?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.
Um, not all classes that extend
BaseHandler
use it. Do you suggest putting it at theBaseHandler
level so that all the classes which extend it have this method?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.
Yes.