Skip to main content

GNU Readline based Python REPL without any external dependencies

Project description

rlpython is a GNU Readline based Python REPL without any external dependencies

Examples

>>> import arpgarse
>>> argparse.ArgumentParser
<class 'argparse.ArgumentParser'>

# inspect a python object
>>> argparse.ArgumentParser.add_argument?
       id: 0x7f3046435a70
     type: <class 'function'>
     file: /home/fsc/.pyenv/versions/3.7.9/lib/python3.7/argparse.py:1328
signature: add_argument(self, *args, **kwargs)

# print docstring of a python object
>>> argparse.ArgumentParser.add_argument??
add_argument(dest, ..., name=value, ...)
add_argument(option_string, option_string, ..., name=value, ...)

# open the source code of a python object in your local editor
%edit argparse.ArgumentParser.add_argument

Installation

# pip install rlpython
# rlpython

Starting rlpython from a Python script

import rlpython

rlpython.embed()

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

rlpython-0.1.1.tar.gz (6.7 kB view hashes)

Uploaded Source

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