| 39 | const execPromise = promisify(exec) |
| 40 | |
| 41 | export interface Options extends SpawnOptions { |
| 42 | /** |
| 43 | * if binary is enabled message and stderr events will not be emitted |
| 44 | */ |
| 45 | mode?: 'text' | 'json' | 'binary' |
| 46 | formatter?: string | ((param: string) => any) |
| 47 | parser?: string | ((param: string) => any) |
| 48 | stderrParser?: string | ((param: string) => any) |
| 49 | encoding?: BufferEncoding |
| 50 | pythonPath?: string |
| 51 | /** |
| 52 | * see https://docs.python.org/3.7/using/cmdline.html |
| 53 | */ |
| 54 | pythonOptions?: string[] |
| 55 | /** |
| 56 | * overrides scriptPath passed into PythonShell constructor |
| 57 | */ |
| 58 | scriptPath?: string |
| 59 | /** |
| 60 | * arguments to your program |
| 61 | */ |
| 62 | args?: string[] |
| 63 | } |
| 64 | |
| 65 | export class PythonShellError extends Error { |
| 66 | traceback: string | Buffer; |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…