Python script to change dir for user
<p>I am trying to create Python script <code>jump.py</code> that allows me to jump to a set of predefined dirs, and looks like it is not possible to do this, because after scripts exits, the previous directory is restored:</p>

<pre><code>import os

print(os.getcwd())
os.chdir('..')
print(os.getcwd())
</code></pre>

<hr>

<pre><code>[micro]$ python jump.py 
/home/iset/go/src/github.com/zyedidia/micro
/home/iset/go/src/github.com/zyedidia
[micro]$ 
</code></pre>

<p>Is that at all possible to land to <code>[zyedidia]</code> dir after the script finishes?</p>

<p>You can try this;</p>

<pre><code>import os

print(os.getcwd())
os.chdir('..')
print(os.getcwd())
shell = os.environ.get('SHELL', '/bin/sh')
os.execl(shell, shell)
</code></pre>

python shell cd