Skip to content

Commit

Permalink
make pystartup Py3 compatible
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.sixfeetup.com/svn/private/claytron/dotfiles/trunk@49385 7abc7aa1-7e52-db11-9331-00508bd72530
  • Loading branch information
claytron committed Feb 15, 2015
1 parent 6aaaa1c commit 93f3e67
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions .pystartup
@@ -1,22 +1,23 @@
import __future__
# Most of the time i use ipython, which i think ignores this file.
# but if i'm not using ipython, let's set some stuff up...

# first try and set up rlcompleter2
try:
import rlcompleter2
print
print('')
rlcompleter2.setup()
del rlcompleter2
except ImportError:
# then try and setup plain ol' readline
try:
import rlcompleter, readline
readline.parse_and_bind('tab: complete')
print
print "NO rlcompleter2 for nice experiences"
print('')
print("NO rlcompleter2 for nice experiences")
del rlcompleter
del readline
# then, well fuck, you're screwed
except ImportError:
print
print "NO readline at all for you, sadness..."
print('')
print("NO readline at all for you, sadness...")

0 comments on commit 93f3e67

Please sign in to comment.