liveConsole 1.7.0__py3-none-any.whl → 1.7.1__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.
Potentially problematic release.
This version of liveConsole might be problematic. Click here for more details.
- {liveconsole-1.7.0.dist-info → liveconsole-1.7.1.dist-info}/METADATA +1 -1
- {liveconsole-1.7.0.dist-info → liveconsole-1.7.1.dist-info}/RECORD +7 -7
- pysole/pysole.py +33 -6
- {liveconsole-1.7.0.dist-info → liveconsole-1.7.1.dist-info}/WHEEL +0 -0
- {liveconsole-1.7.0.dist-info → liveconsole-1.7.1.dist-info}/entry_points.txt +0 -0
- {liveconsole-1.7.0.dist-info → liveconsole-1.7.1.dist-info}/licenses/LICENSE +0 -0
- {liveconsole-1.7.0.dist-info → liveconsole-1.7.1.dist-info}/top_level.txt +0 -0
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
liveconsole-1.7.
|
|
1
|
+
liveconsole-1.7.1.dist-info/licenses/LICENSE,sha256=7dZ0zL72aGaFE0C9DxacOpnaSkC5jajhG6iL7lqhWmU,1064
|
|
2
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
7
|
pysole/mainConsole.py,sha256=AzAUSP5W1jUhYnnGUNOG8LUGPkRW8jOqOHlk-pJC_V4,15053
|
|
8
|
-
pysole/pysole.py,sha256=
|
|
8
|
+
pysole/pysole.py,sha256=anitwu82nowLlW1e3ukD3pde1zLu7CLfJ0YTXnqe5aU,11994
|
|
9
9
|
pysole/settings.json,sha256=oFguWetRe_vGXUrqWSFUvY3JmGIArUZYpSiA8YZgRU8,722
|
|
10
10
|
pysole/styledTextbox.py,sha256=qWnwGAKjl7R2HYPXQOr8GrGYIr4JC8PzmeioOCH7hGo,2236
|
|
11
11
|
pysole/suggestionManager.py,sha256=EUFeCQoZnLS8EjPPNuZpzjY0BR07m2KP5TloyaMDVGY,6457
|
|
12
12
|
pysole/themes.json,sha256=wv56r5XOV-ao7dY4_5Yjsio9VvJ58vHOI9nT7MEbXKY,2525
|
|
13
13
|
pysole/utils.py,sha256=-mGHAp0MkbMPQ9eYzPmo5AGHDLuQ9NfPio_2_iaiCuY,294
|
|
14
|
-
liveconsole-1.7.
|
|
15
|
-
liveconsole-1.7.
|
|
16
|
-
liveconsole-1.7.
|
|
17
|
-
liveconsole-1.7.
|
|
18
|
-
liveconsole-1.7.
|
|
14
|
+
liveconsole-1.7.1.dist-info/METADATA,sha256=UogN-5fZCBKdaIJLDYm-DiDQ2XYjvOCGxbf7VFrNYLs,4955
|
|
15
|
+
liveconsole-1.7.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
16
|
+
liveconsole-1.7.1.dist-info/entry_points.txt,sha256=qtvuJHcex4QqM97x_UawFWJYnfhQRl0jhqLcWRpnAGo,84
|
|
17
|
+
liveconsole-1.7.1.dist-info/top_level.txt,sha256=DlpA93ScJbRZcF8kGSc5YoO8Ntu1ib1_MEZMb4xea_Q,7
|
|
18
|
+
liveconsole-1.7.1.dist-info/RECORD,,
|
pysole/pysole.py
CHANGED
|
@@ -39,8 +39,9 @@ class InteractiveConsole(ctk.CTk):
|
|
|
39
39
|
"""Main console window application."""
|
|
40
40
|
|
|
41
41
|
def __init__(self, userGlobals=None, userLocals=None, callerFrame=None,
|
|
42
|
-
defaultSize=None, primaryPrompt=None,
|
|
43
|
-
runRemainingCode=False, printStartupCode=
|
|
42
|
+
defaultSize=None, primaryPrompt=None, font=None, fontSize=None,
|
|
43
|
+
runRemainingCode=False, printStartupCode=False,
|
|
44
|
+
removeWaterMark=False):
|
|
44
45
|
super().__init__()
|
|
45
46
|
with open(settingsPath, "r") as f:
|
|
46
47
|
settings = json.load(f)
|
|
@@ -52,6 +53,10 @@ class InteractiveConsole(ctk.CTk):
|
|
|
52
53
|
self.BEHAVIOR["PRIMARY_PROMPT"] = primaryPrompt
|
|
53
54
|
if defaultSize != None:
|
|
54
55
|
self.BEHAVIOR["DEFAULT_SIZE"] = defaultSize
|
|
56
|
+
if font != None:
|
|
57
|
+
self.FONT["FONT"] = font
|
|
58
|
+
if fontSize != None:
|
|
59
|
+
self.FONT["FONT_SIZE"] = fontSize
|
|
55
60
|
|
|
56
61
|
self.title("Live Interactive Console")
|
|
57
62
|
self.geometry(self.BEHAVIOR["DEFAULT_SIZE"])
|
|
@@ -79,7 +84,9 @@ class InteractiveConsole(ctk.CTk):
|
|
|
79
84
|
self._setupOutputRedirect()
|
|
80
85
|
self._setupInputRedirect()
|
|
81
86
|
|
|
87
|
+
self.runRemainingCode = runRemainingCode
|
|
82
88
|
self.printStartupCode = printStartupCode
|
|
89
|
+
self.removeWaterMark = removeWaterMark
|
|
83
90
|
self.startupCode = ()
|
|
84
91
|
if runRemainingCode:
|
|
85
92
|
code_obj = callerFrame.f_code
|
|
@@ -254,24 +261,44 @@ class InteractiveConsole(ctk.CTk):
|
|
|
254
261
|
def probe(self, *args, **kwargs):
|
|
255
262
|
"""Start the console main loop."""
|
|
256
263
|
def runStartup():
|
|
257
|
-
self.
|
|
258
|
-
|
|
264
|
+
if not self.removeWaterMark:
|
|
265
|
+
m = (
|
|
266
|
+
"Welcome to Pysole, if you find me useful, please star me on GitHub:\n"
|
|
267
|
+
"https://github.com/TzurSoffer/Pysole"
|
|
268
|
+
)
|
|
269
|
+
stdPrint(m)
|
|
270
|
+
self.console.newline()
|
|
271
|
+
self.console.writeOutput(m, "instruction")
|
|
272
|
+
time.sleep(0.1)
|
|
273
|
+
if self.runRemainingCode:
|
|
274
|
+
if self.printStartupCode:
|
|
275
|
+
self.console.addPrompt()
|
|
276
|
+
else:
|
|
277
|
+
self.console.newline()
|
|
278
|
+
else:
|
|
279
|
+
self.console.addPrompt()
|
|
280
|
+
elif self.runRemainingCode == True and self.printStartupCode == False:
|
|
281
|
+
self.console.newline()
|
|
282
|
+
|
|
259
283
|
for line in self.startupCode:
|
|
260
284
|
line = line.rstrip()
|
|
261
285
|
while self.console.isExecuting:
|
|
262
286
|
time.sleep(0.01)
|
|
263
287
|
if self.printStartupCode:
|
|
288
|
+
# self.console.writeOutput(line)
|
|
264
289
|
self.console.runCommand(line, printCommand=True)
|
|
265
290
|
else:
|
|
291
|
+
# self.console.writeOutput(line)
|
|
266
292
|
self.console.runCommand(line, printCommand=False)
|
|
267
293
|
|
|
268
|
-
if self.printStartupCode == False:
|
|
294
|
+
if self.runRemainingCode == True and self.printStartupCode == False:
|
|
269
295
|
self.console.resetCurrentLineNumber()
|
|
270
296
|
self.console.addPrompt()
|
|
271
297
|
threading.Thread(target=runStartup).start()
|
|
272
298
|
self.mainloop(*args, **kwargs)
|
|
273
299
|
|
|
274
|
-
def probe(userGlobals=None, userLocals=None, callerFrame=None,
|
|
300
|
+
def probe(userGlobals=None, userLocals=None, callerFrame=None,
|
|
301
|
+
runRemainingCode=False, printStartupCode=False, **kwargs):
|
|
275
302
|
if callerFrame == None:
|
|
276
303
|
callerFrame = inspect.currentframe().f_back
|
|
277
304
|
InteractiveConsole(userGlobals=userGlobals,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|