PaIRS-UniNa 0.1.13__cp310-cp310-win_amd64.whl → 0.2.8__cp310-cp310-win_amd64.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.
Files changed (292) hide show
  1. PaIRS_UniNa/Calibration_Tab.py +331 -0
  2. PaIRS_UniNa/Changes.txt +134 -2
  3. PaIRS_UniNa/Custom_Top.py +299 -299
  4. PaIRS_UniNa/Explorer.py +3136 -0
  5. PaIRS_UniNa/FolderLoop.py +562 -0
  6. PaIRS_UniNa/Input_Tab.py +831 -0
  7. PaIRS_UniNa/Input_Tab_CalVi.py +786 -0
  8. PaIRS_UniNa/Input_Tab_tools.py +3025 -0
  9. PaIRS_UniNa/Log_Tab.py +57 -14
  10. PaIRS_UniNa/Output_Tab.py +922 -0
  11. PaIRS_UniNa/PaIRS_PIV.py +111 -18
  12. PaIRS_UniNa/PaIRS_pypacks.py +698 -140
  13. PaIRS_UniNa/Process_Tab.py +1221 -1402
  14. PaIRS_UniNa/Process_Tab_CalVi.py +137 -262
  15. PaIRS_UniNa/Process_Tab_Disp.py +163 -0
  16. PaIRS_UniNa/Process_Tab_Min.py +120 -0
  17. PaIRS_UniNa/Saving_tools.py +296 -0
  18. PaIRS_UniNa/TabTools.py +863 -543
  19. PaIRS_UniNa/Vis_Tab.py +1898 -1315
  20. PaIRS_UniNa/Vis_Tab_CalVi.py +484 -356
  21. PaIRS_UniNa/Whatsnew.py +59 -10
  22. PaIRS_UniNa/_PaIRS_PIV.pyd +0 -0
  23. PaIRS_UniNa/__init__.py +4 -3
  24. PaIRS_UniNa/addwidgets_ps.py +326 -56
  25. PaIRS_UniNa/calib.py +19 -12
  26. PaIRS_UniNa/calibView.py +48 -25
  27. PaIRS_UniNa/gPaIRS.py +3902 -3461
  28. PaIRS_UniNa/gPalette.py +189 -170
  29. PaIRS_UniNa/icons/align_all.png +0 -0
  30. PaIRS_UniNa/icons/announcement.png +0 -0
  31. PaIRS_UniNa/icons/automatic_levels_off.png +0 -0
  32. PaIRS_UniNa/icons/automatic_levels_on.png +0 -0
  33. PaIRS_UniNa/icons/automatic_off.png +0 -0
  34. PaIRS_UniNa/icons/automatic_on.png +0 -0
  35. PaIRS_UniNa/icons/automatic_size_off.png +0 -0
  36. PaIRS_UniNa/icons/automatic_size_on.png +0 -0
  37. PaIRS_UniNa/icons/bin_off.png +0 -0
  38. PaIRS_UniNa/icons/bin_on.png +0 -0
  39. PaIRS_UniNa/icons/brush_cursor.png +0 -0
  40. PaIRS_UniNa/icons/bugfix.png +0 -0
  41. PaIRS_UniNa/icons/cal_proc.png +0 -0
  42. PaIRS_UniNa/icons/cal_proc_off.png +0 -0
  43. PaIRS_UniNa/icons/cal_step.png +0 -0
  44. PaIRS_UniNa/icons/cal_step_off.png +0 -0
  45. PaIRS_UniNa/icons/calibration_logo.png +0 -0
  46. PaIRS_UniNa/icons/change_folder.png +0 -0
  47. PaIRS_UniNa/icons/change_folder_off.png +0 -0
  48. PaIRS_UniNa/icons/close_all.png +0 -0
  49. PaIRS_UniNa/icons/close_workspace.png +0 -0
  50. PaIRS_UniNa/icons/colormap.png +0 -0
  51. PaIRS_UniNa/icons/colormaps/Accent.png +0 -0
  52. PaIRS_UniNa/icons/colormaps/BrBG.png +0 -0
  53. PaIRS_UniNa/icons/colormaps/Dark2.png +0 -0
  54. PaIRS_UniNa/icons/colormaps/PRGn.png +0 -0
  55. PaIRS_UniNa/icons/colormaps/Paired.png +0 -0
  56. PaIRS_UniNa/icons/colormaps/Pastel1.png +0 -0
  57. PaIRS_UniNa/icons/colormaps/Pastel2.png +0 -0
  58. PaIRS_UniNa/icons/colormaps/PiYG.png +0 -0
  59. PaIRS_UniNa/icons/colormaps/PuOr.png +0 -0
  60. PaIRS_UniNa/icons/colormaps/RdBu.png +0 -0
  61. PaIRS_UniNa/icons/colormaps/RdGy.png +0 -0
  62. PaIRS_UniNa/icons/colormaps/RdYlBu.png +0 -0
  63. PaIRS_UniNa/icons/colormaps/RdYlGn.png +0 -0
  64. PaIRS_UniNa/icons/colormaps/Set1.png +0 -0
  65. PaIRS_UniNa/icons/colormaps/Set2.png +0 -0
  66. PaIRS_UniNa/icons/colormaps/Set3.png +0 -0
  67. PaIRS_UniNa/icons/colormaps/Spectral.png +0 -0
  68. PaIRS_UniNa/icons/colormaps/Wistia.png +0 -0
  69. PaIRS_UniNa/icons/colormaps/afmhot.png +0 -0
  70. PaIRS_UniNa/icons/colormaps/autumn.png +0 -0
  71. PaIRS_UniNa/icons/colormaps/binary.png +0 -0
  72. PaIRS_UniNa/icons/colormaps/blackVector.png +0 -0
  73. PaIRS_UniNa/icons/colormaps/blueVector.png +0 -0
  74. PaIRS_UniNa/icons/colormaps/bone.png +0 -0
  75. PaIRS_UniNa/icons/colormaps/brg.png +0 -0
  76. PaIRS_UniNa/icons/colormaps/bwr.png +0 -0
  77. PaIRS_UniNa/icons/colormaps/cividis.png +0 -0
  78. PaIRS_UniNa/icons/colormaps/cool.png +0 -0
  79. PaIRS_UniNa/icons/colormaps/coolwarm.png +0 -0
  80. PaIRS_UniNa/icons/colormaps/copper.png +0 -0
  81. PaIRS_UniNa/icons/colormaps/cubehelix.png +0 -0
  82. PaIRS_UniNa/icons/colormaps/cyanVector.png +0 -0
  83. PaIRS_UniNa/icons/colormaps/flag.png +0 -0
  84. PaIRS_UniNa/icons/colormaps/gist_heat.png +0 -0
  85. PaIRS_UniNa/icons/colormaps/gray.png +0 -0
  86. PaIRS_UniNa/icons/colormaps/greenVector.png +0 -0
  87. PaIRS_UniNa/icons/colormaps/hot.png +0 -0
  88. PaIRS_UniNa/icons/colormaps/hsv.png +0 -0
  89. PaIRS_UniNa/icons/colormaps/inferno.png +0 -0
  90. PaIRS_UniNa/icons/colormaps/jet.png +0 -0
  91. PaIRS_UniNa/icons/colormaps/magentaVector.png +0 -0
  92. PaIRS_UniNa/icons/colormaps/magma.png +0 -0
  93. PaIRS_UniNa/icons/colormaps/ocean.png +0 -0
  94. PaIRS_UniNa/icons/colormaps/pink.png +0 -0
  95. PaIRS_UniNa/icons/colormaps/plasma.png +0 -0
  96. PaIRS_UniNa/icons/colormaps/prism.png +0 -0
  97. PaIRS_UniNa/icons/colormaps/rainbow.png +0 -0
  98. PaIRS_UniNa/icons/colormaps/redVector.png +0 -0
  99. PaIRS_UniNa/icons/colormaps/seismic.png +0 -0
  100. PaIRS_UniNa/icons/colormaps/spring.png +0 -0
  101. PaIRS_UniNa/icons/colormaps/summer.png +0 -0
  102. PaIRS_UniNa/icons/colormaps/tab10.png +0 -0
  103. PaIRS_UniNa/icons/colormaps/tab20.png +0 -0
  104. PaIRS_UniNa/icons/colormaps/tab20b.png +0 -0
  105. PaIRS_UniNa/icons/colormaps/tab20c.png +0 -0
  106. PaIRS_UniNa/icons/colormaps/terrain.png +0 -0
  107. PaIRS_UniNa/icons/colormaps/twilight.png +0 -0
  108. PaIRS_UniNa/icons/colormaps/viridis.png +0 -0
  109. PaIRS_UniNa/icons/colormaps/whiteVector.png +0 -0
  110. PaIRS_UniNa/icons/colormaps/winter.png +0 -0
  111. PaIRS_UniNa/icons/colormaps/yellowVector.png +0 -0
  112. PaIRS_UniNa/icons/common_region.png +0 -0
  113. PaIRS_UniNa/icons/common_region_off.png +0 -0
  114. PaIRS_UniNa/icons/completed.png +0 -0
  115. PaIRS_UniNa/icons/contourf_off.png +0 -0
  116. PaIRS_UniNa/icons/contourf_on.png +0 -0
  117. PaIRS_UniNa/icons/copy.png +0 -0
  118. PaIRS_UniNa/icons/copy_process.png +0 -0
  119. PaIRS_UniNa/icons/copy_process_off.png +0 -0
  120. PaIRS_UniNa/icons/cut.png +0 -0
  121. PaIRS_UniNa/icons/cut_warnings.png +0 -0
  122. PaIRS_UniNa/icons/darkmode.png +0 -0
  123. PaIRS_UniNa/icons/disp_step.png +0 -0
  124. PaIRS_UniNa/icons/disp_step_off.png +0 -0
  125. PaIRS_UniNa/icons/edit_list.png +0 -0
  126. PaIRS_UniNa/icons/example_list.png +0 -0
  127. PaIRS_UniNa/icons/flaticon_PaIRS_beta.png +0 -0
  128. PaIRS_UniNa/icons/flaticon_PaIRS_download_warning.png +0 -0
  129. PaIRS_UniNa/icons/flip_y_off.png +0 -0
  130. PaIRS_UniNa/icons/flip_y_on.png +0 -0
  131. PaIRS_UniNa/icons/folder_loop_cleanup.png +0 -0
  132. PaIRS_UniNa/icons/folder_loop_cleanup_off.png +0 -0
  133. PaIRS_UniNa/icons/gear.gif +0 -0
  134. PaIRS_UniNa/icons/gear.png +0 -0
  135. PaIRS_UniNa/icons/import_set.png +0 -0
  136. PaIRS_UniNa/icons/information.png +0 -0
  137. PaIRS_UniNa/icons/input_logo.png +0 -0
  138. PaIRS_UniNa/icons/issue.png +0 -0
  139. PaIRS_UniNa/icons/laser_NTR.png +0 -0
  140. PaIRS_UniNa/icons/laser_TR_double.png +0 -0
  141. PaIRS_UniNa/icons/laser_TR_single.png +0 -0
  142. PaIRS_UniNa/icons/link.png +0 -0
  143. PaIRS_UniNa/icons/linked.png +0 -0
  144. PaIRS_UniNa/icons/log_logo.png +0 -0
  145. PaIRS_UniNa/icons/logo_opaco.png +0 -0
  146. PaIRS_UniNa/icons/measure.png +0 -0
  147. PaIRS_UniNa/icons/measure_off.png +0 -0
  148. PaIRS_UniNa/icons/min_proc.png +0 -0
  149. PaIRS_UniNa/icons/min_proc_off.png +0 -0
  150. PaIRS_UniNa/icons/min_step.png +0 -0
  151. PaIRS_UniNa/icons/min_step_off.png +0 -0
  152. PaIRS_UniNa/icons/new_workspace.png +0 -0
  153. PaIRS_UniNa/icons/open_image.png +0 -0
  154. PaIRS_UniNa/icons/open_new_window.png +0 -0
  155. PaIRS_UniNa/icons/open_result.png +0 -0
  156. PaIRS_UniNa/icons/open_workspace.png +0 -0
  157. PaIRS_UniNa/icons/output_logo.png +0 -0
  158. PaIRS_UniNa/icons/paste_above.png +0 -0
  159. PaIRS_UniNa/icons/paste_below.png +0 -0
  160. PaIRS_UniNa/icons/paused.png +0 -0
  161. PaIRS_UniNa/icons/piv_proc.png +0 -0
  162. PaIRS_UniNa/icons/piv_proc_off.png +0 -0
  163. PaIRS_UniNa/icons/piv_step.png +0 -0
  164. PaIRS_UniNa/icons/piv_step_off.png +0 -0
  165. PaIRS_UniNa/icons/process_logo.png +0 -0
  166. PaIRS_UniNa/icons/process_loop.png +0 -0
  167. PaIRS_UniNa/icons/project.png +0 -0
  168. PaIRS_UniNa/icons/pylog.png +0 -0
  169. PaIRS_UniNa/icons/python_warning.png +0 -0
  170. PaIRS_UniNa/icons/queue.png +0 -0
  171. PaIRS_UniNa/icons/read.png +0 -0
  172. PaIRS_UniNa/icons/read_list.png +0 -0
  173. PaIRS_UniNa/icons/reset.png +0 -0
  174. PaIRS_UniNa/icons/reset_levels.png +0 -0
  175. PaIRS_UniNa/icons/restore_undo.png +0 -0
  176. PaIRS_UniNa/icons/running.gif +0 -0
  177. PaIRS_UniNa/icons/running.png +0 -0
  178. PaIRS_UniNa/icons/running_warn.png +0 -0
  179. PaIRS_UniNa/icons/save_and_stop.png +0 -0
  180. PaIRS_UniNa/icons/save_cfg.png +0 -0
  181. PaIRS_UniNa/icons/saveas_workspace.png +0 -0
  182. PaIRS_UniNa/icons/scale_all.png +0 -0
  183. PaIRS_UniNa/icons/scale_down.png +0 -0
  184. PaIRS_UniNa/icons/scale_up.png +0 -0
  185. PaIRS_UniNa/icons/scan_list.png +0 -0
  186. PaIRS_UniNa/icons/scan_path.png +0 -0
  187. PaIRS_UniNa/icons/scan_path_loop.png +0 -0
  188. PaIRS_UniNa/icons/scan_path_loop_off.png +0 -0
  189. PaIRS_UniNa/icons/search.png +0 -0
  190. PaIRS_UniNa/icons/showIW_off.png +0 -0
  191. PaIRS_UniNa/icons/showIW_on.png +0 -0
  192. PaIRS_UniNa/icons/show_all.png +0 -0
  193. PaIRS_UniNa/icons/sort.png +0 -0
  194. PaIRS_UniNa/icons/sort_reversed.png +0 -0
  195. PaIRS_UniNa/icons/spiv_proc.png +0 -0
  196. PaIRS_UniNa/icons/spiv_proc_off.png +0 -0
  197. PaIRS_UniNa/icons/star.png +0 -0
  198. PaIRS_UniNa/icons/step_inheritance.png +0 -0
  199. PaIRS_UniNa/icons/subMIN_off.png +0 -0
  200. PaIRS_UniNa/icons/subMIN_on.png +0 -0
  201. PaIRS_UniNa/icons/unedited.png +0 -0
  202. PaIRS_UniNa/icons/uninitialized.png +0 -0
  203. PaIRS_UniNa/icons/unlink.png +0 -0
  204. PaIRS_UniNa/icons/unwrap_items.png +0 -0
  205. PaIRS_UniNa/icons/vectorColor.png +0 -0
  206. PaIRS_UniNa/icons/view.png +0 -0
  207. PaIRS_UniNa/icons/view_off.png +0 -0
  208. PaIRS_UniNa/icons/vis_logo.png +0 -0
  209. PaIRS_UniNa/icons/warning_circle.png +0 -0
  210. PaIRS_UniNa/icons/window.png +0 -0
  211. PaIRS_UniNa/icons/workspace.png +0 -0
  212. PaIRS_UniNa/icons/wrap_items.png +0 -0
  213. PaIRS_UniNa/icons/write_list.png +0 -0
  214. PaIRS_UniNa/listLib.py +303 -0
  215. PaIRS_UniNa/mtfPIV.py +8 -8
  216. PaIRS_UniNa/parForMulti.py +7 -5
  217. PaIRS_UniNa/parForWorkers.py +370 -31
  218. PaIRS_UniNa/pivParFor.py +233 -229
  219. PaIRS_UniNa/plt_util.py +141 -141
  220. PaIRS_UniNa/preProcParFor.py +153 -148
  221. PaIRS_UniNa/procTools.py +631 -178
  222. PaIRS_UniNa/readcfg.py +31 -1
  223. PaIRS_UniNa/rqrdpckgs.txt +9 -0
  224. PaIRS_UniNa/stereoPivParFor.py +227 -0
  225. PaIRS_UniNa/tAVarie.py +215 -215
  226. PaIRS_UniNa/tabSplitter.py +612 -0
  227. PaIRS_UniNa/ui_Calibration_Tab.py +545 -0
  228. PaIRS_UniNa/ui_Custom_Top.py +5 -5
  229. PaIRS_UniNa/ui_Input_Tab.py +1101 -0
  230. PaIRS_UniNa/{ui_Import_Tab_CalVi.py → ui_Input_Tab_CalVi.py} +1282 -1275
  231. PaIRS_UniNa/ui_Log_Tab.py +262 -257
  232. PaIRS_UniNa/{ui_Export_Tab.py → ui_Output_Tab.py} +2361 -1778
  233. PaIRS_UniNa/ui_Process_Tab.py +3809 -3758
  234. PaIRS_UniNa/ui_Process_Tab_CalVi.py +1547 -1546
  235. PaIRS_UniNa/ui_Process_Tab_Disp.py +1141 -0
  236. PaIRS_UniNa/ui_Process_Tab_Min.py +437 -0
  237. PaIRS_UniNa/ui_Vis_Tab.py +1626 -1208
  238. PaIRS_UniNa/ui_Vis_Tab_CalVi.py +1249 -1249
  239. PaIRS_UniNa/ui_Whatsnew.py +131 -131
  240. PaIRS_UniNa/ui_gPairs.py +876 -950
  241. PaIRS_UniNa/ui_infoPaIRS.py +550 -425
  242. PaIRS_UniNa/whatsnew.txt +6 -4
  243. {PaIRS_UniNa-0.1.13.dist-info → pairs_unina-0.2.8.dist-info}/METADATA +69 -51
  244. pairs_unina-0.2.8.dist-info/RECORD +329 -0
  245. {PaIRS_UniNa-0.1.13.dist-info → pairs_unina-0.2.8.dist-info}/WHEEL +1 -1
  246. PaIRS_UniNa/CalVi.py +0 -18
  247. PaIRS_UniNa/Export_Tab.py +0 -574
  248. PaIRS_UniNa/Import_Tab.py +0 -657
  249. PaIRS_UniNa/Import_Tab_CalVi.py +0 -861
  250. PaIRS_UniNa/Import_Tab_tools.py +0 -598
  251. PaIRS_UniNa/Tree_Tab.py +0 -543
  252. PaIRS_UniNa/gCalVi.py +0 -2024
  253. PaIRS_UniNa/icons/add.png +0 -0
  254. PaIRS_UniNa/icons/cancelled.png +0 -0
  255. PaIRS_UniNa/icons/chain.png +0 -0
  256. PaIRS_UniNa/icons/chain_broken.png +0 -0
  257. PaIRS_UniNa/icons/default_sizes.png +0 -0
  258. PaIRS_UniNa/icons/dock_tabs.png +0 -0
  259. PaIRS_UniNa/icons/done.png +0 -0
  260. PaIRS_UniNa/icons/down_arrow.png +0 -0
  261. PaIRS_UniNa/icons/export_logo.png +0 -0
  262. PaIRS_UniNa/icons/fast_delete.png +0 -0
  263. PaIRS_UniNa/icons/flip_y.png +0 -0
  264. PaIRS_UniNa/icons/ganci.png +0 -0
  265. PaIRS_UniNa/icons/import_blue.png +0 -0
  266. PaIRS_UniNa/icons/import_logo.png +0 -0
  267. PaIRS_UniNa/icons/missing.png +0 -0
  268. PaIRS_UniNa/icons/process_icon.png +0 -0
  269. PaIRS_UniNa/icons/processing.png +0 -0
  270. PaIRS_UniNa/icons/restart.png +0 -0
  271. PaIRS_UniNa/icons/right_arrow.png +0 -0
  272. PaIRS_UniNa/icons/run_piv.png +0 -0
  273. PaIRS_UniNa/icons/terminal.png +0 -0
  274. PaIRS_UniNa/icons/undock_tabs.png +0 -0
  275. PaIRS_UniNa/icons/vect_field.png +0 -0
  276. PaIRS_UniNa/icons/w0.png +0 -0
  277. PaIRS_UniNa/icons/w1.png +0 -0
  278. PaIRS_UniNa/icons/w2.png +0 -0
  279. PaIRS_UniNa/icons/w3.png +0 -0
  280. PaIRS_UniNa/icons/w4.png +0 -0
  281. PaIRS_UniNa/icons/w5.png +0 -0
  282. PaIRS_UniNa/run_CalVi.py +0 -14
  283. PaIRS_UniNa/run_gcalvi.py +0 -5
  284. PaIRS_UniNa/ui_Import_Tab.py +0 -1077
  285. PaIRS_UniNa/ui_Tree_Tab.py +0 -684
  286. PaIRS_UniNa/ui_gCalVi.py +0 -640
  287. PaIRS_UniNa/ui_infoCalVi.py +0 -428
  288. PaIRS_UniNa-0.1.13.dist-info/LICENSE +0 -19
  289. PaIRS_UniNa-0.1.13.dist-info/RECORD +0 -174
  290. /PaIRS_UniNa/icons/{clean_queue.png → clean.png} +0 -0
  291. /PaIRS_UniNa/icons/{waiting_c.png → sandglass.png} +0 -0
  292. {PaIRS_UniNa-0.1.13.dist-info → pairs_unina-0.2.8.dist-info}/top_level.txt +0 -0
PaIRS_UniNa/tAVarie.py CHANGED
@@ -1,215 +1,215 @@
1
- ''' printing routines'''
2
- from enum import Enum
3
- from time import time
4
-
5
-
6
-
7
- def commenti():
8
- '''
9
- ## Descrizione di alcuni commenti (Doppio ## per titolo Anche singolo #)
10
- ### Sotto titolo (###)
11
- #### Sotto titolo (####)
12
-
13
- Questo è un link interno [commenti] o esterno [https://dartdoc.takyam.com/articles/doc-comment-guidelines/#markup].
14
-
15
- L'editor fa un wrap automatico Per andare a capo mettere una linea vuota altrimenti il testo della linea successiva si attacca a quella precedente.
16
-
17
- Lista formattata * o numero seguito da punto
18
- 1. item continues until next list item or blank line
19
- 2. next item
20
-
21
- Non funzionano per python:
22
- * Per il corsivo utilizzare _single underscore_ or *single asterisk*. Per Boldface **double asterisk** or __double underscore__
23
- * Inserire 5 spazi ed una linea vuota per mettere del codice che poi verrà formattato
24
-
25
- $ def commenti():
26
- void commenti(){}
27
-
28
- in alternativa usare (alt96) anche se non mi sembra che funzioni `def commenti()` (note the backquotes)
29
- '''
30
- return
31
-
32
-
33
-
34
- PrintTAPriority=Enum('PrintTAPriority' ,['never', 'veryLow', 'low', 'medium', 'mediumHigh', 'high', 'always' ])
35
- '''
36
- * never non stampa nulla
37
- * always stampa sempre
38
- * Altro stampa solo se la priorità impostata durante la fase di stampa è maggiore uguale di quella impostata nella classe (eccezione per PrintTAPriority.always)
39
- * quindi impostando PrintTA.flagPriority=PrintTAPriority.always non stampa nulla
40
- * quindi impostando PrintTA.flagPriority=PrintTAPriority.never stampa tutto
41
- '''
42
-
43
- class PrintTA ():
44
- '''
45
- ## Usare al posto di Print con qualcosa del tipo
46
-
47
- * printTA = PrintTA(PrintTA.blue, PrintTA.faceStd, PrintTAPriority.medium)
48
- * printTA.pr('blue',color=printTA.blue)
49
- * printTA.pr('green',color=printTA.green)
50
- * printTA.pr('yellow',color=printTA.yellow)
51
- * printTA.pr('magenta',color=printTA.magenta)
52
- * printTA.pr('cyan',color=printTA.cyan)
53
- * printTA.pr('white faceUnderline plus faceItalic',color=printTA.white,face=printTA.faceUnderline+printTA.faceItalic)
54
- * printTA.err('Error always bold and','red')
55
- * printTA.pri.Time('cyan with time',color=printTA.cyan)
56
-
57
- Per disattivare la stampa:
58
- * PrintTA.flagPriority=PrintTAPriority.always
59
-
60
- '''
61
-
62
- faceBold = ';1'
63
- faceItalic = ';3'
64
- faceUnderline = ';4'
65
- faceStd = ''
66
-
67
- stdCol = '0'
68
- red = '31'
69
- green = '32'
70
- yellow = '33'
71
- blue = '34'
72
- magenta = '35'
73
- cyan = '36'
74
- white = '37'
75
- _tAPrintESC = '\x1B['
76
- _tAPrintLAST = 'm'
77
- _tAPrintRESET = '\x1B[0m'
78
- flagPriority=PrintTAPriority.medium
79
- startTime=time()
80
- def __init__(self,color='37',face='',flagPriority=PrintTAPriority.medium, prefix='',suffix=''):
81
- self.face =face
82
- self.color=color
83
- self.prefix=prefix
84
- self.flagPriority=flagPriority
85
- self.suffix=suffix
86
-
87
- def internalPrint(self, *args,**kwargs):
88
- ''' change for a different print function'''
89
- print(*args,**kwargs,flush=True)
90
-
91
-
92
- # [https://en.wikipedia.org/wiki/ANSI_escape_code#SGR_parameters]
93
- # print in color with priority
94
- # msg text to print
95
- # color one of PrintTA.color (e.g. PrintTA.red)
96
- # face one of PrintTA.bold, PrintTA.italic, PrintTA.underline or PrintTA.stdFace
97
- # pri one of PrintTAPriority
98
-
99
- def pr(self, *args,color=None, face=None, pri=None,**kwargs):
100
- ''' the printing function '''
101
- #if self.flagPriority is PrintTAPriority.never:
102
- if PrintTA.flagPriority is PrintTAPriority.always:
103
- return
104
- if color is None:
105
- color=self.color
106
- if face is None:
107
- face=self.face
108
- if pri is None :
109
- pri=self.flagPriority
110
- if pri.value < PrintTA.flagPriority.value:
111
- return
112
- self.internalPrint(f'{self._tAPrintESC}{color}{face}{self._tAPrintLAST}{self.prefix}',end='')
113
- self.internalPrint(*args,f'{self.suffix}{self._tAPrintRESET}',**kwargs)
114
-
115
- #self.internalPrint(f'{self._tAPrintESC}{color}{face}{self._tAPrintLAST}{self.prefix}',*args,f'{self.suffix}{self._tAPrintRESET}',**kwargs)
116
-
117
- def err(self, *args,**kwargs):
118
- ''' print error always bold and red'''
119
- self.pr( color= PrintTA.red, face= PrintTA.faceBold, pri= PrintTAPriority.medium,*args,**kwargs)
120
-
121
- def prTime(self, *args,flagReset=0,color=None, face=None, pri=None,**kwargs):
122
- '''
123
- flagreset==0 stampa senza reset (tempo incremetale )
124
- flagreset==1 stampa e reset origin (tempo incremetale riazzera l'origine dei tempi)
125
- flagreset==2 stampa senza tempo e reset origin
126
- flagreset==3 fa solo il reset dei tempi origin
127
- '''
128
- if PrintTA.flagPriority is PrintTAPriority.always:
129
- return
130
-
131
-
132
- if 0<=flagReset<=1:
133
- self.pr(f'Deltat={time()-PrintTA.startTime} -- ',*args, color=color, face=face, pri=pri,**kwargs)
134
- elif flagReset==2:
135
- self.pr(*args, color=color, face=face, pri=pri,**kwargs)
136
- if flagReset>0:
137
- PrintTA.startTime=time()
138
- def printEvidenced(self,*args,sep='*', numLinee=4,numSep=20,color=None, face=None, pri=None,**kwargs):
139
- if PrintTA.flagPriority is PrintTAPriority.always:
140
- return
141
- dum=sep*numSep
142
- separator=f'{dum}\n'*(numLinee-1)+dum
143
- self.pr(separator,color=color, face=face, pri=pri)
144
- self.pr(*args, color=color, face=face, pri=pri,**kwargs)
145
- self.pr(separator,color=color, face=face, pri=pri)
146
-
147
-
148
-
149
- def testPr():
150
- ''' can be used to test the priorities'''
151
- PrintTA(PrintTA.white, PrintTA.faceStd, PrintTAPriority.never).pr ('never')
152
- PrintTA(PrintTA.white, PrintTA.faceStd, PrintTAPriority.medium).pr ('medium')
153
- PrintTA(PrintTA.white, PrintTA.faceStd, PrintTAPriority.high).pr ('high')
154
- PrintTA(PrintTA.white, PrintTA.faceStd, PrintTAPriority.always).pr ('always')
155
-
156
-
157
-
158
- class ColorPrint:
159
- def __init__(self,flagTime=False,prio=PrintTAPriority.medium,faceStd=PrintTA.faceStd,flagFullDebug=False):
160
- self.flagTime=flagTime
161
- self.prio=prio
162
- self.faceStd=faceStd
163
- self.flagFullDebug=flagFullDebug
164
- self.setPrints()
165
-
166
- def setPrints(self):
167
- if self.flagTime:
168
- self.white = lambda flagReset=0, *args, **kwargs: PrintTA(PrintTA.white, self.faceStd, self.prio).prTime(flagReset,*args,**kwargs)
169
- self.red = lambda flagReset=0, *args, **kwargs: PrintTA(PrintTA.red, self.faceStd, self.prio).prTime(flagReset,*args,**kwargs)
170
- self.green = lambda flagReset=0, *args, **kwargs: PrintTA(PrintTA.green, self.faceStd, self.prio).prTime(flagReset,*args,**kwargs)
171
- self.blue = lambda flagReset=0, *args, **kwargs: PrintTA(PrintTA.blue, self.faceStd, self.prio).prTime(flagReset,*args,**kwargs)
172
- self.cyan = lambda flagReset=0, *args, **kwargs: PrintTA(PrintTA.cyan, self.faceStd, self.prio).prTime(flagReset,*args,**kwargs)
173
- self.magenta = lambda flagReset=0, *args, **kwargs: PrintTA(PrintTA.magenta, self.faceStd, self.prio).prTime(flagReset,*args,**kwargs)
174
- self.yellow = lambda flagReset=0, *args, **kwargs: PrintTA(PrintTA.yellow, self.faceStd, self.prio).prTime(flagReset,*args,**kwargs)
175
- else:
176
- self.white = PrintTA(PrintTA.white, self.faceStd, self.prio).pr
177
- self.red = PrintTA(PrintTA.red, self.faceStd, self.prio).pr
178
- self.green = PrintTA(PrintTA.green, self.faceStd, self.prio).pr
179
- self.blue = PrintTA(PrintTA.blue, self.faceStd, self.prio).pr
180
- self.cyan = PrintTA(PrintTA.cyan, self.faceStd, self.prio).pr
181
- self.magenta = PrintTA(PrintTA.magenta, self.faceStd, self.prio).pr
182
- self.yellow = PrintTA(PrintTA.yellow, self.faceStd, self.prio).pr
183
-
184
- #if prio is assigned to never, in the gPaIRS initializiation the printing is deactivated, otherwise activated
185
- #if prio is > veryLow, then by default the printing is activated after gPaIRS initialization
186
- #flagFullDebug=True means that the printing is available only if fullDebug mode is active
187
- class GPaIRSPrint:
188
- def __init__(self):
189
- self.General=ColorPrint(prio=PrintTAPriority.medium)
190
- self.Info=ColorPrint(prio=PrintTAPriority.medium)
191
- self.Time=ColorPrint(prio=PrintTAPriority.veryLow,flagTime=True,faceStd=PrintTA.faceUnderline)
192
- self.Error=ColorPrint(prio=PrintTAPriority.medium,faceStd=PrintTA.faceBold)
193
- self.Process=ColorPrint(prio=PrintTAPriority.veryLow)
194
- self.Callback=ColorPrint(prio=PrintTAPriority.veryLow)
195
- self.Geometry=ColorPrint(prio=PrintTAPriority.veryLow,flagFullDebug=True)
196
-
197
- pri=GPaIRSPrint()
198
-
199
- if __name__ == '__main__':
200
- printTA = PrintTA(PrintTA.blue, PrintTA.faceStd, PrintTAPriority.medium)
201
- printTA.pr('blue',color=printTA.blue)
202
- printTA.pr('green',color=printTA.green)
203
- printTA.pr('yellow',color=printTA.yellow)
204
- printTA.pr('magenta',color=printTA.magenta)
205
- printTA.pr('cyan',color=printTA.cyan)
206
- printTA.pr('white faceUnderline plus faceItalic',color=printTA.white,face=printTA.faceUnderline+printTA.faceItalic)
207
-
208
- printTA.err('Error always bold and','red')
209
- printTA.pri.Time('cyan with time',color=printTA.cyan)
210
- pri.Time.blue(0,'taPrintTime')
211
- printTA.flagPriority=PrintTAPriority.always
212
- printTA.pri.Time('Non è stampato',color=printTA.cyan)
213
- #/// Stampa in rosso bold ed a PrintTAPriority.Always
214
- #void err(msg) => pr(msg, color: red, face: faceBold, pri: PrintTAPriority.always);
215
-
1
+ ''' printing routines'''
2
+ from enum import Enum
3
+ from time import time
4
+
5
+
6
+
7
+ def commenti():
8
+ '''
9
+ ## Descrizione di alcuni commenti (Doppio ## per titolo Anche singolo #)
10
+ ### Sotto titolo (###)
11
+ #### Sotto titolo (####)
12
+
13
+ Questo è un link interno [commenti] o esterno [https://dartdoc.takyam.com/articles/doc-comment-guidelines/#markup].
14
+
15
+ L'editor fa un wrap automatico Per andare a capo mettere una linea vuota altrimenti il testo della linea successiva si attacca a quella precedente.
16
+
17
+ Lista formattata * o numero seguito da punto
18
+ 1. item continues until next list item or blank line
19
+ 2. next item
20
+
21
+ Non funzionano per python:
22
+ * Per il corsivo utilizzare _single underscore_ or *single asterisk*. Per Boldface **double asterisk** or __double underscore__
23
+ * Inserire 5 spazi ed una linea vuota per mettere del codice che poi verrà formattato
24
+
25
+ $ def commenti():
26
+ void commenti(){}
27
+
28
+ in alternativa usare (alt96) anche se non mi sembra che funzioni `def commenti()` (note the backquotes)
29
+ '''
30
+ return
31
+
32
+
33
+
34
+ PrintTAPriority=Enum('PrintTAPriority' ,['never', 'veryLow', 'low', 'medium', 'mediumHigh', 'high', 'always' ])
35
+ '''
36
+ * never non stampa nulla
37
+ * always stampa sempre
38
+ * Altro stampa solo se la priorità impostata durante la fase di stampa è maggiore uguale di quella impostata nella classe (eccezione per PrintTAPriority.always)
39
+ * quindi impostando PrintTA.flagPriority=PrintTAPriority.always non stampa nulla
40
+ * quindi impostando PrintTA.flagPriority=PrintTAPriority.never stampa tutto
41
+ '''
42
+
43
+ class PrintTA ():
44
+ '''
45
+ ## Usare al posto di Print con qualcosa del tipo
46
+
47
+ * printTA = PrintTA(PrintTA.blue, PrintTA.faceStd, PrintTAPriority.medium)
48
+ * printTA.pr('blue',color=printTA.blue)
49
+ * printTA.pr('green',color=printTA.green)
50
+ * printTA.pr('yellow',color=printTA.yellow)
51
+ * printTA.pr('magenta',color=printTA.magenta)
52
+ * printTA.pr('cyan',color=printTA.cyan)
53
+ * printTA.pr('white faceUnderline plus faceItalic',color=printTA.white,face=printTA.faceUnderline+printTA.faceItalic)
54
+ * printTA.err('Error always bold and','red')
55
+ * printTA.pri.Time('cyan with time',color=printTA.cyan)
56
+
57
+ Per disattivare la stampa:
58
+ * PrintTA.flagPriority=PrintTAPriority.always
59
+
60
+ '''
61
+
62
+ faceBold = ';1'
63
+ faceItalic = ';3'
64
+ faceUnderline = ';4'
65
+ faceStd = ''
66
+
67
+ stdCol = '0'
68
+ red = '31'
69
+ green = '32'
70
+ yellow = '33'
71
+ blue = '34'
72
+ magenta = '35'
73
+ cyan = '36'
74
+ white = '37'
75
+ _tAPrintESC = '\x1B['
76
+ _tAPrintLAST = 'm'
77
+ _tAPrintRESET = '\x1B[0m'
78
+ flagPriority=PrintTAPriority.medium
79
+ startTime=time()
80
+ def __init__(self,color='37',face='',flagPriority=PrintTAPriority.medium, prefix='',suffix=''):
81
+ self.face =face
82
+ self.color=color
83
+ self.prefix=prefix
84
+ self.flagPriority=flagPriority
85
+ self.suffix=suffix
86
+
87
+ def internalPrint(self, *args,**kwargs):
88
+ ''' change for a different print function'''
89
+ print(*args,**kwargs,flush=True)
90
+
91
+
92
+ # [https://en.wikipedia.org/wiki/ANSI_escape_code#SGR_parameters]
93
+ # print in color with priority
94
+ # msg text to print
95
+ # color one of PrintTA.color (e.g. PrintTA.red)
96
+ # face one of PrintTA.bold, PrintTA.italic, PrintTA.underline or PrintTA.stdFace
97
+ # pri one of PrintTAPriority
98
+
99
+ def pr(self, *args,color=None, face=None, pri=None,**kwargs):
100
+ ''' the printing function '''
101
+ #if self.flagPriority is PrintTAPriority.never:
102
+ if PrintTA.flagPriority is PrintTAPriority.always:
103
+ return
104
+ if color is None:
105
+ color=self.color
106
+ if face is None:
107
+ face=self.face
108
+ if pri is None :
109
+ pri=self.flagPriority
110
+ if pri.value < PrintTA.flagPriority.value:
111
+ return
112
+ self.internalPrint(f'{self._tAPrintESC}{color}{face}{self._tAPrintLAST}{self.prefix}',end='')
113
+ self.internalPrint(*args,f'{self.suffix}{self._tAPrintRESET}',**kwargs)
114
+
115
+ #self.internalPrint(f'{self._tAPrintESC}{color}{face}{self._tAPrintLAST}{self.prefix}',*args,f'{self.suffix}{self._tAPrintRESET}',**kwargs)
116
+
117
+ def err(self, *args,**kwargs):
118
+ ''' print error always bold and red'''
119
+ self.pr( color= PrintTA.red, face= PrintTA.faceBold, pri= PrintTAPriority.medium,*args,**kwargs)
120
+
121
+ def prTime(self, *args,flagReset=0,color=None, face=None, pri=None,**kwargs):
122
+ '''
123
+ flagreset==0 stampa senza reset (tempo incremetale )
124
+ flagreset==1 stampa e reset origin (tempo incremetale riazzera l'origine dei tempi)
125
+ flagreset==2 stampa senza tempo e reset origin
126
+ flagreset==3 fa solo il reset dei tempi origin
127
+ '''
128
+ if PrintTA.flagPriority is PrintTAPriority.always:
129
+ return
130
+
131
+
132
+ if 0<=flagReset<=1:
133
+ self.pr(f'Deltat={time()-PrintTA.startTime} -- ',*args, color=color, face=face, pri=pri,**kwargs)
134
+ elif flagReset==2:
135
+ self.pr(*args, color=color, face=face, pri=pri,**kwargs)
136
+ if flagReset>0:
137
+ PrintTA.startTime=time()
138
+ def printEvidenced(self,*args,sep='*', numLinee=4,numSep=20,color=None, face=None, pri=None,**kwargs):
139
+ if PrintTA.flagPriority is PrintTAPriority.always:
140
+ return
141
+ dum=sep*numSep
142
+ separator=f'{dum}\n'*(numLinee-1)+dum
143
+ self.pr(separator,color=color, face=face, pri=pri)
144
+ self.pr(*args, color=color, face=face, pri=pri,**kwargs)
145
+ self.pr(separator,color=color, face=face, pri=pri)
146
+
147
+
148
+
149
+ def testPr():
150
+ ''' can be used to test the priorities'''
151
+ PrintTA(PrintTA.white, PrintTA.faceStd, PrintTAPriority.never).pr ('never')
152
+ PrintTA(PrintTA.white, PrintTA.faceStd, PrintTAPriority.medium).pr ('medium')
153
+ PrintTA(PrintTA.white, PrintTA.faceStd, PrintTAPriority.high).pr ('high')
154
+ PrintTA(PrintTA.white, PrintTA.faceStd, PrintTAPriority.always).pr ('always')
155
+
156
+
157
+
158
+ class ColorPrint:
159
+ def __init__(self,flagTime=False,prio=PrintTAPriority.medium,faceStd=PrintTA.faceStd,flagFullDebug=False):
160
+ self.flagTime=flagTime
161
+ self.prio=prio
162
+ self.faceStd=faceStd
163
+ self.flagFullDebug=flagFullDebug
164
+ self.setPrints()
165
+
166
+ def setPrints(self):
167
+ if self.flagTime:
168
+ self.white = lambda flagReset=0, *args, **kwargs: PrintTA(PrintTA.white, self.faceStd, self.prio).prTime(flagReset,*args,**kwargs)
169
+ self.red = lambda flagReset=0, *args, **kwargs: PrintTA(PrintTA.red, self.faceStd, self.prio).prTime(flagReset,*args,**kwargs)
170
+ self.green = lambda flagReset=0, *args, **kwargs: PrintTA(PrintTA.green, self.faceStd, self.prio).prTime(flagReset,*args,**kwargs)
171
+ self.blue = lambda flagReset=0, *args, **kwargs: PrintTA(PrintTA.blue, self.faceStd, self.prio).prTime(flagReset,*args,**kwargs)
172
+ self.cyan = lambda flagReset=0, *args, **kwargs: PrintTA(PrintTA.cyan, self.faceStd, self.prio).prTime(flagReset,*args,**kwargs)
173
+ self.magenta = lambda flagReset=0, *args, **kwargs: PrintTA(PrintTA.magenta, self.faceStd, self.prio).prTime(flagReset,*args,**kwargs)
174
+ self.yellow = lambda flagReset=0, *args, **kwargs: PrintTA(PrintTA.yellow, self.faceStd, self.prio).prTime(flagReset,*args,**kwargs)
175
+ else:
176
+ self.white = PrintTA(PrintTA.white, self.faceStd, self.prio).pr
177
+ self.red = PrintTA(PrintTA.red, self.faceStd, self.prio).pr
178
+ self.green = PrintTA(PrintTA.green, self.faceStd, self.prio).pr
179
+ self.blue = PrintTA(PrintTA.blue, self.faceStd, self.prio).pr
180
+ self.cyan = PrintTA(PrintTA.cyan, self.faceStd, self.prio).pr
181
+ self.magenta = PrintTA(PrintTA.magenta, self.faceStd, self.prio).pr
182
+ self.yellow = PrintTA(PrintTA.yellow, self.faceStd, self.prio).pr
183
+
184
+ #if prio is assigned to never, in the gPaIRS initializiation the printing is deactivated, otherwise activated
185
+ #if prio is > veryLow, then by default the printing is activated after gPaIRS initialization
186
+ #flagFullDebug=True means that the printing is available only if fullDebug mode is active
187
+ class GPaIRSPrint:
188
+ def __init__(self):
189
+ self.General=ColorPrint(prio=PrintTAPriority.medium)
190
+ self.Info=ColorPrint(prio=PrintTAPriority.medium)
191
+ self.Time=ColorPrint(prio=PrintTAPriority.veryLow,flagTime=True,faceStd=PrintTA.faceUnderline)
192
+ self.Error=ColorPrint(prio=PrintTAPriority.medium,faceStd=PrintTA.faceBold)
193
+ self.Process=ColorPrint(prio=PrintTAPriority.veryLow)
194
+ self.Callback=ColorPrint(prio=PrintTAPriority.veryLow)
195
+ self.Geometry=ColorPrint(prio=PrintTAPriority.veryLow,flagFullDebug=True)
196
+
197
+ pri=GPaIRSPrint()
198
+
199
+ if __name__ == '__main__':
200
+ printTA = PrintTA(PrintTA.blue, PrintTA.faceStd, PrintTAPriority.medium)
201
+ printTA.pr('blue',color=printTA.blue)
202
+ printTA.pr('green',color=printTA.green)
203
+ printTA.pr('yellow',color=printTA.yellow)
204
+ printTA.pr('magenta',color=printTA.magenta)
205
+ printTA.pr('cyan',color=printTA.cyan)
206
+ printTA.pr('white faceUnderline plus faceItalic',color=printTA.white,face=printTA.faceUnderline+printTA.faceItalic)
207
+
208
+ printTA.err('Error always bold and','red')
209
+ printTA.pri.Time('cyan with time',color=printTA.cyan)
210
+ pri.Time.blue(0,'taPrintTime')
211
+ printTA.flagPriority=PrintTAPriority.always
212
+ printTA.pri.Time('Non è stampato',color=printTA.cyan)
213
+ #/// Stampa in rosso bold ed a PrintTAPriority.Always
214
+ #void err(msg) => pr(msg, color: red, face: faceBold, pri: PrintTAPriority.always);
215
+