You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to vote for for a new release. The readme changes merged from 4b28037 are not supported: Once I fix the sting IO import for Python 3 (#107) I get ImportError: cannot import name 'no_output' from 'percol.actions' for a good reason: It does not exist in release 0.2.1. Can we have a new release please please?
If anyone needs a version of the example that works with Python 3.7:
from io import StringIO
from percol import Percol
from percol.actions import action
@action()
def no_output(lines, percol):
"ignore all output"
pass
def main(candidates):
si, so, se = StringIO(), StringIO(), StringIO()
with Percol(
actions=[no_output],
descriptors={'stdin': si, 'stdout': so, 'stderr': se},
candidates=iter(candidates)) as p:
p.loop()
if p.args_for_action is None:
raise KeyboardInterrupt
results = p.model_candidate.get_selected_results_with_index()
return [r[0] for r in results]
if __name__ == "__main__":
candidates = ['foo', 'bar', 'baz']
results = main(candidates)
print("You picked: {!r}".format(results))
Best, Sebastian
The text was updated successfully, but these errors were encountered:
Hi @clach04, so you forked percol as percolator on PyPI now, I see. My fixed example above does seem to work with percolator out of the box, but percolator's readme still reads from cStringIO import StringIO which does not support Python 3.
Hi!
I would like to vote for for a new release. The readme changes merged from 4b28037 are not supported: Once I fix the sting IO import for Python 3 (#107) I get
ImportError: cannot import name 'no_output' from 'percol.actions'
for a good reason: It does not exist in release 0.2.1. Can we have a new release please please?If anyone needs a version of the example that works with Python 3.7:
Best, Sebastian
The text was updated successfully, but these errors were encountered: