##// END OF EJS Templates
Fixes for test suite in win32 when all dependencies (esp. Twisted) are...
Fixes for test suite in win32 when all dependencies (esp. Twisted) are installed. Also activated testing.tools to be picked up by the test suite (was excluded), this gives us a few more tests. Status: - On Linux, the full suite passes like before. - On Win32, now that we have Twisted, we're seeing a few failures, because I don't have the WinHPC server stuff. These should be easy for Brian to fix. There are also two tests where the Skip nose exception isn't recognized by Twisted, should also be easy. I'll file tickets for those.

File last commit:

r2267:928c921b
r2461:a97dcd31
Show More
ipy_workdir.py
43 lines | 1.0 KiB | text/x-python | PythonLexer
#!/usr/bin/env python
from IPython.core import ipapi
ip = ipapi.get()
import os, subprocess
workdir = None
def workdir_f(ip,line):
""" Exceute commands residing in cwd elsewhere
Example::
workdir /myfiles
cd bin
workdir myscript.py
executes myscript.py (stored in bin, but not in path) in /myfiles
"""
global workdir
dummy,cmd = line.split(None,1)
if os.path.isdir(cmd):
workdir = os.path.abspath(cmd)
print "Set workdir",workdir
elif workdir is None:
print "Please set workdir first by doing e.g. 'workdir q:/'"
else:
sp = cmd.split(None,1)
if len(sp) == 1:
head, tail = cmd, ''
else:
head, tail = sp
if os.path.isfile(head):
cmd = os.path.abspath(head) + ' ' + tail
print "Execute command '" + cmd+ "' in",workdir
olddir = os.getcwd()
os.chdir(workdir)
try:
os.system(cmd)
finally:
os.chdir(olddir)
ip.define_alias("workdir",workdir_f)