rsclib 0.66__tar.gz → 0.67__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 (49) hide show
  1. {rsclib-0.66/rsclib.egg-info → rsclib-0.67}/PKG-INFO +11 -5
  2. {rsclib-0.66 → rsclib-0.67}/README.html +6 -2
  3. {rsclib-0.66 → rsclib-0.67}/README.rst +9 -3
  4. rsclib-0.67/rsclib/Version.py +1 -0
  5. {rsclib-0.66 → rsclib-0.67}/rsclib/iter_recipes.py +2 -1
  6. rsclib-0.66/rsclib/Rational.py → rsclib-0.67/rsclib/rational.py +19 -10
  7. {rsclib-0.66 → rsclib-0.67/rsclib.egg-info}/PKG-INFO +11 -5
  8. {rsclib-0.66 → rsclib-0.67}/rsclib.egg-info/SOURCES.txt +1 -1
  9. rsclib-0.66/rsclib/Version.py +0 -1
  10. {rsclib-0.66 → rsclib-0.67}/MANIFEST.in +0 -0
  11. {rsclib-0.66 → rsclib-0.67}/pyproject.toml +0 -0
  12. {rsclib-0.66 → rsclib-0.67}/rsclib/Config_File.py +0 -0
  13. {rsclib-0.66 → rsclib-0.67}/rsclib/IP_Address.py +0 -0
  14. {rsclib-0.66 → rsclib-0.67}/rsclib/Math.py +0 -0
  15. {rsclib-0.66 → rsclib-0.67}/rsclib/PDF_Signature.py +0 -0
  16. {rsclib-0.66 → rsclib-0.67}/rsclib/PM_Value.py +0 -0
  17. {rsclib-0.66 → rsclib-0.67}/rsclib/Phone.py +0 -0
  18. {rsclib-0.66 → rsclib-0.67}/rsclib/TeX_CSV_Writer.py +0 -0
  19. {rsclib-0.66 → rsclib-0.67}/rsclib/__init__.py +0 -0
  20. {rsclib-0.66 → rsclib-0.67}/rsclib/ast_call.py +0 -0
  21. {rsclib-0.66 → rsclib-0.67}/rsclib/ast_cdr.py +0 -0
  22. {rsclib-0.66 → rsclib-0.67}/rsclib/ast_probe.py +0 -0
  23. {rsclib-0.66 → rsclib-0.67}/rsclib/autosuper.py +0 -0
  24. {rsclib-0.66 → rsclib-0.67}/rsclib/base_pickler.py +0 -0
  25. {rsclib-0.66 → rsclib-0.67}/rsclib/bero.py +0 -0
  26. {rsclib-0.66 → rsclib-0.67}/rsclib/capacitance.py +0 -0
  27. {rsclib-0.66 → rsclib-0.67}/rsclib/crm.py +0 -0
  28. {rsclib-0.66 → rsclib-0.67}/rsclib/execute.py +0 -0
  29. {rsclib-0.66 → rsclib-0.67}/rsclib/grepmime.py +0 -0
  30. {rsclib-0.66 → rsclib-0.67}/rsclib/hexdump.py +0 -0
  31. {rsclib-0.66 → rsclib-0.67}/rsclib/inductance.py +0 -0
  32. {rsclib-0.66 → rsclib-0.67}/rsclib/isdn.py +0 -0
  33. {rsclib-0.66 → rsclib-0.67}/rsclib/lc_resonator.py +0 -0
  34. {rsclib-0.66 → rsclib-0.67}/rsclib/nmap.py +0 -0
  35. {rsclib-0.66 → rsclib-0.67}/rsclib/ocf.py +0 -0
  36. {rsclib-0.66 → rsclib-0.67}/rsclib/pycompat.py +0 -0
  37. {rsclib-0.66 → rsclib-0.67}/rsclib/sqlparser.py +0 -0
  38. {rsclib-0.66 → rsclib-0.67}/rsclib/stateparser.py +0 -0
  39. {rsclib-0.66 → rsclib-0.67}/rsclib/timeout.py +0 -0
  40. {rsclib-0.66 → rsclib-0.67}/rsclib/trafficshape.py +0 -0
  41. {rsclib-0.66 → rsclib-0.67}/rsclib.egg-info/dependency_links.txt +0 -0
  42. {rsclib-0.66 → rsclib-0.67}/rsclib.egg-info/entry_points.txt +0 -0
  43. {rsclib-0.66 → rsclib-0.67}/rsclib.egg-info/top_level.txt +0 -0
  44. {rsclib-0.66 → rsclib-0.67}/setup.cfg +0 -0
  45. {rsclib-0.66 → rsclib-0.67}/setup.py +0 -0
  46. {rsclib-0.66 → rsclib-0.67}/test2_exec.py +0 -0
  47. {rsclib-0.66 → rsclib-0.67}/test_exec.py +0 -0
  48. {rsclib-0.66 → rsclib-0.67}/test_ipt.py +0 -0
  49. {rsclib-0.66 → rsclib-0.67}/test_ipt2.py +0 -0
@@ -1,9 +1,9 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: rsclib
3
- Version: 0.66
3
+ Version: 0.67
4
4
  Summary: Misc. basic stuff needed by RSCs tools
5
5
  Home-page: http://rsclib.sourceforge.net/
6
- Download-URL: http://downloads.sourceforge.net/project/rsclib/rsclib/0.66/rsclib-0.66.tar.gz
6
+ Download-URL: http://downloads.sourceforge.net/project/rsclib/rsclib/0.67/rsclib-0.67.tar.gz
7
7
  Author: Ralf Schlatterbeck
8
8
  Author-email: Ralf Schlatterbeck <rsc@runtux.com>
9
9
  License: GNU Library or Lesser General Public License (LGPL)
@@ -146,11 +146,17 @@ Alternatively get it from pypi and/or install via pip.
146
146
  Changes
147
147
  -------
148
148
 
149
+ Version 0.67: Bugfixes in rational and iter_recipes.batched
150
+
151
+ - iter_recipes.batched now doesn't return an empty batch
152
+ - Rename Rational module to rational
153
+ - Fix division in rational module
154
+
149
155
  Version 0.66: Hexdump parsing, iter_recipes.batched
150
156
 
151
- - Add iter_recipes.batched which appears in Python 3.12
152
- - Hexdump parsing is more tolerant now
153
- - Some overlooked Python3 changes
157
+ - Add iter_recipes.batched which appears in Python 3.12
158
+ - Hexdump parsing is more tolerant now
159
+ - Some overlooked Python3 changes
154
160
 
155
161
  Version 0.65: Use pyproject.toml
156
162
 
@@ -394,14 +394,18 @@ python setup.py install --prefix=/usr/local
394
394
  </div>
395
395
  <div class="section" id="changes">
396
396
  <h1>Changes</h1>
397
+ <p>Version 0.67: Bugfixes in rational and iter_recipes.batched</p>
398
+ <ul class="simple">
399
+ <li>iter_recipes.batched now doesn't return an empty batch</li>
400
+ <li>Rename Rational module to rational</li>
401
+ <li>Fix division in rational module</li>
402
+ </ul>
397
403
  <p>Version 0.66: Hexdump parsing, iter_recipes.batched</p>
398
- <blockquote>
399
404
  <ul class="simple">
400
405
  <li>Add iter_recipes.batched which appears in Python 3.12</li>
401
406
  <li>Hexdump parsing is more tolerant now</li>
402
407
  <li>Some overlooked Python3 changes</li>
403
408
  </ul>
404
- </blockquote>
405
409
  <p>Version 0.65: Use pyproject.toml</p>
406
410
  <ul class="simple">
407
411
  <li>Use new-style packaging with pyproject.toml, old-style setup.py is
@@ -116,11 +116,17 @@ Alternatively get it from pypi and/or install via pip.
116
116
  Changes
117
117
  -------
118
118
 
119
+ Version 0.67: Bugfixes in rational and iter_recipes.batched
120
+
121
+ - iter_recipes.batched now doesn't return an empty batch
122
+ - Rename Rational module to rational
123
+ - Fix division in rational module
124
+
119
125
  Version 0.66: Hexdump parsing, iter_recipes.batched
120
126
 
121
- - Add iter_recipes.batched which appears in Python 3.12
122
- - Hexdump parsing is more tolerant now
123
- - Some overlooked Python3 changes
127
+ - Add iter_recipes.batched which appears in Python 3.12
128
+ - Hexdump parsing is more tolerant now
129
+ - Some overlooked Python3 changes
124
130
 
125
131
  Version 0.65: Use pyproject.toml
126
132
 
@@ -0,0 +1 @@
1
+ VERSION="0.67"
@@ -194,7 +194,8 @@ except ImportError :
194
194
  try:
195
195
  b.append (next (x))
196
196
  except StopIteration:
197
- yield b
197
+ if b:
198
+ yield b
198
199
  return
199
200
  yield b
200
201
  b = []
@@ -1,6 +1,5 @@
1
1
  #!/usr/bin/python
2
- # -*- coding: iso-8859-1 -*-
3
- # Copyright (C) 2007-17 Dr. Ralf Schlatterbeck Open Source Consulting.
2
+ # Copyright (C) 2007-24 Dr. Ralf Schlatterbeck Open Source Consulting.
4
3
  # Reichergasse 131, A-3411 Weidling.
5
4
  # Web: http://www.runtux.com Email: office@runtux.com
6
5
  # All rights reserved
@@ -152,10 +151,7 @@ class Rational (autosuper) :
152
151
  other = self.__class__ (other)
153
152
  p = self.p * other.q
154
153
  q = self.q * other.p
155
- if q < 0 :
156
- p = -p
157
- q = -q
158
- return self.__class__ (p, q)
154
+ return p // q
159
155
  # end def __floordiv__
160
156
 
161
157
  def __rfloordiv__ (self, other) :
@@ -164,6 +160,23 @@ class Rational (autosuper) :
164
160
  return other // self
165
161
  # end def __rfloordiv__
166
162
 
163
+ def __truediv__ (self, other) :
164
+ if not isinstance (other, self.__class__) :
165
+ other = self.__class__ (other)
166
+ p = self.p * other.q
167
+ q = self.q * other.p
168
+ if q < 0 :
169
+ p = -p
170
+ q = -q
171
+ return self.__class__ (p, q)
172
+ # end def __truediv__
173
+
174
+ def __rtruediv__ (self, other) :
175
+ if not isinstance (other, self.__class__) :
176
+ other = self.__class__ (other)
177
+ return other / self
178
+ # end def __rtruediv__
179
+
167
180
  def __int__ (self) :
168
181
  return int (self.p // self.q)
169
182
  # end def __int__
@@ -193,10 +206,6 @@ class Rational (autosuper) :
193
206
  return self + other
194
207
  # end def __radd__
195
208
 
196
- def __rdiv__ (self, other) :
197
- return self.__class__ (other) // self
198
- # end def __rdiv__
199
-
200
209
  def __repr__ (self) :
201
210
  if self.q == 1 :
202
211
  return "%d" % self.p
@@ -1,9 +1,9 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: rsclib
3
- Version: 0.66
3
+ Version: 0.67
4
4
  Summary: Misc. basic stuff needed by RSCs tools
5
5
  Home-page: http://rsclib.sourceforge.net/
6
- Download-URL: http://downloads.sourceforge.net/project/rsclib/rsclib/0.66/rsclib-0.66.tar.gz
6
+ Download-URL: http://downloads.sourceforge.net/project/rsclib/rsclib/0.67/rsclib-0.67.tar.gz
7
7
  Author: Ralf Schlatterbeck
8
8
  Author-email: Ralf Schlatterbeck <rsc@runtux.com>
9
9
  License: GNU Library or Lesser General Public License (LGPL)
@@ -146,11 +146,17 @@ Alternatively get it from pypi and/or install via pip.
146
146
  Changes
147
147
  -------
148
148
 
149
+ Version 0.67: Bugfixes in rational and iter_recipes.batched
150
+
151
+ - iter_recipes.batched now doesn't return an empty batch
152
+ - Rename Rational module to rational
153
+ - Fix division in rational module
154
+
149
155
  Version 0.66: Hexdump parsing, iter_recipes.batched
150
156
 
151
- - Add iter_recipes.batched which appears in Python 3.12
152
- - Hexdump parsing is more tolerant now
153
- - Some overlooked Python3 changes
157
+ - Add iter_recipes.batched which appears in Python 3.12
158
+ - Hexdump parsing is more tolerant now
159
+ - Some overlooked Python3 changes
154
160
 
155
161
  Version 0.65: Use pyproject.toml
156
162
 
@@ -13,7 +13,6 @@ rsclib/Math.py
13
13
  rsclib/PDF_Signature.py
14
14
  rsclib/PM_Value.py
15
15
  rsclib/Phone.py
16
- rsclib/Rational.py
17
16
  rsclib/TeX_CSV_Writer.py
18
17
  rsclib/Version.py
19
18
  rsclib/__init__.py
@@ -35,6 +34,7 @@ rsclib/lc_resonator.py
35
34
  rsclib/nmap.py
36
35
  rsclib/ocf.py
37
36
  rsclib/pycompat.py
37
+ rsclib/rational.py
38
38
  rsclib/sqlparser.py
39
39
  rsclib/stateparser.py
40
40
  rsclib/timeout.py
@@ -1 +0,0 @@
1
- VERSION="0.66"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes