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

Installation

# pip install rlpython

Starting rlpython from the command line

# rlpython

Starting rlpython from Python code

import rlpython

rlpython.embed()

Attach a rlpython shell over network

import rlpython

rlpython.embed(bind='localhost:5000')
# rlpython localhost:5000

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

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.3.tar.gz (12.4 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