Giter Club home page Giter Club logo

repl-demo's Introduction

REPL Demo

This is a companion repository for the article, "Building REPLs for Fun and Profit". Download this repository to your computer so that you can try out the examples from the article.

Each file in this repository corresponds to one of the examples in the article:

  • deep_thought/repl_basic.py shows how to start a basic Python REPL.
  • deep_thought/repl_ipython.py shows how to start an IPython REPL.
  • deep_thought/repl_compat.py shows how to support IPython if installed, using vanilla Python as a fallback.
  • deep_thought/repl_cli.py iterates on the idea and uses the click library to add command-line arguments to the REPL script.
  • setup.py defines additional metadata so that the REPL can be installed as a regular command-line application.

Dependencies

The code in this repository has been tested against Python 3.6.

If you encounter any issues, make sure you are using the latest version of setuptools (pip install --upgrade setuptools).

Installation

  1. (optional but highly recommended) Create a virtualenv.
  2. For a quick start, run pip install -e . to install dependency libraries, and then you can run any of the code examples in the deep_thought package.
  3. To try out the IPython REPLs, you will also need to install IPython: pip install ipython

The article "Building REPLs for Fun and Profit" will take you step-by-step through each of the scripts, so that you can get more information about exactly what's happening in each one.

repl-demo's People

Contributors

todofixthis avatar

Stargazers

Leroy "Spydaz" Dyer BSC/MSC avatar Mark Mitchenall avatar Christopher Stelma avatar Kirk Thaker avatar Tom Ritchford avatar Martin Milan avatar Lucas Gallindo avatar RoachZhao avatar José Augusto Guimarães avatar John Kent avatar Filip Štamcar avatar  avatar

Watchers

James Cloos avatar

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.