liveConsole 1.7.0__tar.gz → 1.7.1__tar.gz

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.
Files changed (24) hide show
  1. {liveconsole-1.7.0/src/liveConsole.egg-info → liveconsole-1.7.1}/PKG-INFO +1 -1
  2. {liveconsole-1.7.0 → liveconsole-1.7.1}/pyproject.toml +1 -1
  3. {liveconsole-1.7.0 → liveconsole-1.7.1/src/liveConsole.egg-info}/PKG-INFO +1 -1
  4. {liveconsole-1.7.0 → liveconsole-1.7.1}/src/pysole/pysole.py +33 -6
  5. {liveconsole-1.7.0 → liveconsole-1.7.1}/LICENSE +0 -0
  6. {liveconsole-1.7.0 → liveconsole-1.7.1}/MANIFEST.in +0 -0
  7. {liveconsole-1.7.0 → liveconsole-1.7.1}/README.md +0 -0
  8. {liveconsole-1.7.0 → liveconsole-1.7.1}/setup.cfg +0 -0
  9. {liveconsole-1.7.0 → liveconsole-1.7.1}/src/liveConsole.egg-info/SOURCES.txt +0 -0
  10. {liveconsole-1.7.0 → liveconsole-1.7.1}/src/liveConsole.egg-info/dependency_links.txt +0 -0
  11. {liveconsole-1.7.0 → liveconsole-1.7.1}/src/liveConsole.egg-info/entry_points.txt +0 -0
  12. {liveconsole-1.7.0 → liveconsole-1.7.1}/src/liveConsole.egg-info/requires.txt +0 -0
  13. {liveconsole-1.7.0 → liveconsole-1.7.1}/src/liveConsole.egg-info/top_level.txt +0 -0
  14. {liveconsole-1.7.0 → liveconsole-1.7.1}/src/pysole/__init__.py +0 -0
  15. {liveconsole-1.7.0 → liveconsole-1.7.1}/src/pysole/__main__.py +0 -0
  16. {liveconsole-1.7.0 → liveconsole-1.7.1}/src/pysole/commandHistory.py +0 -0
  17. {liveconsole-1.7.0 → liveconsole-1.7.1}/src/pysole/helpTab.py +0 -0
  18. {liveconsole-1.7.0 → liveconsole-1.7.1}/src/pysole/liveConsole.py +0 -0
  19. {liveconsole-1.7.0 → liveconsole-1.7.1}/src/pysole/mainConsole.py +0 -0
  20. {liveconsole-1.7.0 → liveconsole-1.7.1}/src/pysole/settings.json +0 -0
  21. {liveconsole-1.7.0 → liveconsole-1.7.1}/src/pysole/styledTextbox.py +0 -0
  22. {liveconsole-1.7.0 → liveconsole-1.7.1}/src/pysole/suggestionManager.py +0 -0
  23. {liveconsole-1.7.0 → liveconsole-1.7.1}/src/pysole/themes.json +0 -0
  24. {liveconsole-1.7.0 → liveconsole-1.7.1}/src/pysole/utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: liveConsole
3
- Version: 1.7.0
3
+ Version: 1.7.1
4
4
  Summary: An IDLE-like debugger to allow for real-time command injection for debugging and testing python code
5
5
  Author-email: Tzur Soffer <tzur.soffer@gmail.com>
6
6
  License: MIT
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "liveConsole"
3
- version = "1.7.0"
3
+ version = "1.7.1"
4
4
  description = "An IDLE-like debugger to allow for real-time command injection for debugging and testing python code"
5
5
  authors = [{ name="Tzur Soffer", email="tzur.soffer@gmail.com" }]
6
6
  license = {text = "MIT"}
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: liveConsole
3
- Version: 1.7.0
3
+ Version: 1.7.1
4
4
  Summary: An IDLE-like debugger to allow for real-time command injection for debugging and testing python code
5
5
  Author-email: Tzur Soffer <tzur.soffer@gmail.com>
6
6
  License: MIT
@@ -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=True):
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.console.newline()
258
- self.console.writeOutput("Welcome to Pysole, if you find me useful, please star me on github:\nhttps://github.com/TzurSoffer/Pysole", "instruction")
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, runRemainingCode=False, printStartupCode=False, **kwargs):
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