You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+15-15Lines changed: 15 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -233,6 +233,21 @@ PythonShell.runString('x=1;print(x)', null, function (err, results) {
233
233
});
234
234
```
235
235
236
+
#### `#checkSyntax(code:string)`
237
+
238
+
Checks the syntax of the code and returns a promise.
239
+
Promise is rejected if there is a syntax error.
240
+
241
+
#### `#checkSyntaxFile(filePath:string)`
242
+
243
+
Checks the syntax of the file and returns a promise.
244
+
Promise is rejected if there is a syntax error.
245
+
246
+
#### `#getVersionSync(pythonPath?:string)`
247
+
248
+
Returns the python version. Optional pythonPath param to get the version
249
+
of a specific python interpreter.
250
+
236
251
#### `.send(message)`
237
252
238
253
Sends a message to the Python script via stdin. The data is formatted according to the selected mode (text or JSON), or through a custom function when `formatter` is specified.
@@ -265,21 +280,6 @@ Closes the stdin stream, allowing the Python script to finish and exit. The opti
265
280
266
281
Terminates the python script, the optional end callback is invoked if specified. A kill signal may be provided by `signal`, if `signal` is not specified SIGTERM is sent.
267
282
268
-
#### `checkSyntax(code:string)`
269
-
270
-
Checks the syntax of the code and returns a promise.
271
-
Promise is rejected if there is a syntax error.
272
-
273
-
#### `checkSyntaxFile(filePath:string)`
274
-
275
-
Checks the syntax of the file and returns a promise.
276
-
Promise is rejected if there is a syntax error.
277
-
278
-
#### `getVersionSync(pythonPath?:string)`
279
-
280
-
Returns the python version. Optional pythonPath param to get the version
281
-
of a specific python interpreter.
282
-
283
283
#### event: `message`
284
284
285
285
Fires when a chunk of data is parsed from the stdout stream via the `receive` method. If a `parser` method is specified, the result of this function will be the message value. This event is not emitted in binary mode.
0 commit comments