##// END OF EJS Templates
Allow recursive execution of IPython code in MTInteractiveShell.runsource by checking if we are already in worker thread, and execute code directly if we are.
Allow recursive execution of IPython code in MTInteractiveShell.runsource by checking if we are already in worker thread, and execute code directly if we are.

File last commit:

r988:2f09c2ab
r1053:da4dd09c
Show More
test_cd.ipy
18 lines | 289 B | text/plain | TextLexer
# assumes there is /tmp and /opt
def curpath():
cwd = os.path.splitdrive(os.getcwd())[1].replace('\\','/')
print cwd
return cwd
import os
cd /
assert curpath() == '/'
%cd /tmp
assert curpath() == '/tmp'
pushd /opt
assert curpath() == '/opt'
popd
assert curpath() == '/tmp'