pyxllib 0.3.90__tar.gz → 0.3.92__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 (340) hide show
  1. {pyxllib-0.3.90/pyxllib.egg-info → pyxllib-0.3.92}/PKG-INFO +1 -1
  2. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxllib/data/echarts.py +2 -2
  3. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxllib/file/xlsxlib.py +223 -158
  4. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxllib/prog/newbie.py +22 -0
  5. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxllib/prog/pupil.py +4 -1
  6. {pyxllib-0.3.90 → pyxllib-0.3.92/pyxllib.egg-info}/PKG-INFO +1 -1
  7. {pyxllib-0.3.90 → pyxllib-0.3.92}/setup.py +1 -1
  8. {pyxllib-0.3.90 → pyxllib-0.3.92}/LICENSE +0 -0
  9. {pyxllib-0.3.90 → pyxllib-0.3.92}/MANIFEST.in +0 -0
  10. {pyxllib-0.3.90 → pyxllib-0.3.92}/README.md +0 -0
  11. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxllib/__init__.py +0 -0
  12. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxllib/algo/__init__.py +0 -0
  13. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxllib/algo/disjoint.py +0 -0
  14. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxllib/algo/geo.py +0 -0
  15. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxllib/algo/intervals.py +0 -0
  16. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxllib/algo/matcher.py +0 -0
  17. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxllib/algo/newbie.py +0 -0
  18. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxllib/algo/pupil.py +0 -0
  19. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxllib/algo/shapelylib.py +0 -0
  20. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxllib/algo/specialist.py +0 -0
  21. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxllib/algo/stat.py +0 -0
  22. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxllib/algo/treelib.py +0 -0
  23. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxllib/algo/unitlib.py +0 -0
  24. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxllib/cv/__init__.py +0 -0
  25. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxllib/cv/expert.py +0 -0
  26. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxllib/cv/imfile.py +0 -0
  27. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxllib/cv/imhash.py +0 -0
  28. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxllib/cv/pupil.py +0 -0
  29. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxllib/cv/rgbfmt.py +0 -0
  30. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxllib/cv/trackbartools.py +0 -0
  31. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxllib/cv/xlcvlib.py +0 -0
  32. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxllib/cv/xlpillib.py +0 -0
  33. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxllib/data/__init__.py +0 -0
  34. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxllib/data/oss.py +0 -0
  35. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxllib/data/pglib.py +0 -0
  36. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxllib/data/sqlite.py +0 -0
  37. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxllib/data/sqllib.py +0 -0
  38. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxllib/ext/JLineViewer.py +0 -0
  39. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxllib/ext/__init__.py +0 -0
  40. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxllib/ext/autogui/__init__.py +0 -0
  41. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxllib/ext/autogui/autogui.py +0 -0
  42. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxllib/ext/autogui/virtualkey.py +0 -0
  43. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxllib/ext/demolib.py +0 -0
  44. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxllib/ext/kq5034lib.py +0 -0
  45. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxllib/ext/old.py +0 -0
  46. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxllib/ext/qt.py +0 -0
  47. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxllib/ext/seleniumlib.py +0 -0
  48. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxllib/ext/tk.py +0 -0
  49. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxllib/ext/unixlib.py +0 -0
  50. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxllib/ext/utools.py +0 -0
  51. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxllib/ext/webhook.py +0 -0
  52. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxllib/ext/win32lib.py +0 -0
  53. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxllib/ext/yuquelib.py +0 -0
  54. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxllib/file/__init__.py +0 -0
  55. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxllib/file/docxlib.py +0 -0
  56. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxllib/file/gitlib.py +0 -0
  57. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxllib/file/movielib.py +0 -0
  58. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxllib/file/newbie.py +0 -0
  59. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxllib/file/onenotelib.py +0 -0
  60. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxllib/file/packlib/__init__.py +0 -0
  61. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxllib/file/packlib/zipfile.py +0 -0
  62. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxllib/file/pdflib.py +0 -0
  63. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxllib/file/pupil.py +0 -0
  64. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxllib/file/specialist/__init__.py +0 -0
  65. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxllib/file/specialist/dirlib.py +0 -0
  66. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxllib/file/specialist/download.py +0 -0
  67. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxllib/file/specialist/filelib.py +0 -0
  68. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxllib/prog/__init__.py +0 -0
  69. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxllib/prog/deprecatedlib.py +0 -0
  70. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxllib/prog/ipyexec.py +0 -0
  71. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxllib/prog/sitepackages.py +0 -0
  72. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxllib/prog/specialist/__init__.py +0 -0
  73. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxllib/prog/specialist/bc.py +0 -0
  74. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxllib/prog/specialist/browser.py +0 -0
  75. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxllib/prog/specialist/common.py +0 -0
  76. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxllib/prog/specialist/datetime.py +0 -0
  77. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxllib/prog/specialist/tictoc.py +0 -0
  78. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxllib/prog/specialist/xllog.py +0 -0
  79. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxllib/prog/xlosenv.py +0 -0
  80. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxllib/stdlib/__init__.py +0 -0
  81. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxllib/stdlib/tablepyxl/__init__.py +0 -0
  82. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxllib/stdlib/tablepyxl/style.py +0 -0
  83. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxllib/stdlib/tablepyxl/tablepyxl.py +0 -0
  84. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxllib/text/__init__.py +0 -0
  85. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxllib/text/ahocorasick.py +0 -0
  86. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxllib/text/charclasslib.py +0 -0
  87. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxllib/text/jiebalib.py +0 -0
  88. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxllib/text/jscode.py +0 -0
  89. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxllib/text/latex/__init__.py +0 -0
  90. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxllib/text/levenshtein.py +0 -0
  91. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxllib/text/nestenv.py +0 -0
  92. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxllib/text/newbie.py +0 -0
  93. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxllib/text/pupil/__init__.py +0 -0
  94. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxllib/text/pupil/common.py +0 -0
  95. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxllib/text/pupil/xlalign.py +0 -0
  96. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxllib/text/pycode.py +0 -0
  97. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxllib/text/specialist/__init__.py +0 -0
  98. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxllib/text/specialist/common.py +0 -0
  99. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxllib/text/specialist/ptag.py +0 -0
  100. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxllib/text/spellchecker.py +0 -0
  101. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxllib/text/vbacode.py +0 -0
  102. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxllib/text/xmllib.py +0 -0
  103. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxllib/xl.py +0 -0
  104. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxllib/xlcv.py +0 -0
  105. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxllib.egg-info/SOURCES.txt +0 -0
  106. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxllib.egg-info/dependency_links.txt +0 -0
  107. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxllib.egg-info/requires.txt +4 -4
  108. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxllib.egg-info/top_level.txt +0 -0
  109. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/__init__.py +0 -0
  110. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ai/__init__.py +0 -0
  111. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ai/clientlib.py +0 -0
  112. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ai/specialist.py +0 -0
  113. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ai/torch_app.py +0 -0
  114. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ai/xlpaddle.py +0 -0
  115. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ai/xltorch.py +0 -0
  116. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/data/__init__.py +0 -0
  117. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/data/coco.py +0 -0
  118. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/data/datacls.py +0 -0
  119. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/data/datasets.py +0 -0
  120. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/data/gptlib.py +0 -0
  121. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/data/icdar/__init__.py +0 -0
  122. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/data/icdar/deteval.py +0 -0
  123. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/data/icdar/icdar2013.py +0 -0
  124. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/data/icdar/iou.py +0 -0
  125. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/data/icdar/rrc_evaluation_funcs_1_1.py +0 -0
  126. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/data/imtextline.py +0 -0
  127. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/data/labelme.py +0 -0
  128. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/data/removeline.py +0 -0
  129. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/data/specialist.py +0 -0
  130. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/eval/__init__.py +0 -0
  131. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/paddleocr.py +0 -0
  132. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/__init__.py +0 -0
  133. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/configs/rec/multi_language/generate_multi_language_configs.py +0 -0
  134. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/data/__init__.py +0 -0
  135. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/data/imaug/ColorJitter.py +0 -0
  136. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/data/imaug/__init__.py +0 -0
  137. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/data/imaug/copy_paste.py +0 -0
  138. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/data/imaug/east_process.py +0 -0
  139. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/data/imaug/gen_table_mask.py +0 -0
  140. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/data/imaug/iaa_augment.py +0 -0
  141. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/data/imaug/label_ops.py +0 -0
  142. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/data/imaug/make_border_map.py +0 -0
  143. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/data/imaug/make_pse_gt.py +0 -0
  144. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/data/imaug/make_shrink_map.py +0 -0
  145. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/data/imaug/operators.py +0 -0
  146. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/data/imaug/pg_process.py +0 -0
  147. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/data/imaug/randaugment.py +0 -0
  148. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/data/imaug/random_crop_data.py +0 -0
  149. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/data/imaug/rec_img_aug.py +0 -0
  150. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/data/imaug/sast_process.py +0 -0
  151. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/data/imaug/text_image_aug/__init__.py +0 -0
  152. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/data/imaug/text_image_aug/augment.py +0 -0
  153. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/data/imaug/text_image_aug/warp_mls.py +0 -0
  154. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/data/lmdb_dataset.py +0 -0
  155. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/data/pgnet_dataset.py +0 -0
  156. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/data/pubtab_dataset.py +0 -0
  157. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/data/simple_dataset.py +0 -0
  158. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/losses/__init__.py +0 -0
  159. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/losses/ace_loss.py +0 -0
  160. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/losses/basic_loss.py +0 -0
  161. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/losses/center_loss.py +0 -0
  162. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/losses/cls_loss.py +0 -0
  163. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/losses/combined_loss.py +0 -0
  164. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/losses/det_basic_loss.py +0 -0
  165. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/losses/det_db_loss.py +0 -0
  166. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/losses/det_east_loss.py +0 -0
  167. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/losses/det_pse_loss.py +0 -0
  168. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/losses/det_sast_loss.py +0 -0
  169. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/losses/distillation_loss.py +0 -0
  170. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/losses/e2e_pg_loss.py +0 -0
  171. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/losses/kie_sdmgr_loss.py +0 -0
  172. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/losses/rec_aster_loss.py +0 -0
  173. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/losses/rec_att_loss.py +0 -0
  174. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/losses/rec_ctc_loss.py +0 -0
  175. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/losses/rec_enhanced_ctc_loss.py +0 -0
  176. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/losses/rec_nrtr_loss.py +0 -0
  177. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/losses/rec_sar_loss.py +0 -0
  178. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/losses/rec_srn_loss.py +0 -0
  179. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/losses/table_att_loss.py +0 -0
  180. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/metrics/__init__.py +0 -0
  181. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/metrics/cls_metric.py +0 -0
  182. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/metrics/det_metric.py +0 -0
  183. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/metrics/distillation_metric.py +0 -0
  184. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/metrics/e2e_metric.py +0 -0
  185. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/metrics/eval_det_iou.py +0 -0
  186. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/metrics/kie_metric.py +0 -0
  187. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/metrics/rec_metric.py +0 -0
  188. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/metrics/table_metric.py +0 -0
  189. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/modeling/architectures/__init__.py +0 -0
  190. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/modeling/architectures/base_model.py +0 -0
  191. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/modeling/architectures/distillation_model.py +0 -0
  192. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/modeling/backbones/__init__.py +0 -0
  193. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/modeling/backbones/det_mobilenet_v3.py +0 -0
  194. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/modeling/backbones/det_resnet_vd.py +0 -0
  195. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/modeling/backbones/det_resnet_vd_sast.py +0 -0
  196. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/modeling/backbones/e2e_resnet_vd_pg.py +0 -0
  197. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/modeling/backbones/kie_unet_sdmgr.py +0 -0
  198. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/modeling/backbones/rec_mobilenet_v3.py +0 -0
  199. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/modeling/backbones/rec_mv1_enhance.py +0 -0
  200. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/modeling/backbones/rec_nrtr_mtb.py +0 -0
  201. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/modeling/backbones/rec_resnet_31.py +0 -0
  202. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/modeling/backbones/rec_resnet_aster.py +0 -0
  203. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/modeling/backbones/rec_resnet_fpn.py +0 -0
  204. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/modeling/backbones/rec_resnet_vd.py +0 -0
  205. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/modeling/heads/__init__.py +0 -0
  206. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/modeling/heads/cls_head.py +0 -0
  207. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/modeling/heads/det_db_head.py +0 -0
  208. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/modeling/heads/det_east_head.py +0 -0
  209. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/modeling/heads/det_pse_head.py +0 -0
  210. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/modeling/heads/det_sast_head.py +0 -0
  211. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/modeling/heads/e2e_pg_head.py +0 -0
  212. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/modeling/heads/kie_sdmgr_head.py +0 -0
  213. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/modeling/heads/multiheadAttention.py +0 -0
  214. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/modeling/heads/rec_aster_head.py +0 -0
  215. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/modeling/heads/rec_att_head.py +0 -0
  216. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/modeling/heads/rec_ctc_head.py +0 -0
  217. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/modeling/heads/rec_nrtr_head.py +0 -0
  218. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/modeling/heads/rec_sar_head.py +0 -0
  219. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/modeling/heads/rec_srn_head.py +0 -0
  220. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/modeling/heads/self_attention.py +0 -0
  221. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/modeling/heads/table_att_head.py +0 -0
  222. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/modeling/necks/__init__.py +0 -0
  223. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/modeling/necks/db_fpn.py +0 -0
  224. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/modeling/necks/east_fpn.py +0 -0
  225. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/modeling/necks/fpn.py +0 -0
  226. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/modeling/necks/pg_fpn.py +0 -0
  227. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/modeling/necks/rnn.py +0 -0
  228. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/modeling/necks/sast_fpn.py +0 -0
  229. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/modeling/necks/table_fpn.py +0 -0
  230. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/modeling/transforms/__init__.py +0 -0
  231. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/modeling/transforms/stn.py +0 -0
  232. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/modeling/transforms/tps.py +0 -0
  233. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/modeling/transforms/tps_spatial_transformer.py +0 -0
  234. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/optimizer/__init__.py +0 -0
  235. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/optimizer/learning_rate.py +0 -0
  236. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/optimizer/lr_scheduler.py +0 -0
  237. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/optimizer/optimizer.py +0 -0
  238. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/optimizer/regularizer.py +0 -0
  239. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/postprocess/__init__.py +0 -0
  240. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/postprocess/cls_postprocess.py +0 -0
  241. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/postprocess/db_postprocess.py +0 -0
  242. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/postprocess/east_postprocess.py +0 -0
  243. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/postprocess/locality_aware_nms.py +0 -0
  244. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/postprocess/pg_postprocess.py +0 -0
  245. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/postprocess/pse_postprocess/__init__.py +0 -0
  246. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/postprocess/pse_postprocess/pse/__init__.py +0 -0
  247. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/postprocess/pse_postprocess/pse/setup.py +0 -0
  248. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/postprocess/pse_postprocess/pse_postprocess.py +0 -0
  249. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/postprocess/rec_postprocess.py +0 -0
  250. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/postprocess/sast_postprocess.py +0 -0
  251. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/tools/__init__.py +0 -0
  252. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/tools/eval.py +0 -0
  253. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/tools/export_center.py +0 -0
  254. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/tools/export_model.py +0 -0
  255. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/tools/infer/predict_cls.py +0 -0
  256. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/tools/infer/predict_det.py +0 -0
  257. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/tools/infer/predict_e2e.py +0 -0
  258. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/tools/infer/predict_rec.py +0 -0
  259. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/tools/infer/predict_system.py +0 -0
  260. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/tools/infer/utility.py +0 -0
  261. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/tools/infer_cls.py +0 -0
  262. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/tools/infer_det.py +0 -0
  263. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/tools/infer_e2e.py +0 -0
  264. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/tools/infer_kie.py +0 -0
  265. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/tools/infer_rec.py +0 -0
  266. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/tools/infer_table.py +0 -0
  267. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/tools/program.py +0 -0
  268. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/tools/test_hubserving.py +0 -0
  269. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/tools/train.py +0 -0
  270. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/tools/xlprog.py +0 -0
  271. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/utils/EN_symbol_dict.txt +0 -0
  272. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/utils/__init__.py +0 -0
  273. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/utils/dict/ar_dict.txt +0 -0
  274. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/utils/dict/arabic_dict.txt +0 -0
  275. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/utils/dict/be_dict.txt +0 -0
  276. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/utils/dict/bg_dict.txt +0 -0
  277. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/utils/dict/chinese_cht_dict.txt +0 -0
  278. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/utils/dict/cyrillic_dict.txt +0 -0
  279. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/utils/dict/devanagari_dict.txt +0 -0
  280. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/utils/dict/en_dict.txt +0 -0
  281. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/utils/dict/fa_dict.txt +0 -0
  282. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/utils/dict/french_dict.txt +0 -0
  283. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/utils/dict/german_dict.txt +0 -0
  284. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/utils/dict/hi_dict.txt +0 -0
  285. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/utils/dict/it_dict.txt +0 -0
  286. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/utils/dict/japan_dict.txt +0 -0
  287. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/utils/dict/ka_dict.txt +0 -0
  288. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/utils/dict/korean_dict.txt +0 -0
  289. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/utils/dict/latin_dict.txt +0 -0
  290. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/utils/dict/mr_dict.txt +0 -0
  291. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/utils/dict/ne_dict.txt +0 -0
  292. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/utils/dict/oc_dict.txt +0 -0
  293. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/utils/dict/pu_dict.txt +0 -0
  294. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/utils/dict/rs_dict.txt +0 -0
  295. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/utils/dict/rsc_dict.txt +0 -0
  296. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/utils/dict/ru_dict.txt +0 -0
  297. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/utils/dict/ta_dict.txt +0 -0
  298. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/utils/dict/table_dict.txt +0 -0
  299. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/utils/dict/table_structure_dict.txt +0 -0
  300. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/utils/dict/te_dict.txt +0 -0
  301. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/utils/dict/ug_dict.txt +0 -0
  302. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/utils/dict/uk_dict.txt +0 -0
  303. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/utils/dict/ur_dict.txt +0 -0
  304. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/utils/dict/xi_dict.txt +0 -0
  305. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/utils/dict90.txt +0 -0
  306. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/utils/e2e_metric/Deteval.py +0 -0
  307. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/utils/e2e_metric/polygon_fast.py +0 -0
  308. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/utils/e2e_utils/extract_batchsize.py +0 -0
  309. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/utils/e2e_utils/extract_textpoint_fast.py +0 -0
  310. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/utils/e2e_utils/extract_textpoint_slow.py +0 -0
  311. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/utils/e2e_utils/pgnet_pp_utils.py +0 -0
  312. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/utils/e2e_utils/visual.py +0 -0
  313. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/utils/en_dict.txt +0 -0
  314. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/utils/gen_label.py +0 -0
  315. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/utils/ic15_dict.txt +0 -0
  316. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/utils/iou.py +0 -0
  317. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/utils/logging.py +0 -0
  318. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/utils/network.py +0 -0
  319. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/utils/ppocr_keys_v1.txt +0 -0
  320. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/utils/profiler.py +0 -0
  321. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/utils/save_load.py +0 -0
  322. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/utils/stats.py +0 -0
  323. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppocr/utils/utility.py +0 -0
  324. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppstructure/__init__.py +0 -0
  325. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppstructure/predict_system.py +0 -0
  326. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppstructure/table/__init__.py +0 -0
  327. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppstructure/table/eval_table.py +0 -0
  328. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppstructure/table/matcher.py +0 -0
  329. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppstructure/table/predict_structure.py +0 -0
  330. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppstructure/table/predict_table.py +0 -0
  331. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppstructure/table/table_metric/__init__.py +0 -0
  332. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppstructure/table/table_metric/parallel.py +0 -0
  333. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppstructure/table/table_metric/table_metric.py +0 -0
  334. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppstructure/table/tablepyxl/__init__.py +0 -0
  335. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppstructure/table/tablepyxl/style.py +0 -0
  336. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppstructure/table/tablepyxl/tablepyxl.py +0 -0
  337. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/ppstructure/utility.py +0 -0
  338. {pyxllib-0.3.90 → pyxllib-0.3.92}/pyxlpr/xlai.py +0 -0
  339. {pyxllib-0.3.90 → pyxllib-0.3.92}/requirements.txt +0 -0
  340. {pyxllib-0.3.90 → pyxllib-0.3.92}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyxllib
3
- Version: 0.3.90
3
+ Version: 0.3.92
4
4
  Summary: 厦门理工模式识别团队通用python代码工具库
5
5
  Home-page: https://github.com/XLPRUtils/pyxllib
6
6
  Author: code4101
@@ -29,7 +29,7 @@ class XlChart(Chart):
29
29
  def set_title(self, title):
30
30
  self.set_global_opts(title_opts=pyecharts.options.TitleOpts(title=title))
31
31
 
32
- def add_series(self, name, data, *, type=None, color=None, is_selected=True, labels=None,
32
+ def add_series(self, name, data, *, type=None, color=None, labels=None,
33
33
  **kwargs):
34
34
  """ 垃圾pyecharts,毁我青春~~
35
35
 
@@ -54,7 +54,7 @@ class XlChart(Chart):
54
54
  kwargs['label']['formatter'] = fmt
55
55
 
56
56
  self._append_color(color)
57
- self._append_legend(name, is_selected)
57
+ self._append_legend(name)
58
58
 
59
59
  self.options.get('series').append(
60
60
  {
@@ -42,7 +42,9 @@ try:
42
42
  except ModuleNotFoundError:
43
43
  pass
44
44
 
45
- from pyxllib.prog.pupil import inject_members, dprint, xlmd5, shuffle_dict_keys, Timeout, safe_div
45
+ from pyxllib.prog.newbie import human_readable_number
46
+ from pyxllib.prog.pupil import (inject_members, dprint, xlmd5, shuffle_dict_keys, Timeout,
47
+ safe_div, format_exception, DictTool)
46
48
  from pyxllib.prog.specialist import browser, TicToc
47
49
  from pyxllib.algo.specialist import product
48
50
  from pyxllib.text.pupil import calc_chinese_ratio
@@ -249,8 +251,10 @@ def xl_render_value(x, xl_fmt):
249
251
  y = x.strftime(xlfmt2pyfmt_time(xl_fmt))
250
252
  elif isinstance(x, datetime.timedelta):
251
253
  y = str(x)
252
- else:
254
+ elif isinstance(x, (str, int, float, bool)): # 其他可以json化的数据类型
253
255
  y = x
256
+ else: # ArrayFormula、DataTableFormula等无法json化的数据,提前转str
257
+ y = str(x)
254
258
  return y
255
259
 
256
260
 
@@ -717,40 +721,58 @@ class XlWorksheet(openpyxl.worksheet.worksheet.Worksheet):
717
721
  right=self.max_column, bottom=self.max_row)
718
722
  return raw_used_range
719
723
 
720
- @run_once('id,str') # 同一个表,同一行不会重复计算
721
724
  def is_empty_row(self, row, start_col, end_col):
722
- cur_col = start_col
723
- # 特地提前检查下最后一列的那个单元格
724
- if self.cell(row, end_col).value is not None:
725
- return False
726
- while cur_col <= end_col:
727
- if self.cell(row, cur_col).value is not None:
725
+ if not hasattr(self, 'is_empty_row_cache'):
726
+ self.is_empty_row_cache = {}
727
+ key = (row, start_col, end_col)
728
+
729
+ def is_empty_row_core():
730
+ cur_col = start_col
731
+ # 特地提前检查下最后一列的那个单元格
732
+ if self.cell(row, end_col).value is not None:
728
733
  return False
729
- # 步长随着尝试的增加,也逐渐降低采样率
730
- n = cur_col - start_col + 1
731
- # 在最大值m=16384列情况下,/1000,最多检索3404个单元格,/100,最多检索569次,/50最多检索320次
732
- # cur_col += (n // 50) + 1
733
- # 再变形,加强前面权重,大大降低后面权重
734
- if n <= 100:
735
- cur_col += 1
736
- else: # 最多54次
737
- cur_col += (n // 10)
738
-
739
- return True
734
+ while cur_col <= end_col:
735
+ if self.cell(row, cur_col).value is not None:
736
+ return False
737
+ # 步长随着尝试的增加,也逐渐降低采样率
738
+ n = cur_col - start_col + 1
739
+ # 在最大值m=16384列情况下,/1000,最多检索3404个单元格,/100,最多检索569次,/50最多检索320次
740
+ # cur_col += (n // 50) + 1
741
+ # 再变形,加强前面权重,大大降低后面权重
742
+ if n <= 100:
743
+ cur_col += 1
744
+ else: # 最多54次
745
+ cur_col += (n // 10)
746
+
747
+ return True
748
+
749
+ if key not in self.is_empty_row_cache:
750
+ self.is_empty_row_cache[key] = is_empty_row_core()
751
+
752
+ return self.is_empty_row_cache[key]
740
753
 
741
- @run_once('id,str') # 同一个表,同一列不会重复计算
742
754
  def is_empty_column(self, col, start_row, end_row):
743
- cur_row = start_row
744
- # 特地提前检查下最后一行的那个单元格
745
- if self.cell(end_row, col).value is not None:
746
- return False
747
- while cur_row <= end_row:
748
- if self.cell(cur_row, col).value is not None:
755
+ if not hasattr(self, 'is_empty_column_cache'):
756
+ self.is_empty_column_cache = {}
757
+ key = (col, start_row, end_row)
758
+
759
+ def is_empty_column_core():
760
+ cur_row = start_row
761
+ # 特地提前检查下最后一行的那个单元格
762
+ if self.cell(end_row, col).value is not None:
749
763
  return False
750
- n = cur_row - start_row + 1
751
- # 在最大值n=1048576行情况下,/1000,最多检索7535个单元格,/100,最多检索987次,/50最多检索530次
752
- cur_row += (n // 1000) + 1
753
- return True
764
+ while cur_row <= end_row:
765
+ if self.cell(cur_row, col).value is not None:
766
+ return False
767
+ n = cur_row - start_row + 1
768
+ # 在最大值n=1048576行情况下,/1000,最多检索7535个单元格,/100,最多检索987次,/50最多检索530次
769
+ cur_row += (n // 1000) + 1
770
+ return True
771
+
772
+ if key not in self.is_empty_column_cache:
773
+ self.is_empty_column_cache[key] = is_empty_column_core()
774
+
775
+ return self.is_empty_column_cache[key]
754
776
 
755
777
  def find_last_non_empty_row(self, start_row, end_row, start_col, end_col, m=30):
756
778
  # 1 如果剩余行数不多(小于等于m),直接遍历这些行
@@ -860,7 +882,6 @@ class XlWorksheet(openpyxl.worksheet.worksheet.Worksheet):
860
882
  # 如果所有分割点都是空的,则返回-1
861
883
  return -1
862
884
 
863
- @run_once('id,str') # 同一个表,同一行不会重复计算
864
885
  def get_usedrange(self):
865
886
  """ 定位有效数据区间。
866
887
 
@@ -887,48 +908,48 @@ class XlWorksheet(openpyxl.worksheet.worksheet.Worksheet):
887
908
 
888
909
  :param reset_bounds: 计算出新区域后,是否重置ws的边界值
889
910
  """
890
- from pyxllib.prog.newbie import get_global_var
891
-
892
- # 初始化边界值
893
- left, right, top, bottom = self.min_column, self.max_column, self.min_row, self.max_row
894
-
895
- # start_time = time.time()
896
- # 使用优化后的函数找到最下方的行和最右边的列
897
- bottom = self.find_last_non_empty_row(top, bottom, left, right)
898
- if bottom == -1:
899
- return 'A1' # 空表返回A1占位
900
- right = self.find_last_non_empty_column(left, right, top, bottom)
901
- if right == -1:
902
- return 'A1'
903
-
904
- # 使用优化后的函数找到最上方的行和最左边的列
905
- top = self.find_first_non_empty_row(top, bottom, left, right)
906
- if top == -1:
907
- return 'A1'
908
- left = self.find_first_non_empty_column(left, right, top, bottom)
909
- if left == -1:
910
- return 'A1'
911
- # get_global_var('get_usedrange_time')[-1] += time.time() - start_time
912
-
913
- # 2 然后还要再扩范围(根据合并单元格情况)
914
- # start_time = time.time()
915
- top0, bottom0, left0, right0 = top, bottom, left, right
916
- for merged_range in self.merged_cells.ranges:
917
- l, t, r, b = merged_range.bounds
918
- if top0 <= b <= bottom0 or top0 <= t <= bottom0:
919
- if left0 <= r and l < left:
920
- left = l
921
- if l <= right0 and r > right:
922
- right = r
923
- if left0 <= r <= right0 or left0 <= l <= right0:
924
- if top0 <= b and t < top:
925
- top = t
926
- if t <= bottom0 and b > bottom:
927
- bottom = b
928
- # get_global_var('expandrange_time')[-1] += time.time() - start_time
929
-
930
- used_range = build_range_address(left=left, top=top, right=right, bottom=bottom)
931
- return used_range
911
+ if not hasattr(self, 'usedrange_cache'):
912
+ # 初始化边界值
913
+ left, right, top, bottom = self.min_column, self.max_column, self.min_row, self.max_row
914
+
915
+ # start_time = time.time()
916
+ # 使用优化后的函数找到最下方的行和最右边的列
917
+ bottom = self.find_last_non_empty_row(top, bottom, left, right)
918
+ if bottom == -1:
919
+ return 'A1' # 空表返回A1占位
920
+ right = self.find_last_non_empty_column(left, right, top, bottom)
921
+ if right == -1:
922
+ return 'A1'
923
+
924
+ # 使用优化后的函数找到最上方的行和最左边的列
925
+ top = self.find_first_non_empty_row(top, bottom, left, right)
926
+ if top == -1:
927
+ return 'A1'
928
+ left = self.find_first_non_empty_column(left, right, top, bottom)
929
+ if left == -1:
930
+ return 'A1'
931
+ # get_global_var('get_usedrange_time')[-1] += time.time() - start_time
932
+
933
+ # 2 然后还要再扩范围(根据合并单元格情况)
934
+ # start_time = time.time()
935
+ top0, bottom0, left0, right0 = top, bottom, left, right
936
+ for merged_range in self.merged_cells.ranges:
937
+ l, t, r, b = merged_range.bounds
938
+ if top0 <= b <= bottom0 or top0 <= t <= bottom0:
939
+ if left0 <= r and l < left:
940
+ left = l
941
+ if l <= right0 and r > right:
942
+ right = r
943
+ if left0 <= r <= right0 or left0 <= l <= right0:
944
+ if top0 <= b and t < top:
945
+ top = t
946
+ if t <= bottom0 and b > bottom:
947
+ bottom = b
948
+ # get_global_var('expandrange_time')[-1] += time.time() - start_time
949
+
950
+ self.used_range = build_range_address(left=left, top=top, right=right, bottom=bottom)
951
+
952
+ return self.used_range
932
953
 
933
954
  def copy_worksheet(self, dst_ws):
934
955
  """跨工作薄时复制表格内容的功能
@@ -963,7 +984,6 @@ class XlWorksheet(openpyxl.worksheet.worksheet.Worksheet):
963
984
  else:
964
985
  yield tuple(cells)
965
986
 
966
- @run_once('id,str')
967
987
  def search(self, pattern, min_row=None, max_row=None, min_col=None, max_col=None, order=None, direction=0):
968
988
  """ 查找满足pattern正则表达式的单元格
969
989
 
@@ -983,40 +1003,50 @@ class XlWorksheet(openpyxl.worksheet.worksheet.Worksheet):
983
1003
  >> ws.search('年段')
984
1004
  <Cell '预算总表'.B2>
985
1005
  """
986
- # 1 定界
987
- x1, x2 = max(min_row or 1, 1), min(max_row or self.max_row, self.max_row)
988
- y1, y2 = max(min_col or 1, 1), min(max_col or self.max_column, self.max_column)
989
-
990
- # 2 遍历
991
- if isinstance(pattern, datetime.date):
992
- pattern = f'^{(pattern - datetime.date(1899, 12, 30)).days}$'
993
-
994
- if isinstance(pattern, (list, tuple)):
995
- cel = None
996
- for p in pattern:
997
- cel = self.search(p, x1, x2, y1, y2, order)
998
- if cel:
999
- # up, down, left, right 找到的单元格四边界
1000
- l, u, r, d = getattr(cel.in_range(), 'bounds', (cel.column, cel.row, cel.column, cel.row))
1001
- if direction == 0:
1002
- x1, x2, y1, y2 = max(x1, d + 1), x2, max(y1, l), min(y2, r)
1003
- elif direction == 1:
1004
- x1, x2, y1, y2 = max(x1, u), min(x2, d), max(y1, r + 1), y2
1005
- elif direction == 2:
1006
- x1, x2, y1, y2 = x1, min(x2, u - 1), max(y1, l), min(y2, r)
1007
- elif direction == 3:
1008
- x1, x2, y1, y2 = max(x1, u), min(x2, d), y1, min(y2, l - 1)
1006
+ if not hasattr(self, 'search_cache'):
1007
+ self.search_cache = {}
1008
+ key = (pattern, min_row, max_row, min_col, max_col, order, direction)
1009
+
1010
+ def get_search_core():
1011
+ # 1 定界
1012
+ x1, x2 = max(min_row or 1, 1), min(max_row or self.max_row, self.max_row)
1013
+ y1, y2 = max(min_col or 1, 1), min(max_col or self.max_column, self.max_column)
1014
+
1015
+ # 2 遍历
1016
+ if isinstance(pattern, datetime.date):
1017
+ pattern = f'^{(pattern - datetime.date(1899, 12, 30)).days}$'
1018
+
1019
+ if isinstance(pattern, (list, tuple)):
1020
+ cel = None
1021
+ for p in pattern:
1022
+ cel = self.search(p, x1, x2, y1, y2, order)
1023
+ if cel:
1024
+ # up, down, left, right 找到的单元格四边界
1025
+ l, u, r, d = getattr(cel.in_range(), 'bounds', (cel.column, cel.row, cel.column, cel.row))
1026
+ if direction == 0:
1027
+ x1, x2, y1, y2 = max(x1, d + 1), x2, max(y1, l), min(y2, r)
1028
+ elif direction == 1:
1029
+ x1, x2, y1, y2 = max(x1, u), min(x2, d), max(y1, r + 1), y2
1030
+ elif direction == 2:
1031
+ x1, x2, y1, y2 = x1, min(x2, u - 1), max(y1, l), min(y2, r)
1032
+ elif direction == 3:
1033
+ x1, x2, y1, y2 = max(x1, u), min(x2, d), y1, min(y2, l - 1)
1034
+ else:
1035
+ raise ValueError(f'direction参数值错误{direction}')
1009
1036
  else:
1010
- raise ValueError(f'direction参数值错误{direction}')
1011
- else:
1012
- return None
1013
- return cel
1014
- else:
1015
- if isinstance(pattern, str): pattern = re.compile(pattern)
1016
- for x, y in product(range(x1, x2 + 1), range(y1, y2 + 1), order=order):
1017
- cell = self.cell(x, y)
1018
- if cell.celltype() == 1: continue # 过滤掉合并单元格位置
1019
- if pattern.search(str(cell.value)): return cell # 返回满足条件的第一个值
1037
+ return None
1038
+ return cel
1039
+ else:
1040
+ if isinstance(pattern, str): pattern = re.compile(pattern)
1041
+ for x, y in product(range(x1, x2 + 1), range(y1, y2 + 1), order=order):
1042
+ cell = self.cell(x, y)
1043
+ if cell.celltype() == 1: continue # 过滤掉合并单元格位置
1044
+ if pattern.search(str(cell.value)): return cell # 返回满足条件的第一个值
1045
+
1046
+ if key not in self.search_cache:
1047
+ self.search_cache[key] = get_search_core()
1048
+
1049
+ return self.search_cache[key]
1020
1050
 
1021
1051
  findcel = search
1022
1052
 
@@ -1567,12 +1597,12 @@ class XlWorksheet(openpyxl.worksheet.worksheet.Worksheet):
1567
1597
  current_alignment_dict.pop('wrapText', None)
1568
1598
  cell.alignment = Alignment(wrapText=True, **current_alignment_dict)
1569
1599
 
1570
- @run_once('id,str')
1571
1600
  def get_sorted_merged_cells(self):
1572
1601
  """ 将合并单元格按照行列顺序排列。
1573
1602
  """
1574
- rngs = list(sorted(self.merged_cells.ranges, key=lambda x: (x.min_row, x.min_col)))
1575
- return rngs
1603
+ if not hasattr(self, 'sorted_merged_cells'):
1604
+ self.sorted_merged_cells = list(sorted(self.merged_cells.ranges, key=lambda x: (x.min_row, x.min_col)))
1605
+ return self.sorted_merged_cells
1576
1606
 
1577
1607
 
1578
1608
  inject_members(XlWorksheet, openpyxl.worksheet.worksheet.Worksheet, white_list=['_cells_by_row'])
@@ -2107,8 +2137,12 @@ def extract_cells_content(ws, usedrange=None):
2107
2137
  if val is None:
2108
2138
  return ''
2109
2139
  else:
2110
- # return cell.get_render_value() # 如果感觉这步很慢,可以换一种更简洁的形式
2111
- return val
2140
+ return cell.get_render_value()
2141
+ # 如果感觉这步很慢,可以换一种更简洁的形式;但是发现下面这种对时间的格式显示还是太不智能。
2142
+ # if not isinstance(val, (str, int, float, bool)):
2143
+ # return val
2144
+ # else:
2145
+ # return str(val)
2112
2146
 
2113
2147
  for i in range(usedrange_bound['top'], usedrange_bound['bottom'] + 1):
2114
2148
  for j in range(usedrange_bound['left'], usedrange_bound['right'] + 1):
@@ -2334,25 +2368,27 @@ def extract_workbook_summary(file_path, mode=0,
2334
2368
 
2335
2369
 
2336
2370
  def extract_workbook_summary2(file_path, *,
2337
- timeout_seconds=None,
2338
- ignore_errors=False,
2339
2371
  keep_links=False,
2340
2372
  keep_vba=False,
2341
- mode=0):
2373
+ mode=0,
2374
+ return_mode=0,
2375
+ **kwargs):
2342
2376
  """
2343
2377
  :param keep_links: 是否保留外部表格链接数据。如果保留,打开好像会有点问题。
2344
2378
  :param mode:
2345
2379
  0,最原始的summary3摘要
2346
2380
  1,添加当前工作表、单元格位置的信息
2381
+ :param kwargs: 捕捉其他参数,主要是向下兼容,其实现在并没有用
2347
2382
 
2348
2383
  注意这里没有提供read_only可选参数,是因为read_only=True模式在我这里是运行不了的。
2349
2384
  """
2350
- # 1 读取文件wb
2351
- file_path = Path(file_path)
2352
- suffix = file_path.suffix.lower()
2353
2385
 
2354
- def read_file_by_type(file_path, suffix, keep_links=False):
2355
- # with TicToc('读取文件'):
2386
+ # 1 读取文件wb
2387
+ def read_file_by_type():
2388
+ nonlocal load_time
2389
+ nonlocal load_time
2390
+ suffix = file_path.suffix.lower()
2391
+ start_time = time.time()
2356
2392
  if suffix in ('.xlsx', '.xlsm'):
2357
2393
  wb = openpyxl.load_workbook(file_path,
2358
2394
  keep_links=keep_links,
@@ -2362,38 +2398,33 @@ def extract_workbook_summary2(file_path, *,
2362
2398
  elif suffix == '.csv':
2363
2399
  wb = convert_csv_to_xlsx(file_path)
2364
2400
  else:
2365
- raise ValueError('不支持的文件类型')
2366
- return wb
2367
-
2368
- def process_file(file_path, suffix, timeout_seconds=None, keep_links=False, ignore_errors=False):
2369
- try:
2370
- if timeout_seconds is None:
2371
- wb = read_file_by_type(file_path, suffix, keep_links)
2372
- else:
2373
- with Timeout(timeout_seconds): # 使用之前定义的timeout上下文管理器
2374
- wb = read_file_by_type(file_path, suffix, keep_links)
2375
- except Exception as e:
2376
- if ignore_errors:
2377
- return {}
2378
- else:
2379
- raise e
2401
+ return None
2402
+ load_time = time.time() - start_time
2380
2403
  return wb
2381
2404
 
2382
- wb = process_file(file_path, suffix, timeout_seconds, keep_links, ignore_errors)
2405
+ load_time = -1
2406
+ file_path = Path(file_path)
2407
+ res = {}
2408
+ res['fileName'] = file_path.name
2409
+ wb = read_file_by_type()
2410
+ if wb is None: # 不支持的文件类型,不报错,只是返回最基本的文件名信息
2411
+ return res
2383
2412
 
2384
2413
  # 2 提取摘要
2385
- # with TicToc('提取摘要'):
2386
- res = wb.extract_summary2()
2387
- res['fileName'] = Path(file_path).name
2388
-
2389
- if mode == 0:
2390
- pass
2391
- elif mode == 1:
2392
- res['ActiveSheet'] = wb.active.title
2393
- # todo py好像没办法提取Selection。但jsa、vba应该要尽力取出这些相关的特征,尤其在操作等场景很有用
2394
- # res['SelectionAddress'] = ...
2395
-
2396
- return res
2414
+ summary2 = wb.extract_summary2()
2415
+ DictTool.ior(res, summary2)
2416
+ if mode == 1:
2417
+ ws = wb.active
2418
+ res['ActiveSheet'] = ws.title
2419
+ if hasattr(ws, 'selected_cell'):
2420
+ res['Selection'] = ws.selected_cell
2421
+
2422
+ # res = convert_to_json_compatible(res)
2423
+
2424
+ if return_mode == 1:
2425
+ return res, load_time
2426
+ else:
2427
+ return res
2397
2428
 
2398
2429
 
2399
2430
  def update_raw_summary2(data):
@@ -2838,10 +2869,11 @@ class WorkbookSummary3:
2838
2869
  y = {
2839
2870
  'fileName': x['fileName'],
2840
2871
  'sheetNames': x['sheetNames'],
2841
- 'ActiveSheet': x['ActiveSheet'], # 当期激活的工作表
2842
- # 'SelectionAddress': '',
2843
2872
  'sheets': x['sheets'],
2844
2873
  'mode': 'Complete information',
2874
+ 'ActiveSheet': x['ActiveSheet'], # 当期激活的工作表
2875
+ # 最多截取250个字符。(一般情况下这个很小的,只是在很极端情况,比如离散选中了非常多区域,这个可能就会太长
2876
+ 'Selection': x['Selection'][:250],
2845
2877
  }
2846
2878
 
2847
2879
  # 处理前确保下cells字段存在,避免后续很多处理过程要特判
@@ -2868,10 +2900,43 @@ def extract_workbook_summary3(file_path, summary_limit_len=4000, **kwargs):
2868
2900
  return data
2869
2901
 
2870
2902
 
2871
- def extract_workbook_summary3b(file_path, summary_limit_len=4000, **kwargs):
2872
- """ 增加了全局ratio的计算 """
2873
- data = extract_workbook_summary2(file_path, mode=1, **kwargs)
2874
- if not data:
2875
- return data
2876
- data = WorkbookSummary3.summary2_to_summary3b(data, summary_limit_len)
2877
- return data
2903
+ def extract_workbook_summary3b(file_path,
2904
+ summary_limit_len=4000,
2905
+ timeout_seconds=60,
2906
+ return_mode=0,
2907
+ debug=False,
2908
+ **kwargs):
2909
+ """
2910
+
2911
+ :param summary_limit_len: 摘要长度限制
2912
+ :param timeout_seconds: 超时限制
2913
+ :param return_mode: 返回模式,0表示只返回摘要,1表示返回摘要和耗时
2914
+ :param kwargs: 其他是summary2读取文件的时候的参数,其实都不太关键,一般不用特地设置
2915
+ """
2916
+ res = {}
2917
+ res['fileName'] = Path(file_path).name
2918
+ load_time = summary2_time = summary3_time = -1
2919
+
2920
+ try:
2921
+ with Timeout(timeout_seconds):
2922
+ start_time = time.time()
2923
+ res, load_time = extract_workbook_summary2(file_path, mode=1, return_mode=1, **kwargs)
2924
+ # res = convert_to_json_compatible(res)
2925
+ summary2_time = time.time() - start_time - load_time
2926
+ start_time = time.time()
2927
+ res = WorkbookSummary3.summary2_to_summary3b(res, summary_limit_len)
2928
+ summary3_time = time.time() - start_time
2929
+ except TimeoutError as e:
2930
+ if debug:
2931
+ raise e
2932
+ res['error'] = f'超时,未完成摘要提取:{timeout_seconds}秒'
2933
+ except Exception as e:
2934
+ if debug:
2935
+ raise e
2936
+ res['error'] = f'提取摘要时发生错误:{format_exception(e, 2)}'
2937
+
2938
+ if return_mode == 1:
2939
+ return res, {'load_time': human_readable_number(load_time),
2940
+ 'summary2_time': human_readable_number(summary2_time),
2941
+ 'summary3_time': human_readable_number(summary3_time)}
2942
+ return res
@@ -420,3 +420,25 @@ def get_global_var(name, default_value=None):
420
420
  if name not in g:
421
421
  g[name] = default_value
422
422
  return g[name]
423
+
424
+
425
+ def convert_to_json_compatible(d, custom_converter=None):
426
+ """ 递归地将字典等类型转换为JSON兼容格式。对于非标准JSON类型,使用自定义转换器或默认转换为字符串。
427
+
428
+ :param d: 要转换的字典或列表。
429
+ :param custom_converter: 自定义转换函数,用于处理非标准JSON类型的值。
430
+ :return: 转换后的字典或列表。
431
+
432
+ todo 这个函数想法是好的,但总感觉精确性中,总容易有些问题的,需要更多的考察测试
433
+ """
434
+ if custom_converter is None:
435
+ custom_converter = str
436
+
437
+ if isinstance(d, dict): # defaultdict呢?
438
+ return {k: convert_to_json_compatible(v, custom_converter) for k, v in d.items()}
439
+ elif isinstance(d, list):
440
+ return [convert_to_json_compatible(v, custom_converter) for v in d]
441
+ elif isinstance(d, (int, float, str, bool)) or d is None:
442
+ return d
443
+ else:
444
+ return custom_converter(d)
@@ -508,7 +508,7 @@ class Timeout:
508
508
  """ 对函数等待执行的功能,限制运行时间
509
509
 
510
510
  【实现思路】
511
- 1、最简单的方式是用signal.SIGALRM实现
511
+ 1、最简单的方式是用signal.SIGALRM实现(包括三方库timeout-decorator也有这个局限)
512
512
  https://stackoverflow.com/questions/2281850/timeout-function-if-it-takes-too-long-to-finish
513
513
  但是这个不支持windows系统~~
514
514
  2、那windows和linux通用的做法,就是把原执行函数变成一个子线程来运行
@@ -519,6 +519,7 @@ class Timeout:
519
519
  是用一个Timer计时器子线程计时,当timeout超时,使用信号机制给主线程抛出一个异常
520
520
  ① 注意,不能子线程直接抛出异常,这样影响不了主线程
521
521
  ② 也不能直接抛出错误signal,这样会强制直接中断程序。应该抛出TimeoutError,让后续程序进行超时逻辑的处理
522
+ ③ 这里是让子线程抛出信号,主线程收到信号后,再抛出TimeoutError
522
523
 
523
524
  注意:这个函数似乎不支持多线程
524
525
  """
@@ -560,10 +561,12 @@ class Timeout:
560
561
  def send_signal():
561
562
  signal.raise_signal(signal.SIGABRT)
562
563
 
564
+ # 挂起一个警告器,如果"没人"管它,self.seconds就会抛出错误
563
565
  self.alarm = threading.Timer(self.seconds, send_signal)
564
566
  self.alarm.start()
565
567
 
566
568
  def __exit__(self, exc_type, exc_val, exc_tb):
569
+ # with已经运行完了,马上关闭警告器
567
570
  self.alarm.cancel()
568
571
 
569
572
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyxllib
3
- Version: 0.3.90
3
+ Version: 0.3.92
4
4
  Summary: 厦门理工模式识别团队通用python代码工具库
5
5
  Home-page: https://github.com/XLPRUtils/pyxllib
6
6
  Author: code4101
@@ -30,7 +30,7 @@ _dir = Path(__file__).parent
30
30
 
31
31
  setup(
32
32
  name='pyxllib', # pip 安装时用的名字
33
- version='0.3.90', # 当前版本,每次更新上传到pypi都需要修改; 第4位版本号一般是修紧急bug
33
+ version='0.3.92', # 当前版本,每次更新上传到pypi都需要修改; 第4位版本号一般是修紧急bug
34
34
  author='code4101',
35
35
  author_email='877362867@qq.com',
36
36
  url='https://github.com/XLPRUtils/pyxllib',
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes