<div class="gmail_quote">On 3 August 2011 15:00, Julian Taylor <span dir="ltr">&lt;<a href="mailto:jtaylor.debian@googlemail.com">jtaylor.debian@googlemail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<div class="im"><br>
</div>cd is a ipython magic, so this should work:<br>
c.InteractiveShellApp.exec_lines = [&#39;get_ipython().magic(&quot;cd /path&quot;)&#39;]</blockquote></div><br>exec_lines is translated before it&#39;s run, though, so IPython magics should work. The problem might be with path characters on Windows:<br>

<br><a href="http://ipython.org/ipython-doc/stable/interactive/reference.html#caution-for-windows-users">http://ipython.org/ipython-doc/stable/interactive/reference.html#caution-for-windows-users</a><br><br>Thomas<br>