Skip to content

Commit

Permalink
Merge pull request wting#214 from khughitt/master
Browse files Browse the repository at this point in the history
Updated IPython plugin to support Python 3.x
  • Loading branch information
wting committed Jun 5, 2013
2 parents fca26f3 + 07c0313 commit d692bc6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tools/autojump_ipython.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
if you have not already done so by running:
ipython profile create
And copy this file into the "startup" folder of your new profile (e.g.
"$HOME/.config/ipython/profile_default/startup/").
Expand All @@ -24,9 +24,9 @@
@register_line_magic
def j(path):
cmd = ['autojump'] + path.split()
newpath = sub.Popen(cmd, stdout=sub.PIPE, shell=False).communicate()[0][:-1] # delete last '\n'
newpath = sub.Popen(cmd, stdout=sub.PIPE, shell=False).communicate()[0].strip()
if newpath:
ip.magic('cd %s' % newpath)
ip.magic('cd %s' % newpath.decode('utf-8'))

# remove from namespace
del j

0 comments on commit d692bc6

Please sign in to comment.