Coder Social home page Coder Social logo

xontrib-pyrtn's Introduction

Store the python return value of commands for the session.

If you like the idea click ⭐ on the repo and tweet.

Installation

To install use pip:

xpip install xontrib-pyrtn
# or: xpip install -U git+https://github.com/dyuri/xontrib-pyrtn

Usage

xontrib load xontrib_pyrtn

The xontrib adds two functions to the global namespace - In[] and Out[]. They are similar to ipython's In[] and Out[]. (In() and Out() is also available and does the same thing, except they can be called w/o argument and will show the list of input/output.)

A new PROMPT_FIELD pyhistnum is also added, to be able to include the number of the upcoming command (like in ipython).

Example

$ xontrib load pyrtn
$ $PROMPT = "[{pyhistnum}]$ "
[2]$ [12 * 3 + 6]
[42]
[3]$ In[2]
"[12 * 3 + 6]\n"
[4]$ Out[2] + [1]
[42, 1]
[5]$ 

Credits

This package was created with xontrib cookiecutter template.

xontrib-pyrtn's People

Contributors

dyuri avatar

Stargazers

 avatar João avatar Jeff Carpenter avatar Andy Kipp avatar

Watchers

 avatar James Cloos avatar

Forkers

playfloor

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.