Skip to main content

Autocomplete options for python3 scripts in command line using optparse.

Project description

Description

Command line tab completion for optparse

Installation

$ sudo pip3 install optioncomplete**

Example python code

import sys
from optparse import OptionParser
from optioncomplete import autocomplete
...
parser = OptionParser()
parser.add_option("-f", "--file", dest="filename",
                  help="write report to FILE", metavar="FILE")
parser.add_option("-q", "--quiet",
                  action="store_false", dest="verbose", default=True,
                  help="don't print status messages to stdout")
autocomplete(parser,sys.argv[0])
(options, args) = parser.parse_args()

Installation and usage in command line

Optioncomplete youtube

Project details


Release history Release notifications | RSS feed

This version

2.7

Download files

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

Source Distribution

optioncomplete-2.7.tar.gz (3.6 kB view details)

Uploaded Source

File details

Details for the file optioncomplete-2.7.tar.gz.

File metadata

File hashes

Hashes for optioncomplete-2.7.tar.gz
Algorithm Hash digest
SHA256 86bc7ebbe2aa207650114621d566c25fa5a0ac81cf32e5bd073209c7063c751b
MD5 3d66a21444b67d39dbf06a92745ace51
BLAKE2b-256 7184395690602fa72e218efd40f8ee291352faefa01b86bb9ec847c305df01d3

See more details on using hashes here.

Supported by

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