Skip to content

Commit

Permalink
fix: update readme & trigger new release
Browse files Browse the repository at this point in the history
  • Loading branch information
Almenon committed Feb 22, 2020
1 parent 08899e7 commit 8f85945
Showing 1 changed file with 26 additions and 14 deletions.
40 changes: 26 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,29 +36,41 @@ Semantic release cheatsheet:
#### Table of Contents

- [constructor](#constructor)
- [Parameters](#parameters)
- [executing](#executing)
- [running](#running)
- [debounce](#debounce)
- [execCode](#execcode)
- [Parameters](#parameters-1)
- [sendStdin](#sendstdin)
- [Parameters](#parameters-2)
- [restart](#restart)
- [Parameters](#parameters-3)
- [stop](#stop)
- [start](#start)
- [onResult](#onresult)
- [Parameters](#parameters-4)
- [onPrint](#onprint)
- [Parameters](#parameters-5)
- [onStderr](#onstderr)
- [Parameters](#parameters-6)
- [handleResult](#handleresult)
- [Parameters](#parameters-7)
- [checkSyntax](#checksyntax)
- [Parameters](#parameters-8)
- [checkSyntaxFile](#checksyntaxfile)
- [Parameters](#parameters-9)
- [formatPythonException](#formatpythonexception)
- [Parameters](#parameters-10)
- [Examples](#examples)

### constructor

starts python_evaluator.py

**Parameters**
#### Parameters

- `options` Process / Python options. If not specified sensible defaults are inferred.
- `options` Process / Python options. If not specified sensible defaults are inferred. (optional, default `{}`)

### executing

Expand All @@ -78,13 +90,13 @@ thanks to <https://stackoverflow.com/a/1909508/6629672>

does not do anything if program is currently executing code

**Parameters**
#### Parameters

- `code`

### sendStdin

**Parameters**
#### Parameters

- `message` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**

Expand All @@ -93,7 +105,7 @@ does not do anything if program is currently executing code
kills python process and restarts. Force-kills if necessary after 50ms.
After process restarts the callback passed in is invoked

**Parameters**
#### Parameters

- `callback` (optional, default `()=>{}`)

Expand All @@ -111,7 +123,7 @@ starts python_evaluator.py. Will NOT WORK with python 2
Overwrite this with your own handler.
is called when program fails or completes

**Parameters**
#### Parameters

- `foo`

Expand All @@ -120,7 +132,7 @@ is called when program fails or completes
Overwrite this with your own handler.
Is called when program prints

**Parameters**
#### Parameters

- `foo` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**

Expand All @@ -129,23 +141,23 @@ Is called when program prints
Overwrite this with your own handler.
Is called when program logs stderr

**Parameters**
#### Parameters

- `foo` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**

### handleResult

handles pyshell results and calls onResult / onPrint

**Parameters**
#### Parameters

- `results` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**

### checkSyntax

checks syntax without executing code

**Parameters**
#### Parameters

- `code` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**

Expand All @@ -155,21 +167,21 @@ Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/

checks syntax without executing code

**Parameters**
#### Parameters

- `filePath` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**

Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)** rejects w/ stderr if syntax failure

### formatPythonException

gets rid of unnecessary exception data, among other things
gets rid of unnecessary File "<string>" message in exception

**Parameters**
#### Parameters

- `err`

**Examples**
#### Examples

```javascript
err:
Expand Down

0 comments on commit 8f85945

Please sign in to comment.