Skip to main content

Input autocompletion

Project description

AutoPyInput

  • For Windows
  • Requires Python >= 3.10
  • Autocomplete words while user input
  • Use Tab or arrow keys to cycle through choices

Usage

from autopyinput.word_complete import Wordcompleter
import autopyinput.utils as au

# Custom words
word_list = ['hello', 'world', 'word', 'hi']
wcompleter = Wordcompleter(word_list)
input_ = wcompleter.prompt(prompt_ = ">>")
# Clean up and use string
doc = '''
#hello world!
def main():
  print("hello world")
main()
'''

word_list = au.string_to_words(au.clean(doc))
wcompleter = Wordcompleter(word_list)
input_ = wcompleter.prompt(prompt_ = ">>")
# Clean up and use file data
doc = "example.txt"

word_list = au.file_to_words(doc)
wcompleter = Wordcompleter(word_list)
input_ = wcompleter.prompt(prompt_ = ">>")

Known issue: Displays nothing when the display is the same length as your terminal width, but input is saved so it is safe to click "Enter" and get input.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

auto_py_input-0.0.1.tar.gz (4.3 kB view hashes)

Uploaded Source

Built Distribution

auto_py_input-0.0.1-py3-none-any.whl (4.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page