All Projects → FallibleInc → Pysession

FallibleInc / Pysession

Licence: mit
Automatically saves python shell code to a local file or secret Gist

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Pysession

Radian
A 21 century R console
Stars: ✭ 878 (+970.73%)
Mutual labels:  terminal, ipython
Sendcode
Send code and text to macOS and Linux Terminals, iTerm, ConEmu, Cmder, Tmux, Terminus; R (RStudio), Julia, IPython.
Stars: ✭ 166 (+102.44%)
Mutual labels:  terminal, ipython
Show ast
An IPython notebook plugin for visualizing ASTs.
Stars: ✭ 76 (-7.32%)
Mutual labels:  ipython
Awesome Terminals
Terminal Emulators
Stars: ✭ 80 (-2.44%)
Mutual labels:  terminal
Javascript Terminal
JavaScript terminal emulator library that works in your browser and Node.js
Stars: ✭ 79 (-3.66%)
Mutual labels:  terminal
Linuxspells
✨ Potter-ify your Linux experience! ::
Stars: ✭ 77 (-6.1%)
Mutual labels:  terminal
Nord Terminator
An arctic, north-bluish clean and elegant Terminator color theme.
Stars: ✭ 78 (-4.88%)
Mutual labels:  terminal
Revery Terminal
Barebones terminal emulator built with ReasonML + Revery + libvterm
Stars: ✭ 76 (-7.32%)
Mutual labels:  terminal
Terminalmenus.jl
Simple interactive menus for the terminal (Now ships with Julia!)
Stars: ✭ 81 (-1.22%)
Mutual labels:  terminal
Mac Zsh Completions
macOS specific additional completion definitions for Zsh.
Stars: ✭ 79 (-3.66%)
Mutual labels:  terminal
Mpb
multi progress bar for Go cli applications
Stars: ✭ 1,221 (+1389.02%)
Mutual labels:  terminal
Xa
Beautiful & Customizable logger ❤️
Stars: ✭ 78 (-4.88%)
Mutual labels:  terminal
Term Web
📟 A simple Terminal UI that run on the web
Stars: ✭ 77 (-6.1%)
Mutual labels:  terminal
Alfred Ssh
SSH workflow for Alfred for Mac with powerful hostname expansion/completion
Stars: ✭ 78 (-4.88%)
Mutual labels:  terminal
Emma Cli
📦 Terminal assistant to find and install node packages.
Stars: ✭ 1,201 (+1364.63%)
Mutual labels:  terminal
Turbo
An experimental text editor based on Scintilla and Turbo Vision.
Stars: ✭ 78 (-4.88%)
Mutual labels:  terminal
I3 Quickterm
A small drop-down terminal for i3 and sway
Stars: ✭ 76 (-7.32%)
Mutual labels:  terminal
Tty Prompt
A beautiful and powerful interactive command line prompt
Stars: ✭ 1,210 (+1375.61%)
Mutual labels:  terminal
Pragmaticai
[Book-2019] Pragmatic AI: An Introduction to Cloud-based Machine Learning
Stars: ✭ 79 (-3.66%)
Mutual labels:  ipython
Headmore
Top geek’s VNC client that runs in Linux terminal (Linux VT console, xterm, and more)
Stars: ✭ 82 (+0%)
Mutual labels:  terminal

Pysession

Automatically save python interpreter code to a file or secret Gist. You can turn this off for any session. Helpful when you want to share a piece of code you just hacked on the shell or wanted to save it in a file for use later.

Tested with IPython, Python2 & Python3 default shells.

Pysession demo

Installation steps

pip install pysession
echo 'export PYTHONSTARTUP=$HOME/.pysession/pysession.py' >> ~/.bashrc

If you are using zsh replace .bashrc in the above line with .zshrc and similarly for any other shell. On macOS, you should append this to ~/.bash_profile

How to use

By default, Pysession will record each shell run and save to a Gist. However it can be instructed to turn off recording or save to a file locally instead of GitHub.

To turn off saving for a session
>>> PySession.off()

Alternatively, to persist your choice of not saving sessions for some extended period of time, set an environment variable PYSESSION_SAVE_OFF to True. export PYSESSION_SAVE_OFF=True

To turn back on saving for a session
>>> PySession.on()
To save to a local file instead of Gist
>>> PySession.local()

To always save your sessions to local file, set an environment variable PYSESSION_SAVE_LOCALLY to True. export PYSESSION_SAVE_LOCALLY=True

The file is saved with a name session.py You can change this by setting the environment variable PYSESSION_FILENAME to your desired filename. export PYSESSION_FILENAME=some_file_name.py

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].