(s)
| 85 | |
| 86 | |
| 87 | def cmd_split(s): |
| 88 | import shlex |
| 89 | |
| 90 | return shlex.split(s) # shlex is more right |
| 91 | # shlex.split is slow, use a simple version, only consider most case |
| 92 | # def extract(m): |
| 93 | # if m.lastindex == 3: # \ escape version. remove it |
| 94 | # return m.group(m.lastindex).replace("\\ ", " ") |
| 95 | # return m.group(m.lastindex) |
| 96 | |
| 97 | # return [extract(m) for m in cmd_split_pattern.finditer(s)] |
| 98 | |
| 99 | |
| 100 | def readFileArgs(path): |
no outgoing calls
no test coverage detected