Skip to main content

IPython magic to reverse a string

Project description


IPython reverser is a magic function for IPython that takes an argument and returns a reversed string as the output. The sole purpose of this package is to show how to publish an IPython extension on PyPI.


IPython reverser can be installed as a standard Python package: either from PyPI:

pip install IPythonReverser

or from git:

git clone
cd ipython-reverser/
python install

This can be imported into an IPython shell session using either: import ipython_reverser or %load_ext ipython_reverser

Although you probably want it to load when IPython loads, in which case, edit your IPython profile file (by default ~/.ipython/profile_default/ and add ipython_reverser to :

c.TerminalIPythonApp.extensions = [

(you may need to create this, and can do so with ipython profile create).


Just pass a string and watch how it magically gets reversed: This can be used as a magic for a single line (line magic):

In [1]: %reverse Hello world
Out[1]: 'dlrow olleH'

Project details

Release history Release notifications | RSS feed

This version


Download files

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

Source Distribution

IPythonReverser-0.1.tar.gz (1.8 kB view hashes)

Uploaded source

Built Distribution

IPythonReverser-0.1-py3-none-any.whl (2.9 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page