IPython magic to reverse a string
Project description
About
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.
Installation
IPython reverser can be installed as a standard Python package: either from PyPI:
pip install IPythonReverser
or from git:
git clone http://github.com/switowski/ipython-reverser.git cd ipython-reverser/ python setup.py 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/ipython_config.py) and add ipython_reverser to :
c.TerminalIPythonApp.extensions = [
'ipython_reverser'
]
(you may need to create this, and can do so with ipython profile create).
Usage
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
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file IPythonReverser-0.1.tar.gz.
File metadata
- Download URL: IPythonReverser-0.1.tar.gz
- Upload date:
- Size: 1.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
88261fc75c3625cd9637b03badc8108465ac1328e99efb5dcc00632d112aeb5d
|
|
| MD5 |
1f834570eee5068e1f13457ad7f43ba9
|
|
| BLAKE2b-256 |
3499c0c9a8a2741e559dcc8e434b89caab22d9edc55054e2e67345759f04c3f1
|
File details
Details for the file IPythonReverser-0.1-py3-none-any.whl.
File metadata
- Download URL: IPythonReverser-0.1-py3-none-any.whl
- Upload date:
- Size: 2.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
61b1343eff3278a05ab76a5217ab522a7200c4b2ea37c6c104a89cbaa599c936
|
|
| MD5 |
e79ae2ff53abbf98902ec00f7595e2da
|
|
| BLAKE2b-256 |
ead9fb78d2592e13cb734eae9e0d2f2ed39875f275306af367722a39d06d43d2
|