-
-
Save mertsalik/f842109286a44a61087e92fef51aa600 to your computer and use it in GitHub Desktop.
Interactive Python in Shell
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
See: https://stackoverflow.com/a/246779/930899 | |
I may have found a way to do it. | |
Create a file .pythonrc | |
# ~/.pythonrc | |
# enable syntax completion | |
try: | |
import readline | |
except ImportError: | |
print("Module readline not available.") | |
else: | |
import rlcompleter | |
readline.parse_and_bind("tab: complete") | |
then in your .bashrc file, add | |
export PYTHONSTARTUP=~/.pythonrc | |
That seems to work. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment