Skip to content

Instantly share code, notes, and snippets.

@JohnSpeno
Created March 3, 2013 17:45
Show Gist options
  • Save JohnSpeno/5077207 to your computer and use it in GitHub Desktop.
Save JohnSpeno/5077207 to your computer and use it in GitHub Desktop.
My .pythonrc file
import rlcompleter
import atexit
import os
import readline
import sys
from pydoc import help
# Make TAB complete stuff
readline.parse_and_bind("tab: complete")
# Save our interpreter history between sessions
historyPath = os.path.expanduser("~/.pyhistory")
def save_history(historyPath=historyPath):
import readline
readline.write_history_file(historyPath)
if os.path.exists(historyPath):
readline.read_history_file(historyPath)
atexit.register(save_history)
# clean up
del os, atexit, readline, rlcompleter, save_history, historyPath
@JohnSpeno
Copy link
Author

>>> help(''.join)
Help on built-in function join:

join(...)
    S.join(iterable) -> string

    Return a string which is the concatenation of the strings in the
    iterable.  The separator between elements is S.

>>>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment