peek-python 25.0.22__tar.gz → 25.0.24__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.
- {peek_python-25.0.22 → peek_python-25.0.24}/PKG-INFO +8 -3
- {peek_python-25.0.22 → peek_python-25.0.24}/README.md +7 -2
- {peek_python-25.0.22 → peek_python-25.0.24}/peek/peek.py +11 -5
- {peek_python-25.0.22 → peek_python-25.0.24}/peek_python.egg-info/PKG-INFO +8 -3
- {peek_python-25.0.22 → peek_python-25.0.24}/pyproject.toml +1 -1
- {peek_python-25.0.22 → peek_python-25.0.24}/peek/__init__.py +0 -0
- {peek_python-25.0.22 → peek_python-25.0.24}/peek_python.egg-info/SOURCES.txt +0 -0
- {peek_python-25.0.22 → peek_python-25.0.24}/peek_python.egg-info/dependency_links.txt +0 -0
- {peek_python-25.0.22 → peek_python-25.0.24}/peek_python.egg-info/requires.txt +0 -0
- {peek_python-25.0.22 → peek_python-25.0.24}/peek_python.egg-info/top_level.txt +0 -0
- {peek_python-25.0.22 → peek_python-25.0.24}/setup.cfg +0 -0
- {peek_python-25.0.22 → peek_python-25.0.24}/tests/test_peek.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: peek-python
|
|
3
|
-
Version: 25.0.
|
|
3
|
+
Version: 25.0.24
|
|
4
4
|
Summary: peek - like print, but easy
|
|
5
5
|
Author-email: Ruud van der Ham <rt.van.der.ham@gmail.com>
|
|
6
6
|
Project-URL: Homepage, https://github.com/salabim/peek
|
|
@@ -1359,8 +1359,8 @@ This functionality is particularly useful for entering an answer of an *Advent o
|
|
|
1359
1359
|
|
|
1360
1360
|
## Conditional stop of program
|
|
1361
1361
|
|
|
1362
|
-
With `peek.stop` or `peek.stop()` a program will be stopped (by raising a SystemExit exception), provided peek.enabled is True.
|
|
1363
|
-
If peek.enabled is False, the program will just continue.
|
|
1362
|
+
With `peek.stop` or `peek.stop()` a program will be stopped (by raising a `SystemExit` exception), provided `peek.enabled` is True.
|
|
1363
|
+
If `peek.enabled` is False, the program will just continue.
|
|
1364
1364
|
|
|
1365
1365
|
For example:
|
|
1366
1366
|
```
|
|
@@ -1380,6 +1380,11 @@ stopped by peek.stop
|
|
|
1380
1380
|
|
|
1381
1381
|
and then stop execution.
|
|
1382
1382
|
|
|
1383
|
+
> [!NOTE]
|
|
1384
|
+
>
|
|
1385
|
+
> Under Pythonista, `sys.exit()` will be called.
|
|
1386
|
+
> Under pyodide/xlwings lite, an `Exception` exception will be raised.
|
|
1387
|
+
|
|
1383
1388
|
## Interpreting the line number information
|
|
1384
1389
|
|
|
1385
1390
|
When `show_line_number` is True or peek() is used without any parameters, the output will contain the line number like:
|
|
@@ -1342,8 +1342,8 @@ This functionality is particularly useful for entering an answer of an *Advent o
|
|
|
1342
1342
|
|
|
1343
1343
|
## Conditional stop of program
|
|
1344
1344
|
|
|
1345
|
-
With `peek.stop` or `peek.stop()` a program will be stopped (by raising a SystemExit exception), provided peek.enabled is True.
|
|
1346
|
-
If peek.enabled is False, the program will just continue.
|
|
1345
|
+
With `peek.stop` or `peek.stop()` a program will be stopped (by raising a `SystemExit` exception), provided `peek.enabled` is True.
|
|
1346
|
+
If `peek.enabled` is False, the program will just continue.
|
|
1347
1347
|
|
|
1348
1348
|
For example:
|
|
1349
1349
|
```
|
|
@@ -1363,6 +1363,11 @@ stopped by peek.stop
|
|
|
1363
1363
|
|
|
1364
1364
|
and then stop execution.
|
|
1365
1365
|
|
|
1366
|
+
> [!NOTE]
|
|
1367
|
+
>
|
|
1368
|
+
> Under Pythonista, `sys.exit()` will be called.
|
|
1369
|
+
> Under pyodide/xlwings lite, an `Exception` exception will be raised.
|
|
1370
|
+
|
|
1366
1371
|
## Interpreting the line number information
|
|
1367
1372
|
|
|
1368
1373
|
When `show_line_number` is True or peek() is used without any parameters, the output will contain the line number like:
|
|
@@ -34,7 +34,7 @@ import pprint
|
|
|
34
34
|
import builtins
|
|
35
35
|
import shutil
|
|
36
36
|
|
|
37
|
-
__version__ = "25.0.
|
|
37
|
+
__version__ = "25.0.24"
|
|
38
38
|
|
|
39
39
|
from pathlib import Path
|
|
40
40
|
|
|
@@ -50,9 +50,9 @@ else:
|
|
|
50
50
|
colorama.just_fix_windows_console()
|
|
51
51
|
|
|
52
52
|
try:
|
|
53
|
-
import
|
|
53
|
+
import tomllib
|
|
54
54
|
except ModuleNotFoundError:
|
|
55
|
-
import tomli as
|
|
55
|
+
import tomli as tomllib
|
|
56
56
|
|
|
57
57
|
|
|
58
58
|
class _Peek:
|
|
@@ -275,7 +275,7 @@ class _Peek:
|
|
|
275
275
|
_Peek.in_read_toml_message = f" in reading {toml_file} or environment variable(s)"
|
|
276
276
|
with open(toml_file, "r") as f:
|
|
277
277
|
config_as_str = f.read()
|
|
278
|
-
result.update(
|
|
278
|
+
result.update(tomllib.loads(config_as_str))
|
|
279
279
|
break
|
|
280
280
|
return result
|
|
281
281
|
|
|
@@ -788,7 +788,13 @@ class _Peek:
|
|
|
788
788
|
@property
|
|
789
789
|
def stop(self):
|
|
790
790
|
if self.enabled:
|
|
791
|
-
|
|
791
|
+
if Pyodide:
|
|
792
|
+
raise Exception("stopped by peek.stop")
|
|
793
|
+
elif Pythonista:
|
|
794
|
+
print("stopped by peek.stop")
|
|
795
|
+
sys.exit()
|
|
796
|
+
else:
|
|
797
|
+
raise SystemExit("stopped by peek.stop")
|
|
792
798
|
|
|
793
799
|
def traceback(self):
|
|
794
800
|
if self.show_traceback:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: peek-python
|
|
3
|
-
Version: 25.0.
|
|
3
|
+
Version: 25.0.24
|
|
4
4
|
Summary: peek - like print, but easy
|
|
5
5
|
Author-email: Ruud van der Ham <rt.van.der.ham@gmail.com>
|
|
6
6
|
Project-URL: Homepage, https://github.com/salabim/peek
|
|
@@ -1359,8 +1359,8 @@ This functionality is particularly useful for entering an answer of an *Advent o
|
|
|
1359
1359
|
|
|
1360
1360
|
## Conditional stop of program
|
|
1361
1361
|
|
|
1362
|
-
With `peek.stop` or `peek.stop()` a program will be stopped (by raising a SystemExit exception), provided peek.enabled is True.
|
|
1363
|
-
If peek.enabled is False, the program will just continue.
|
|
1362
|
+
With `peek.stop` or `peek.stop()` a program will be stopped (by raising a `SystemExit` exception), provided `peek.enabled` is True.
|
|
1363
|
+
If `peek.enabled` is False, the program will just continue.
|
|
1364
1364
|
|
|
1365
1365
|
For example:
|
|
1366
1366
|
```
|
|
@@ -1380,6 +1380,11 @@ stopped by peek.stop
|
|
|
1380
1380
|
|
|
1381
1381
|
and then stop execution.
|
|
1382
1382
|
|
|
1383
|
+
> [!NOTE]
|
|
1384
|
+
>
|
|
1385
|
+
> Under Pythonista, `sys.exit()` will be called.
|
|
1386
|
+
> Under pyodide/xlwings lite, an `Exception` exception will be raised.
|
|
1387
|
+
|
|
1383
1388
|
## Interpreting the line number information
|
|
1384
1389
|
|
|
1385
1390
|
When `show_line_number` is True or peek() is used without any parameters, the output will contain the line number like:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|