Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def interactive_mode():
# configure readline and completer
readline.parse_and_bind("tab: complete")
readline.set_completer(DictCompleter().complete)
zdict = MetaInteractivePrompt(args.dict)
zdict.loop_prompt(args)
def main():
if len(sys.argv) > 1:
text = sys.argv[1]
completer = DictCompleter().complete
output_set = set()
try:
for i in count():
word = completer(text, i)
if not isinstance(word, str):
break
if word not in output_set:
print(word)
output_set.add(word)
except IndexError:
pass