| 262 | raise Exception("无法读取文件") |
| 263 | |
| 264 | class FileWrapper: |
| 265 | def __init__(self, data): |
| 266 | self.data = data |
| 267 | self.position = 0 |
| 268 | |
| 269 | def read(self): |
| 270 | return self.data |
| 271 | |
| 272 | def close(self): |
| 273 | pass |
| 274 | |
| 275 | return FileWrapper(result.stdout) |
| 276 |