https://github.com/sethmlarson/fix-python-repl-exit
  
  
    A simple script that makes typing `exit` in a Python interpreter do what you expect 
    https://github.com/sethmlarson/fix-python-repl-exit
  
exit interpreter python repl
        Last synced: 8 months ago 
        JSON representation
    
A simple script that makes typing `exit` in a Python interpreter do what you expect
- Host: GitHub
- URL: https://github.com/sethmlarson/fix-python-repl-exit
- Owner: sethmlarson
- License: mit
- Created: 2020-04-11T18:22:08.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-04-11T21:17:29.000Z (over 5 years ago)
- Last Synced: 2025-01-18T16:20:38.413Z (10 months ago)
- Topics: exit, interpreter, python, repl
- Language: Python
- Homepage:
- Size: 2.93 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
- 
            Metadata Files:
            - Readme: README.md
- License: LICENSE
 
Awesome Lists containing this project
README
          # Fix Python REPL `exit`
A simple script that makes typing `exit` in a Python interpreter do what you expect.
## How to Use
The whole script to make things work is in the file `fix-python-repl-exit.py`.
If you have a `PYTHONSTARTUP` script already, simply paste the contents of the file
into your existing script. If you don't have a script already then you can setup one
up like so:
```bash
# Create the initial script
$ touch ~/.pythonstartup.py
# Add the PYTHONSTARTUP environment variable to your bash / console profile:
# The name of the file '~/.bashrc' may be different if you're on a different OS.
$ echo 'export PYTHONSTARTUP="$HOME/.pythonstartup.py"' > ~/.bashrc
# Add things to the '.pythonstartup.py' file:
$ cat fix-python-repl-exit.py >> ~/.pythonstartup.py
# Try it out!
$ python
>>> exit
🎉
```
## License
MIT