Skip to content

Commit fd77a4e

Browse files
committed
chore: python readline standard library is not available on Windows, use pyreadline3 instead
1 parent c57d51c commit fd77a4e

3 files changed

Lines changed: 18 additions & 2 deletions

File tree

poetry.lock

Lines changed: 12 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ include = [
2828

2929
[tool.poetry.dependencies]
3030
python = "^3.8"
31+
pyreadline3 = "^3.4.1"
3132
pminit = { version = "*", allow-prereleases = true }
3233

3334

python/pythonmonkey/cli/pmjs.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,11 @@
33
# @author Wes Garland, wes@distributive.network
44
# @date June 2023
55

6-
import sys, os, readline, signal, getopt
6+
import sys, os, signal, getopt
7+
try:
8+
import readline # Unix
9+
except ImportError:
10+
import pyreadline3 as readline # Windows
711
import pythonmonkey as pm
812
globalThis = pm.eval("globalThis")
913
evalOpts = { 'filename': __file__, 'fromPythonFrame': True, 'strict': False }

0 commit comments

Comments
 (0)