liveConsole 1.7.1__py3-none-any.whl → 1.7.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.

Potentially problematic release.


This version of liveConsole might be problematic. Click here for more details.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: liveConsole
3
- Version: 1.7.1
3
+ Version: 1.7.2
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,18 +1,18 @@
1
- liveconsole-1.7.1.dist-info/licenses/LICENSE,sha256=7dZ0zL72aGaFE0C9DxacOpnaSkC5jajhG6iL7lqhWmU,1064
1
+ liveconsole-1.7.2.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=anitwu82nowLlW1e3ukD3pde1zLu7CLfJ0YTXnqe5aU,11994
8
+ pysole/pysole.py,sha256=Y65Sxn3knI6O5qWf_SemhNqYq_a_9j8UmFN_in3MkPo,12096
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.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,,
14
+ liveconsole-1.7.2.dist-info/METADATA,sha256=wHbOWU78adzKUY7jBr-NuF73_0CHAeiiXrmTGjzw1QM,4955
15
+ liveconsole-1.7.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
16
+ liveconsole-1.7.2.dist-info/entry_points.txt,sha256=qtvuJHcex4QqM97x_UawFWJYnfhQRl0jhqLcWRpnAGo,84
17
+ liveconsole-1.7.2.dist-info/top_level.txt,sha256=DlpA93ScJbRZcF8kGSc5YoO8Ntu1ib1_MEZMb4xea_Q,7
18
+ liveconsole-1.7.2.dist-info/RECORD,,
pysole/pysole.py CHANGED
@@ -86,6 +86,7 @@ class InteractiveConsole(ctk.CTk):
86
86
 
87
87
  self.runRemainingCode = runRemainingCode
88
88
  self.printStartupCode = printStartupCode
89
+ self.leadingWhitespaceLen = 0
89
90
  self.removeWaterMark = removeWaterMark
90
91
  self.startupCode = ()
91
92
  if runRemainingCode:
@@ -96,8 +97,10 @@ class InteractiveConsole(ctk.CTk):
96
97
  with open(filename, "r", encoding="utf-8") as f:
97
98
  lines = f.readlines()
98
99
 
99
- startLine = callerFrame.f_lineno
100
- self.startupCode = lines[startLine:]
100
+ startLineIndex = callerFrame.f_lineno
101
+ startLine = lines[startLineIndex - 1]
102
+ self.leadingWhitespaceLen = len(startLine) - len(startLine.lstrip())
103
+ self.startupCode = lines[startLineIndex:]
101
104
 
102
105
  def _createMenu(self):
103
106
  """Create a menu bar using CTkOptionMenu."""
@@ -281,14 +284,12 @@ class InteractiveConsole(ctk.CTk):
281
284
  self.console.newline()
282
285
 
283
286
  for line in self.startupCode:
284
- line = line.rstrip()
287
+ line = line.rstrip()[self.leadingWhitespaceLen:]
285
288
  while self.console.isExecuting:
286
289
  time.sleep(0.01)
287
290
  if self.printStartupCode:
288
- # self.console.writeOutput(line)
289
291
  self.console.runCommand(line, printCommand=True)
290
292
  else:
291
- # self.console.writeOutput(line)
292
293
  self.console.runCommand(line, printCommand=False)
293
294
 
294
295
  if self.runRemainingCode == True and self.printStartupCode == False: