peek-python 1.6.1__tar.gz → 1.6.2.post1__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: peek-python
3
- Version: 1.6.1
3
+ Version: 1.6.2.post1
4
4
  Summary: peek - debugging and benchmarking made easy
5
5
  Author-email: Ruud van der Ham <rt.van.der.ham@gmail.com>
6
6
  Project-URL: Homepage, https://github.com/salabim/ycecream
@@ -11,6 +11,8 @@ Classifier: Programming Language :: Python :: 3 :: Only
11
11
  Requires-Python: >=3.6
12
12
  Description-Content-Type: text/markdown
13
13
  License-File: license.txt
14
+ Requires-Dist: colorama
15
+ Requires-Dist: six
14
16
 
15
17
  <img src="https://www.salabim.org/peek/peek_logo1.png">
16
18
 
@@ -1002,20 +1004,20 @@ peek("warning", level=2)
1002
1004
  With `peek.show_level()` the program may select which level(s) to show or not.
1003
1005
 
1004
1006
  This is done with a string that specifies which level(s) to show. The string
1005
- consist of one or more specifiers seperated by a `,`. Each specifier may be simple value or a comparison operator
1006
- followed by a value. Valid strings are
1007
+ consist of one or more specifiers seperated by a `,`. Each specifier may be simple value or a pair of values, seperated by a - .
1008
+ Valid strings are
1007
1009
 
1008
1010
  * `peek.show_level("0")` ==> 0
1009
1011
 
1010
1012
  * `peek.show_level("0, 1 , 2")` ==> 0, 1, 2
1011
1013
 
1012
- * `peek.show_level(">1")` ==> 1, 2, 3, ...
1014
+ * `peek.show_level("1-3")` ==> 1, 2, 3
1013
1015
 
1014
- * `peek.show_level("<=2, >=6")` ==> 0, 1, 2, 6, 7. 8, ...
1016
+ * `peek.show_level("1-")` ==> 1, 2, 3, 4, ...
1015
1017
 
1016
- * `peek.show_level("!=1")` ==> 0, 2, 3, 4, ...
1018
+ * `peek.show_level("-2")` ==> 0, 1, 2
1017
1019
 
1018
- * `peek.show_level("==2")` ==> 2
1020
+ * `peek.show_level("-")` ==> 0, 1, 2, 3, ...
1019
1021
 
1020
1022
  Notice that a level matches if any of the specifiers conditions is met.
1021
1023
 
@@ -1027,7 +1029,7 @@ It is also possible to use a float value where the string is expected:
1027
1029
  Only peek with a level that meets any of the specifications is printed.
1028
1030
 
1029
1031
  An obvious use is to set the level of critical info to 0, important info to 1 and warning to 2.
1030
- Then `peek.show_level = "<=1"` will show critical and important info, but no warning info.
1032
+ Then `peek.show_level = "-1"` will show critical and important info, but no warning info.
1031
1033
 
1032
1034
  The default show_level may, of course, be specified in a `peek.toml` file.
1033
1035
 
@@ -1040,6 +1042,13 @@ peek0 = peek.fork(color="red", level=0)
1040
1042
  peek1 = peek.fork(color="yellow", level=1)
1041
1043
  peek2 = peek.fork(color="green", level=2)
1042
1044
  ```
1045
+ If level is the null string, peek will never print. That can be useful to disable peek debug info on a per peek instance basis:
1046
+
1047
+ ```peek_cond = peek.new()
1048
+ peek_cond(1)
1049
+ peek_cond.level = ""
1050
+ peek_cond(2)
1051
+ ```
1043
1052
 
1044
1053
  # Interpreting the line number information
1045
1054
 
@@ -988,20 +988,20 @@ peek("warning", level=2)
988
988
  With `peek.show_level()` the program may select which level(s) to show or not.
989
989
 
990
990
  This is done with a string that specifies which level(s) to show. The string
991
- consist of one or more specifiers seperated by a `,`. Each specifier may be simple value or a comparison operator
992
- followed by a value. Valid strings are
991
+ consist of one or more specifiers seperated by a `,`. Each specifier may be simple value or a pair of values, seperated by a - .
992
+ Valid strings are
993
993
 
994
994
  * `peek.show_level("0")` ==> 0
995
995
 
996
996
  * `peek.show_level("0, 1 , 2")` ==> 0, 1, 2
997
997
 
998
- * `peek.show_level(">1")` ==> 1, 2, 3, ...
998
+ * `peek.show_level("1-3")` ==> 1, 2, 3
999
999
 
1000
- * `peek.show_level("<=2, >=6")` ==> 0, 1, 2, 6, 7. 8, ...
1000
+ * `peek.show_level("1-")` ==> 1, 2, 3, 4, ...
1001
1001
 
1002
- * `peek.show_level("!=1")` ==> 0, 2, 3, 4, ...
1002
+ * `peek.show_level("-2")` ==> 0, 1, 2
1003
1003
 
1004
- * `peek.show_level("==2")` ==> 2
1004
+ * `peek.show_level("-")` ==> 0, 1, 2, 3, ...
1005
1005
 
1006
1006
  Notice that a level matches if any of the specifiers conditions is met.
1007
1007
 
@@ -1013,7 +1013,7 @@ It is also possible to use a float value where the string is expected:
1013
1013
  Only peek with a level that meets any of the specifications is printed.
1014
1014
 
1015
1015
  An obvious use is to set the level of critical info to 0, important info to 1 and warning to 2.
1016
- Then `peek.show_level = "<=1"` will show critical and important info, but no warning info.
1016
+ Then `peek.show_level = "-1"` will show critical and important info, but no warning info.
1017
1017
 
1018
1018
  The default show_level may, of course, be specified in a `peek.toml` file.
1019
1019
 
@@ -1026,6 +1026,13 @@ peek0 = peek.fork(color="red", level=0)
1026
1026
  peek1 = peek.fork(color="yellow", level=1)
1027
1027
  peek2 = peek.fork(color="green", level=2)
1028
1028
  ```
1029
+ If level is the null string, peek will never print. That can be useful to disable peek debug info on a per peek instance basis:
1030
+
1031
+ ```peek_cond = peek.new()
1032
+ peek_cond(1)
1033
+ peek_cond.level = ""
1034
+ peek_cond(2)
1035
+ ```
1029
1036
 
1030
1037
  # Interpreting the line number information
1031
1038