Show More
@@ -15,7 +15,14 b' def workdir_f(line):' | |||||
15 | elif workdir is None: |
|
15 | elif workdir is None: | |
16 | print "Please set workdir first by doing e.g. 'workdir q:/'" |
|
16 | print "Please set workdir first by doing e.g. 'workdir q:/'" | |
17 | else: |
|
17 | else: | |
18 | print "Execute command in",workdir |
|
18 | sp = cmd.split(None,1) | |
|
19 | if len(sp) == 1: | |||
|
20 | head, tail = cmd, '' | |||
|
21 | else: | |||
|
22 | head, tail = sp | |||
|
23 | if os.path.isfile(head): | |||
|
24 | cmd = os.path.abspath(head) + ' ' + tail | |||
|
25 | print "Execute command",cmd,"in",workdir | |||
19 | ret = subprocess.call(cmd, shell = True, cwd = workdir) |
|
26 | ret = subprocess.call(cmd, shell = True, cwd = workdir) | |
20 |
|
27 | |||
21 | ip.defalias("workdir",workdir_f) |
|
28 | ip.defalias("workdir",workdir_f) |
General Comments 0
You need to be logged in to leave comments.
Login now