liveConsole 1.6.0__py3-none-any.whl → 1.6.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {liveconsole-1.6.0.dist-info → liveconsole-1.6.2.dist-info}/METADATA +1 -1
- {liveconsole-1.6.0.dist-info → liveconsole-1.6.2.dist-info}/RECORD +9 -9
- pysole/__init__.py +1 -1
- pysole/mainConsole.py +36 -5
- pysole/settings.json +12 -12
- {liveconsole-1.6.0.dist-info → liveconsole-1.6.2.dist-info}/WHEEL +0 -0
- {liveconsole-1.6.0.dist-info → liveconsole-1.6.2.dist-info}/entry_points.txt +0 -0
- {liveconsole-1.6.0.dist-info → liveconsole-1.6.2.dist-info}/licenses/LICENSE +0 -0
- {liveconsole-1.6.0.dist-info → liveconsole-1.6.2.dist-info}/top_level.txt +0 -0
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
liveconsole-1.6.
|
|
2
|
-
pysole/__init__.py,sha256=
|
|
1
|
+
liveconsole-1.6.2.dist-info/licenses/LICENSE,sha256=7dZ0zL72aGaFE0C9DxacOpnaSkC5jajhG6iL7lqhWmU,1064
|
|
2
|
+
pysole/__init__.py,sha256=SfaSBmFVSmhyf55UedBCqhi2Ss6Tre-BCKtZb3bSr2k,60
|
|
3
3
|
pysole/__main__.py,sha256=QvVFH8J2yzgQaF9MosQ6ajCW67uiRbYliePsTEUCIAg,82
|
|
4
4
|
pysole/commandHistory.py,sha256=xJtWbJ_vgJo2QGgaZJsApTOi_Hm8Yz0V9_zqQUCItj8,1084
|
|
5
5
|
pysole/helpTab.py,sha256=o0uSY-8sw7FuuBrt0FQwcgK6ljNVx3IgRnW7heZ6GvY,2454
|
|
6
6
|
pysole/liveConsole.py,sha256=lzS3dphAQ1i8pQC4E2FY-FyMMSKi-dAN0xr6XUgrNmo,168
|
|
7
|
-
pysole/mainConsole.py,sha256=
|
|
7
|
+
pysole/mainConsole.py,sha256=CkZGUOxLhHRRb21gHfxRmuGOwf-H2T0feI9KDskXdgg,14397
|
|
8
8
|
pysole/pysole.py,sha256=vTmPvS4nzapVudNPtf2JrnwBWB-x_n-XxBsr4jW7MK8,9230
|
|
9
|
-
pysole/settings.json,sha256=
|
|
9
|
+
pysole/settings.json,sha256=6wCdMlemV6PblPKeQQsIiCrGWPLDLOMFD3hLMVAXL24,687
|
|
10
10
|
pysole/styledTextbox.py,sha256=zpbaN0qX5FduhNyuWGU7y8Ll8J9p9YqczpSuRLo4PX0,2120
|
|
11
11
|
pysole/suggestionManager.py,sha256=EUFeCQoZnLS8EjPPNuZpzjY0BR07m2KP5TloyaMDVGY,6457
|
|
12
12
|
pysole/themes.json,sha256=2RG3ohn2ZBc2-h9bdooQZD6hW5pD41a5c2jdaKDA4MA,2385
|
|
13
13
|
pysole/utils.py,sha256=VN42ukHMJpOvGb7ZV-qhF_zRUt13hzJKV_uRn9t6580,155
|
|
14
|
-
liveconsole-1.6.
|
|
15
|
-
liveconsole-1.6.
|
|
16
|
-
liveconsole-1.6.
|
|
17
|
-
liveconsole-1.6.
|
|
18
|
-
liveconsole-1.6.
|
|
14
|
+
liveconsole-1.6.2.dist-info/METADATA,sha256=WSL_DMarxOF1Gvz0BzC1aL8PgyI_1WFP6LuIm2nAatw,4011
|
|
15
|
+
liveconsole-1.6.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
16
|
+
liveconsole-1.6.2.dist-info/entry_points.txt,sha256=qtvuJHcex4QqM97x_UawFWJYnfhQRl0jhqLcWRpnAGo,84
|
|
17
|
+
liveconsole-1.6.2.dist-info/top_level.txt,sha256=DlpA93ScJbRZcF8kGSc5YoO8Ntu1ib1_MEZMb4xea_Q,7
|
|
18
|
+
liveconsole-1.6.2.dist-info/RECORD,,
|
pysole/__init__.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
from .pysole import probe, InteractiveConsole
|
|
1
|
+
from .pysole import probe, _standalone, InteractiveConsole
|
pysole/mainConsole.py
CHANGED
|
@@ -23,6 +23,7 @@ class InteractiveConsoleText(StyledTextWindow):
|
|
|
23
23
|
|
|
24
24
|
self.inputVar = tk.StringVar()
|
|
25
25
|
self.waitingForInput = False
|
|
26
|
+
self.inputLine = "1.0"
|
|
26
27
|
|
|
27
28
|
# Track current command
|
|
28
29
|
self.currentCommandLine = 1
|
|
@@ -41,6 +42,7 @@ class InteractiveConsoleText(StyledTextWindow):
|
|
|
41
42
|
self.bind("<Control-c>", self.cancel)
|
|
42
43
|
self.bind("<Tab>", self.onTab)
|
|
43
44
|
self.bind("<BackSpace>", self.onBackspace)
|
|
45
|
+
self.bind("<Delete>", self.onDelete)
|
|
44
46
|
self.bind("<KeyRelease>", self.onKeyRelease)
|
|
45
47
|
self.bind("<KeyPress>", self.onKeyPress)
|
|
46
48
|
self.bind("<Button-1>", self.onClick)
|
|
@@ -64,9 +66,13 @@ class InteractiveConsoleText(StyledTextWindow):
|
|
|
64
66
|
end = "end-1c"
|
|
65
67
|
|
|
66
68
|
self.delete(start, end)
|
|
67
|
-
|
|
69
|
+
if newCommand:
|
|
70
|
+
self.insert(start, newCommand)
|
|
71
|
+
self.mark_set("insert", "end")
|
|
68
72
|
self.see("end")
|
|
69
|
-
|
|
73
|
+
# Ensure styling/lexer applied after programmatic change:
|
|
74
|
+
self.updateStyling(start=self.getPromptPosition())
|
|
75
|
+
|
|
70
76
|
def isCursorInEditableArea(self):
|
|
71
77
|
"""Check if cursor is in the editable command area."""
|
|
72
78
|
if self.isExecuting:
|
|
@@ -120,10 +126,11 @@ class InteractiveConsoleText(StyledTextWindow):
|
|
|
120
126
|
def readInput(self):
|
|
121
127
|
"""Return the last entered line when input() is called."""
|
|
122
128
|
self.waitingForInput = True
|
|
129
|
+
self.inputLine = self.index("end -1c")
|
|
123
130
|
self.wait_variable(self.inputVar) #< waits until Enter is pressed
|
|
124
131
|
line = self.inputVar.get()
|
|
125
132
|
self.inputVar.set("") #< reset
|
|
126
|
-
return(line)
|
|
133
|
+
return(line or "\n")
|
|
127
134
|
|
|
128
135
|
def onShiftEnter(self, event):
|
|
129
136
|
"""Handle Shift+Enter - new line with auto-indent."""
|
|
@@ -162,15 +169,35 @@ class InteractiveConsoleText(StyledTextWindow):
|
|
|
162
169
|
|
|
163
170
|
def onBackspace(self, event):
|
|
164
171
|
"""Prevent backspace from deleting the prompt."""
|
|
172
|
+
|
|
173
|
+
if self.waitingForInput: #< During input mode, only allow editing after input start
|
|
174
|
+
if self.compare("insert", "<=", self.inputLine):
|
|
175
|
+
return "break"
|
|
176
|
+
return None
|
|
177
|
+
|
|
165
178
|
if not self.isCursorInEditableArea():
|
|
166
|
-
return
|
|
179
|
+
return "break"
|
|
167
180
|
|
|
168
181
|
# Check if we're at the prompt boundary
|
|
169
182
|
cursorPos = self.index("insert")
|
|
170
183
|
promptPos = self.getPromptPosition()
|
|
171
184
|
|
|
172
185
|
if self.compare(cursorPos, "<=", promptPos):
|
|
186
|
+
return "break"
|
|
187
|
+
|
|
188
|
+
return None
|
|
189
|
+
|
|
190
|
+
def onDelete(self, event):
|
|
191
|
+
"""Prevent delete from deleting protected content."""
|
|
192
|
+
if self.waitingForInput: #< During input mode, only allow editing after input start
|
|
193
|
+
if self.compare("insert", "<=", self.inputLine):
|
|
194
|
+
return("break")
|
|
195
|
+
return(None)
|
|
196
|
+
|
|
197
|
+
if not self.isCursorInEditableArea():
|
|
173
198
|
return("break")
|
|
199
|
+
|
|
200
|
+
return(None)
|
|
174
201
|
|
|
175
202
|
def onClick(self, event):
|
|
176
203
|
"""Handle mouse clicks - Ctrl+Click opens help for the clicked word."""
|
|
@@ -206,7 +233,11 @@ class InteractiveConsoleText(StyledTextWindow):
|
|
|
206
233
|
|
|
207
234
|
def onKeyPress(self, event):
|
|
208
235
|
"""Handle key press events."""
|
|
209
|
-
|
|
236
|
+
if self.waitingForInput: #< During input mode, only allow editing after input start
|
|
237
|
+
if (self.compare("insert", "<=", self.inputLine) and event.keysym == "Left"):
|
|
238
|
+
return("break")
|
|
239
|
+
return(None)
|
|
240
|
+
|
|
210
241
|
if self.suggestionManager.suggestionWindow and \
|
|
211
242
|
self.suggestionManager.suggestionWindow.winfo_viewable():
|
|
212
243
|
if event.keysym == "Escape":
|
pysole/settings.json
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"THEME": {
|
|
3
3
|
"APPEARANCE": "dark",
|
|
4
|
-
"LEXER_STYLE": "
|
|
5
|
-
"BACKGROUND": "#
|
|
6
|
-
"HIGHLIGHTED_BACKGROUND": "#
|
|
7
|
-
"FOREGROUND": "
|
|
8
|
-
"HIGHLIGHTED_FOREGROUND": "
|
|
9
|
-
"INSERTBACKGROUND": "
|
|
10
|
-
"PROMPT": "#
|
|
11
|
-
"OUTPUT": "#
|
|
12
|
-
"ERROR": "#
|
|
13
|
-
"RESULT": "#
|
|
14
|
-
"SUGGESTION_BOX_BG": "#
|
|
15
|
-
"SUGGESTION_BOX_SELECTION_BG": "#
|
|
4
|
+
"LEXER_STYLE": "monokai",
|
|
5
|
+
"BACKGROUND": "#1e1e1e",
|
|
6
|
+
"HIGHLIGHTED_BACKGROUND": "#0078d7",
|
|
7
|
+
"FOREGROUND": "white",
|
|
8
|
+
"HIGHLIGHTED_FOREGROUND": "black",
|
|
9
|
+
"INSERTBACKGROUND": "white",
|
|
10
|
+
"PROMPT": "#00ff00",
|
|
11
|
+
"OUTPUT": "#ffffff",
|
|
12
|
+
"ERROR": "#ff0000",
|
|
13
|
+
"RESULT": "#66ccff",
|
|
14
|
+
"SUGGESTION_BOX_BG": "#2d2d2d",
|
|
15
|
+
"SUGGESTION_BOX_SELECTION_BG": "#0066cc",
|
|
16
16
|
"FONT": {
|
|
17
17
|
"FONT": "Consolas",
|
|
18
18
|
"FONT_SIZE": 12
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|