All Projects → donkirkby → Live Py Plugin

donkirkby / Live Py Plugin

Licence: mit
Live coding in Python with PyCharm, Emacs, Sublime Text, or even a browser

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Live Py Plugin

Mypy boto3 builder
Type annotations builder for boto3 compatible with VSCode, PyCharm, Emacs, Sublime Text, pyright and mypy.
Stars: ✭ 123 (-44.59%)
Mutual labels:  pycharm, emacs, sublime-text
Vhdl Mode
A package for Sublime Text that aids coding in the VHDL language.
Stars: ✭ 31 (-86.04%)
Mutual labels:  emacs, sublime-text
Bonzomatic
Live shader coding tool and Shader Showdown workhorse
Stars: ✭ 829 (+273.42%)
Mutual labels:  live-coding, livecoding
Webpaste.el
webpaste.el can paste whole buffers or parts of buffers to several pastebin-like services and supports failover if one service fails.
Stars: ✭ 67 (-69.82%)
Mutual labels:  emacs, emacs-mode
Deft
Deft for Emacs
Stars: ✭ 521 (+134.68%)
Mutual labels:  emacs, emacs-mode
Nyan Mode
Nyan Cat for Emacs! Nyanyanyanyanyanyanyanyanyan!
Stars: ✭ 590 (+165.77%)
Mutual labels:  emacs, emacs-mode
Fingers.el
Modal editing minor mode for Emacs
Stars: ✭ 51 (-77.03%)
Mutual labels:  emacs, emacs-mode
Jet Live
c++ hot code reload for linux and macos
Stars: ✭ 283 (+27.48%)
Mutual labels:  live-coding, livecoding
Tidal
Pattern language
Stars: ✭ 1,304 (+487.39%)
Mutual labels:  live-coding, livecoding
Flok
Web-based P2P collaborative editor for live coding sounds and images
Stars: ✭ 119 (-46.4%)
Mutual labels:  live-coding, livecoding
Emacs Solidity
The official solidity-mode for EMACS
Stars: ✭ 120 (-45.95%)
Mutual labels:  emacs, emacs-mode
Writegood Mode
Minor mode for Emacs to improve English writing
Stars: ✭ 369 (+66.22%)
Mutual labels:  emacs, emacs-mode
Chromerepl
A Sublime Text plugin to execute JavaScript in Google Chrome
Stars: ✭ 347 (+56.31%)
Mutual labels:  live-coding, sublime-text
Clj Refactor.el
A collection of Clojure refactoring functions for Emacs
Stars: ✭ 694 (+212.61%)
Mutual labels:  emacs, emacs-mode
Swift Mode
Emacs support for Apple's Swift programming language.
Stars: ✭ 308 (+38.74%)
Mutual labels:  emacs, emacs-mode
Sonic Pi
Code. Music. Live.
Stars: ✭ 8,736 (+3835.14%)
Mutual labels:  live-coding, livecoding
cl-patterns
Library for writing patterns to generate or process (a)musical sequences of mathematically (un)related (non-)compound values in Lisp.
Stars: ✭ 62 (-72.07%)
Mutual labels:  live-coding, livecoding
Livecodelab
a web based livecoding environment
Stars: ✭ 276 (+24.32%)
Mutual labels:  live-coding, livecoding
Jq Mode
Emacs major mode for editing jq queries.
Stars: ✭ 70 (-68.47%)
Mutual labels:  emacs, emacs-mode
Psc Ide Emacs
Emacs integration for PureScript's psc-ide tool.
Stars: ✭ 130 (-41.44%)
Mutual labels:  emacs, emacs-mode

Live Coding in Python

Build Status Code Coverage

Visualize your Python code while you type it in PyCharm, Emacs, Sublime Text, or even your browser.

To see how to use one of the Live Coding in Python plugins, watch the demo video or read the getting started pages for PyCharm, Emacs, or Sublime Text. Want to try it without installing anything? Try the browser version. You can also try Space Tracer, the command-line tool that trades time for space when you debug. You might also find some useful examples in the tools folder. To learn more, read about how it works.

Screenshot of a star diagram

Special thanks to James Davies for contributing the Sublime Text support, and to Antti Kaihola and Christoph Paulik for contributing the Emacs support. Thanks to all the contributors for helping in all kinds of ways, and thanks to JetBrains for the free PyCharm and IDEA licenses.

If you like this project, check out some of my other projects.

Feature Comparison

So far, the Emacs mode seems to be the most popular way to use live coding in Python. The PyCharm plugin has the most features.

Feature PyCharm Emacs Sublime browser space_tracer
variable assignments Y Y Y Y Y
looping Y Y Y Y Y
function calls Y Y Y Y Y
errors and exceptions Y Y Y Y Y
print function Y Y Y Y Y
unit tests Y Y Y Y
turtle graphics Y
matplotlib preview Y Y
pyglet preview Y Y

If you find the project useful, help us make it better.

Installing the PyCharm plugin

This assumes you already have PyCharm installed, you have configured a Python interpreter, and you can run a Python script normally.

  1. From the File menu, choose Settings....
  2. Click on the Plugins section.
  3. Click the Browse Repositories... button.
  4. Type live coding in the search box, and click on the "Live Coding in Python" entry in the list below.
  5. Click the green Install button on the right.
  6. Click the Restart PyCharm button.
  7. Close all the dialog boxes by clicking OK, then let PyCharm restart when it asks.
  8. Open a Python file.
  9. Run the Python file normally, as a script or a unit test.
  10. With the same run configuration selected in the drop down, choose Start Live Coding from the Run menu.

Uninstalling the PyCharm plugin

  1. From the File menu, choose Settings....
  2. Click on the Plugins section.
  3. In the list of plugins, click on Live Coding in Python.
  4. Click the Uninstall button on the right.
  5. Click the Restart PyCharm button.
  6. Close all the dialog boxes by clicking OK, then let PyCharm restart.

Installing the Emacs mode

It's probably easiest to use the MELPA package archive, as described in this section, but the next section gives instructions for installing without MELPA.

  1. Install GNU Emacs if you don't already have it.
  2. Install MELPA. You probably want to follow the instructions for the stable version, instead of the default bleeding-edge version.
  3. Launch the package installer with M-x package-list-packages.
  4. Find the package with C-s live-py-mode.
  5. Mark the package to install with i, then execute the installation with x.
  6. Open any Python file, and activate live-py-mode with M-x live-py-mode. You should see an extra window on the right that shows the results of running your code.
  7. Type C-h m and scroll down to the Live-Py section to see all the advanced features that let you run other versions of Python or drive your live coding from another script or a unit test.

Installing the Emacs mode without MELPA

  1. Install GNU Emacs if you don't already have it.

  2. Clone the latest version of the live-py Emacs mode:

     git clone https://github.com/donkirkby/live-py-plugin.git
    
  3. Copy the Emacs Lisp file and the supporting Python files into a directory which is in your Emacs load-path. For example:

     cd live-py-plugin
     mkdir -p ~/.emacs.d/packages
     cp emacs-live-py-mode/live-py-mode.el plugin/PySrc/space_tracer ~/.emacs.d/packages
    

    Add ~/.emacs.d/ to your load-path in ~/.emacs.d/init.el or ~/.emacs:

     (add-to-list 'load-path "~/.emacs.d/packages")
    
  4. Load the Lisp library in your ~/.emacs.d/init.el or ~/.emacs:

     (require 'live-py-mode)
    
  5. Restart Emacs.

  6. Open any Python file, and activate live-py-mode with M-x live-py-mode. You should see an extra window on the right that shows the results of running your code.

  7. Type C-h m and scroll down to the Live-Py section to see all the advanced features that let you run other versions of Python or drive your live coding from another script or a unit test.

Uninstalling the Emacs mode

If you installed with MELPA, just use it to uninstall. If not, follow these steps:

  1. Remove the files you copied into ~/.emacs.d/:
  2. Revert additions to ~/.emacs.d/init.el or ~/.emacs.
  3. Restart Emacs.

Installing the Sublime Text plugin

It's easiest to install from package control, but you can find a manual method in the CONTRIBUTING file.

  1. Install package control.
  2. Open the command palette by typing Ctrl+Shift+P.
  3. Type "Package" and then select Package Control: Install Package.
  4. Start typing "Live Coding in Python" and select it when it appears in the list.
  5. When it finishes installing, you should see a new "Live Coding" menu.
  6. Live coding should now work for simple scripts.
  7. Navigate to Preferences -> Package settings -> Live Coding.
  8. Set the path to your preferred Python executable, particularly if you want to use a virtual environment. The default is python.
  9. Save and close this pane.
  10. Open or create a Python file.
  11. Navigate to Live Coding -> Start
  12. This should bring up a new pane on the right with the live coding display.
  13. Begin typing in the left pane and see the code trace results on the right.

Uninstalling the Sublime Text plugin

  1. Open Sublime Text 3.
  2. Open the command palette by typing Ctrl+Shift+P.
  3. Type "Package" and then select Package Control: Remove Package.
  4. Start typing "Live Coding in Python" and select it when it appears in the list.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].