Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/switowski/ipython-reverser
IPython magic to reverse a string
https://github.com/switowski/ipython-reverser
Last synced: 9 days ago
JSON representation
IPython magic to reverse a string
- Host: GitHub
- URL: https://github.com/switowski/ipython-reverser
- Owner: switowski
- License: mit
- Created: 2019-05-26T17:04:18.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-05-26T17:19:40.000Z (over 5 years ago)
- Last Synced: 2024-09-18T20:25:14.063Z (about 2 months ago)
- Language: Python
- Homepage:
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
README
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 installThis 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'