Skip to content

Commit 1bc61e0

Browse files
authored
Fix README.md examples with mode
1 parent 968c651 commit 1bc61e0

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -262,11 +262,11 @@ Example:
262262

263263
```typescript
264264
// send a message in text mode
265-
let shell = new PythonShell('script.py', { mode: 'text '});
265+
let shell = new PythonShell('script.py', { mode: 'text'});
266266
shell.send('hello world!');
267267

268268
// send a message in JSON mode
269-
let shell = new PythonShell('script.py', { mode: 'json '});
269+
let shell = new PythonShell('script.py', { mode: 'json'});
270270
shell.send({ command: "do_stuff", args: [1, 2, 3] });
271271
```
272272

@@ -294,13 +294,13 @@ Example:
294294

295295
```typescript
296296
// receive a message in text mode
297-
let shell = new PythonShell('script.py', { mode: 'text '});
297+
let shell = new PythonShell('script.py', { mode: 'text'});
298298
shell.on('message', function (message) {
299299
// handle message (a line of text from stdout)
300300
});
301301

302302
// receive a message in JSON mode
303-
let shell = new PythonShell('script.py', { mode: 'json '});
303+
let shell = new PythonShell('script.py', { mode: 'json'});
304304
shell.on('message', function (message) {
305305
// handle message (a line of text from stdout, parsed as JSON)
306306
});
@@ -314,7 +314,7 @@ Example:
314314

315315
```typescript
316316
// receive a message in text mode
317-
let shell = new PythonShell('script.py', { mode: 'text '});
317+
let shell = new PythonShell('script.py', { mode: 'text'});
318318
shell.on('stderr', function (stderr) {
319319
// handle stderr (a line of text from stderr)
320320
});

0 commit comments

Comments
 (0)