<div class="gmail_quote">On 3 August 2011 15:00, Julian Taylor <span dir="ltr"><<a href="mailto:jtaylor.debian@googlemail.com">jtaylor.debian@googlemail.com</a>></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 = ['get_ipython().magic("cd /path")']</blockquote></div><br>exec_lines is translated before it'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>