psychopy 2024.2.1__py3-none-any.whl → 2024.2.4__py3-none-any.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.

Potentially problematic release.


This version of psychopy might be problematic. Click here for more details.

Files changed (276) hide show
  1. psychopy/.DS_Store +0 -0
  2. psychopy/GIT_SHA +1 -1
  3. psychopy/VERSION +1 -1
  4. psychopy/__init__.py +10 -1
  5. psychopy/__init__.py.orig +65 -0
  6. psychopy/app/{locale/ar_001/.DS_Store → .DS_Store} +0 -0
  7. psychopy/app/Resources/.DS_Store +0 -0
  8. psychopy/app/_psychopyApp.py +11 -3
  9. psychopy/app/appData.spec +1 -1
  10. psychopy/app/builder/builder.py +1 -1
  11. psychopy/app/builder/builder.py.orig +3932 -0
  12. psychopy/app/builder/dialogs/__init__.py.orig +1679 -0
  13. psychopy/app/builder/dialogs/paramCtrls.py +1 -1
  14. psychopy/app/builder/dialogs/paramCtrls.py.orig +713 -0
  15. psychopy/app/colorpicker/__init__.py.orig +411 -0
  16. psychopy/app/cortex.log +0 -0
  17. psychopy/app/jobs.py +8 -1
  18. psychopy/app/locale/ar_001/LC_MESSAGE/messages.po +2452 -1731
  19. psychopy/app/locale/zh_CN/LC_MESSAGE/zh_CN.mo +0 -0
  20. psychopy/app/locale/zh_CN/LC_MESSAGE/zh_CN.po +6127 -0
  21. psychopy/app/locale/zh_CN/LC_MESSAGE/zh_CN_allFlagged.mo +0 -0
  22. psychopy/app/locale/zh_CN/LC_MESSAGE/zh_CN_allFlagged.po +7366 -0
  23. psychopy/app/plugin_manager/dialog.py +9 -7
  24. psychopy/app/ribbon.py +2 -1
  25. psychopy/app/runner/runner.py +7 -5
  26. psychopy/clock.py +8 -4
  27. psychopy/core.py.orig +169 -0
  28. psychopy/demos/builder/Design Templates/randomisedBlocks/html/index.html +23 -0
  29. psychopy/demos/builder/Design Templates/randomisedBlocks/html/randomisedBlocks-legacy-browsers.js +423 -0
  30. psychopy/demos/builder/Design Templates/randomisedBlocks/html/randomisedBlocks.js +427 -0
  31. psychopy/demos/builder/Design Templates/randomisedBlocks/html/resources/chooseBlock.xlsx +0 -0
  32. psychopy/demos/builder/Design Templates/randomisedBlocks/html/resources/facesBlock.xlsx +0 -0
  33. psychopy/demos/builder/Design Templates/randomisedBlocks/html/resources/housesBlock.xlsx +0 -0
  34. psychopy/demos/builder/Design Templates/randomisedBlocks/html/resources/stims/face01.jpg +0 -0
  35. psychopy/demos/builder/Design Templates/randomisedBlocks/html/resources/stims/face02.jpg +0 -0
  36. psychopy/demos/builder/Design Templates/randomisedBlocks/html/resources/stims/face03.jpg +0 -0
  37. psychopy/demos/builder/Design Templates/randomisedBlocks/html/resources/stims/house01.jpg +0 -0
  38. psychopy/demos/builder/Design Templates/randomisedBlocks/html/resources/stims/house02.jpg +0 -0
  39. psychopy/demos/builder/Design Templates/randomisedBlocks/html/resources/stims/house03.jpg +0 -0
  40. psychopy/demos/builder/Design Templates/randomisedBlocks/randomisedBlocks.py +330 -0
  41. psychopy/demos/builder/Design Templates/randomisedBlocks/randomisedBlocks_lastrun.py +330 -0
  42. psychopy/demos/builder/Feature Demos/eyetracking/eyetracking.xml +298 -0
  43. psychopy/demos/builder/Feature Demos/eyetracking/eyetracking.xsd +120 -0
  44. psychopy/demos/builder/Tools/.DS_Store +0 -0
  45. psychopy/demos/builder/Tools/gammaCalibration/.DS_Store +0 -0
  46. psychopy/demos/builder/Tools/gammaCalibration/data/_gamma_correction_visual_2022-05-18_14h18.29.439.csv +38 -0
  47. psychopy/demos/builder/Tools/gammaCalibration/data/_gamma_correction_visual_2022-05-18_14h18.29.439.log +3418 -0
  48. psychopy/demos/builder/Tools/gammaCalibration/data/_gamma_correction_visual_2022-05-18_14h18.29.439.psydat +0 -0
  49. psychopy/demos/builder/Tools/gammaCalibration/data/x1_gamma_correction_visual_2022-05-17_13h59.42.928.csv +2 -0
  50. psychopy/demos/builder/Tools/gammaCalibration/data/x1_gamma_correction_visual_2022-05-17_13h59.42.928.log +15 -0
  51. psychopy/demos/builder/Tools/gammaCalibration/data/x1_gamma_correction_visual_2022-05-17_13h59.42.928.psydat +0 -0
  52. psychopy/demos/builder/Tools/gammaCalibration/gamma_correction_visual.psyexp +323 -0
  53. psychopy/demos/builder/Tools/gammaCalibration/gamma_correction_visual.py +562 -0
  54. psychopy/demos/builder/Tools/gammaCalibration/gamma_correction_visual_lastrun.py +562 -0
  55. psychopy/demos/builder/Tools/gammaCalibration/questStairs.xlsx +0 -0
  56. psychopy/demos/builder/Tools/gammaCalibration/readme.md +0 -0
  57. psychopy/demos/builder/Tools/gammaCalibration/resources/low_contrast.png +0 -0
  58. psychopy/demos/builder/Tools/gammaCalibration/resources/make_2nd_order_tex.py +59 -0
  59. psychopy/demos/builder/Tools/gammaCalibration/resources/second_order_tex.png +0 -0
  60. psychopy/demos/coder/.DS_Store +0 -0
  61. psychopy/demos/coder/experiment control/info_gamma.pickle +0 -0
  62. psychopy/demos/coder/iohub/.iohpid +1 -0
  63. psychopy/demos/coder/iohub/eyetracking/.iohpid +1 -0
  64. psychopy/demos/coder/iohub/wintab/.DS_Store +0 -0
  65. psychopy/demos/coder/stimuli/.DS_Store +0 -0
  66. psychopy/demos/coder/stimuli/radialGratingContracting.py +29 -0
  67. psychopy/experiment/_experiment.py.orig +1032 -0
  68. psychopy/experiment/components/.DS_Store +0 -0
  69. psychopy/experiment/components/_base.py +13 -4
  70. psychopy/experiment/components/_base.py.orig +823 -0
  71. psychopy/experiment/components/form/.DS_Store +0 -0
  72. psychopy/experiment/components/microphone/__init__.py +10 -1
  73. psychopy/experiment/components/microphone/__init__.py.orig +490 -0
  74. psychopy/experiment/components/polygon/__init__.py +21 -22
  75. psychopy/experiment/components/settings/__init__.py +13 -14
  76. psychopy/experiment/components/settings/__init__.py.orig +1337 -0
  77. psychopy/experiment/components/textbox/__init__.py.orig +310 -0
  78. psychopy/experiment/components/webcam/.DS_Store +0 -0
  79. psychopy/experiment/components/webcam/light/.DS_Store +0 -0
  80. psychopy/experiment/flow.py +10 -8
  81. psychopy/experiment/loops.py.orig +829 -0
  82. psychopy/experiment/params.py +8 -3
  83. psychopy/experiment/params.py.orig +408 -0
  84. psychopy/experiment/routine.py.orig +503 -0
  85. psychopy/experiment/routines/_base.py +15 -6
  86. psychopy/experiment/routines/counterbalance/__init__.py +1 -0
  87. psychopy/gui/qtgui.py +14 -7
  88. psychopy/gui/util.py +10 -14
  89. psychopy/gui/wxgui.py +10 -4
  90. psychopy/hardware/.DS_Store +0 -0
  91. psychopy/hardware/brainproducts.py.orig +680 -0
  92. psychopy/hardware/iolab.py.orig +238 -0
  93. psychopy/hardware/manager.py +1 -1
  94. psychopy/hardware/photodiode.py +59 -27
  95. psychopy/hardware/serialport.py +51 -0
  96. psychopy/hardware/speaker.py +4 -4
  97. psychopy/iohub/datastore/__init__.py.orig +443 -0
  98. psychopy/iohub/datastore/util.py.orig +692 -0
  99. psychopy/iohub/devices/mouse/darwin.py.orig +427 -0
  100. psychopy/iohub/devices/mouse/linux2.py.orig +198 -0
  101. psychopy/preferences/.DS_Store +0 -0
  102. psychopy/projects/pavlovia.py +10 -3
  103. psychopy/projects/pavlovia.py.orig +1295 -0
  104. psychopy/sound/backend_ptb.py +22 -5
  105. psychopy/sound/transcribe.py +24 -4
  106. psychopy/tests/.DS_Store +0 -0
  107. psychopy/tests/data/.DS_Store +0 -0
  108. psychopy/tests/data/TestCircle_fill_local.png +0 -0
  109. psychopy/tests/data/__test.png +0 -0
  110. psychopy/tests/data/aperture1_normHexbackground_local.png +0 -0
  111. psychopy/tests/data/aperture1_norm_local.png +0 -0
  112. psychopy/tests/data/aperture2_normHexbackground_local.png +0 -0
  113. psychopy/tests/data/beatandrcos_height_local.png +0 -0
  114. psychopy/tests/data/beatandrcos_normAddBlend_local.png +0 -0
  115. psychopy/tests/data/beatandrcos_normHexbackground_local.png +0 -0
  116. psychopy/tests/data/beatandrcos_norm_local.png +0 -0
  117. psychopy/tests/data/beatandrcos_stencil_local.png +0 -0
  118. psychopy/tests/data/blend_add_height_local.png +0 -0
  119. psychopy/tests/data/blend_add_normAddBlend_local.png +0 -0
  120. psychopy/tests/data/blend_add_normHexbackground_local.png +0 -0
  121. psychopy/tests/data/blend_add_normNoShade_local.png +0 -0
  122. psychopy/tests/data/blend_add_norm_local.png +0 -0
  123. psychopy/tests/data/blend_add_stencil_local.png +0 -0
  124. psychopy/tests/data/bufferimg_gabor_height_local.png +0 -0
  125. psychopy/tests/data/bufferimg_gabor_normAddBlend_local.png +0 -0
  126. psychopy/tests/data/bufferimg_gabor_normHexbackground_local.png +0 -0
  127. psychopy/tests/data/bufferimg_gabor_normNoShade_local.png +0 -0
  128. psychopy/tests/data/bufferimg_gabor_norm_local.png +0 -0
  129. psychopy/tests/data/bufferimg_gabor_stencil_local.png +0 -0
  130. psychopy/tests/data/circleHex_height_local.png +0 -0
  131. psychopy/tests/data/circleHex_normAddBlend_local.png +0 -0
  132. psychopy/tests/data/circleHex_normHexbackground_local.png +0 -0
  133. psychopy/tests/data/circleHex_normNoShade_local.png +0 -0
  134. psychopy/tests/data/circleHex_norm_local.png +0 -0
  135. psychopy/tests/data/circleHex_stencil_local.png +0 -0
  136. psychopy/tests/data/color_comparison_local.png +0 -0
  137. psychopy/tests/data/corrFullRandom_local.csv +16 -0
  138. psychopy/tests/data/corrFullRandom_local.tsv +6 -0
  139. psychopy/tests/data/correctScript/.DS_Store +0 -0
  140. psychopy/tests/data/dots_height_local.png +0 -0
  141. psychopy/tests/data/dots_normAddBlend_local.png +0 -0
  142. psychopy/tests/data/dots_normHexbackground_local.png +0 -0
  143. psychopy/tests/data/dots_normNoShade_local.png +0 -0
  144. psychopy/tests/data/dots_norm_local.png +0 -0
  145. psychopy/tests/data/dots_stencil_local.png +0 -0
  146. psychopy/tests/data/elarray1_height_local.png +0 -0
  147. psychopy/tests/data/elarray1_normAddBlend_local.png +0 -0
  148. psychopy/tests/data/elarray1_normHexbackground_local.png +0 -0
  149. psychopy/tests/data/elarray1_norm_local.png +0 -0
  150. psychopy/tests/data/elarray1_stencil_local.png +0 -0
  151. psychopy/tests/data/envelopeandrcos_height_local.png +0 -0
  152. psychopy/tests/data/envelopeandrcos_normAddBlend_local.png +0 -0
  153. psychopy/tests/data/envelopeandrcos_normHexbackground_local.png +0 -0
  154. psychopy/tests/data/envelopeandrcos_norm_local.png +0 -0
  155. psychopy/tests/data/envelopeandrcos_stencil_local.png +0 -0
  156. psychopy/tests/data/envelopepowerandrcos_height_local.png +0 -0
  157. psychopy/tests/data/envelopepowerandrcos_normAddBlend_local.png +0 -0
  158. psychopy/tests/data/envelopepowerandrcos_normHexbackground_local.png +0 -0
  159. psychopy/tests/data/envelopepowerandrcos_norm_local.png +0 -0
  160. psychopy/tests/data/envelopepowerandrcos_stencil_local.png +0 -0
  161. psychopy/tests/data/gabor1_height_local.png +0 -0
  162. psychopy/tests/data/gabor1_normAddBlend_local.png +0 -0
  163. psychopy/tests/data/gabor1_normHexbackground_local.png +0 -0
  164. psychopy/tests/data/gabor1_normNoShade_local.png +0 -0
  165. psychopy/tests/data/gabor1_norm_local.png +0 -0
  166. psychopy/tests/data/gabor1_stencil_local.png +0 -0
  167. psychopy/tests/data/greyscale_normHexbackground_local.png +0 -0
  168. psychopy/tests/data/imageAndGauss_height_local.png +0 -0
  169. psychopy/tests/data/imageAndGauss_normAddBlend_local.png +0 -0
  170. psychopy/tests/data/imageAndGauss_normHexbackground_local.png +0 -0
  171. psychopy/tests/data/imageAndGauss_normNoShade_local.png +0 -0
  172. psychopy/tests/data/imageAndGauss_norm_local.png +0 -0
  173. psychopy/tests/data/imageAndGauss_stencil_local.png +0 -0
  174. psychopy/tests/data/movFrame1_stencil_local.png +0 -0
  175. psychopy/tests/data/noiseAndRcos_height_local.png +0 -0
  176. psychopy/tests/data/noiseAndRcos_normAddBlend_local.png +0 -0
  177. psychopy/tests/data/noiseAndRcos_normHexbackground_local.png +0 -0
  178. psychopy/tests/data/noiseAndRcos_normNoShade_local.png +0 -0
  179. psychopy/tests/data/noiseAndRcos_norm_local.png +0 -0
  180. psychopy/tests/data/noiseAndRcos_stencil_local.png +0 -0
  181. psychopy/tests/data/noiseFiltersAndRcos_height_local.png +0 -0
  182. psychopy/tests/data/noiseFiltersAndRcos_normAddBlend_local.png +0 -0
  183. psychopy/tests/data/noiseFiltersAndRcos_normHexbackground_local.png +0 -0
  184. psychopy/tests/data/noiseFiltersAndRcos_normNoShade_local.png +0 -0
  185. psychopy/tests/data/noiseFiltersAndRcos_norm_local.png +0 -0
  186. psychopy/tests/data/noiseFiltersAndRcos_stencil_local.png +0 -0
  187. psychopy/tests/data/numpyImage_height_local.png +0 -0
  188. psychopy/tests/data/numpyImage_normAddBlend_local.png +0 -0
  189. psychopy/tests/data/numpyImage_normHexbackground_local.png +0 -0
  190. psychopy/tests/data/numpyImage_normNoShade_local.png +0 -0
  191. psychopy/tests/data/numpyImage_norm_local.png +0 -0
  192. psychopy/tests/data/numpyImage_stencil_local.png +0 -0
  193. psychopy/tests/data/shape2_1_normAddBlend_local.png +0 -0
  194. psychopy/tests/data/shape2_1_normHexbackground_local.png +0 -0
  195. psychopy/tests/data/shape2_1_normNoShade_local.png +0 -0
  196. psychopy/tests/data/shape2_1_norm_local.png +0 -0
  197. psychopy/tests/data/shape2_1_stencil_local.png +0 -0
  198. psychopy/tests/data/testLoopsBlocks.psyexp_local.py +328 -0
  199. psychopy/tests/data/text1_height_local.png +0 -0
  200. psychopy/tests/data/text1_normAddBlend_local.png +0 -0
  201. psychopy/tests/data/text1_normHexbackground_local.png +0 -0
  202. psychopy/tests/data/text1_norm_local.png +0 -0
  203. psychopy/tests/data/text1_stencil_local.png +0 -0
  204. psychopy/tests/data/text2_height.png +0 -0
  205. psychopy/tests/data/text2_normAddBlend.png +0 -0
  206. psychopy/tests/data/text2_normHexbackground.png +0 -0
  207. psychopy/tests/data/text2_stencil.png +0 -0
  208. psychopy/tests/data/wedge1_height_local.png +0 -0
  209. psychopy/tests/data/wedge1_normAddBlend_local.png +0 -0
  210. psychopy/tests/data/wedge1_normHexbackground_local.png +0 -0
  211. psychopy/tests/data/wedge1_normNoShade_local.png +0 -0
  212. psychopy/tests/data/wedge1_norm_local.png +0 -0
  213. psychopy/tests/data/wedge1_stencil_local.png +0 -0
  214. psychopy/tests/test_app/.DS_Store +0 -0
  215. psychopy/tests/test_app/test_builder/.DS_Store +0 -0
  216. psychopy/tests/test_app/test_builder/data/_2021_ 5_03_1206.csv +9 -0
  217. psychopy/tests/test_app/test_builder/data/_2021_ 5_03_1206.log +177 -0
  218. psychopy/tests/test_app/test_builder/data/_2021_ 5_03_1206.psydat +0 -0
  219. psychopy/tests/test_app/test_builder/data/_2021_ 5_03_1206.xlsx +0 -0
  220. psychopy/tests/test_app/test_builder/data/_2021_ 5_03_1324.csv +9 -0
  221. psychopy/tests/test_app/test_builder/data/_2021_ 5_03_1324.log +168 -0
  222. psychopy/tests/test_app/test_builder/data/_2021_ 5_03_1324.psydat +0 -0
  223. psychopy/tests/test_app/test_builder/data/_2021_ 5_03_1324.xlsx +0 -0
  224. psychopy/tests/test_data/.DS_Store +0 -0
  225. psychopy/tests/test_hardware/test_CRS_BitsSharp.py.orig +68 -0
  226. psychopy/tests/test_tools/test_arraytools.py +112 -0
  227. psychopy/tests/test_visual/test_image.py.orig +219 -0
  228. psychopy/tools/arraytools.py +47 -0
  229. psychopy/tools/versionchooser.py +1 -1
  230. psychopy/visual/backends/pygletbackend.py +26 -8
  231. psychopy/visual/basevisual.py.orig +1723 -0
  232. psychopy/visual/form.py.orig +1181 -0
  233. psychopy/visual/text.py.orig +752 -0
  234. psychopy/visual/textbox2/textbox2.py.orig +1315 -0
  235. psychopy/visual/window.py +13 -5
  236. psychopy/visual/windowwarp.py.orig +463 -0
  237. {psychopy-2024.2.1.dist-info → psychopy-2024.2.4.dist-info}/METADATA +9 -9
  238. {psychopy-2024.2.1.dist-info → psychopy-2024.2.4.dist-info}/RECORD +244 -78
  239. {psychopy-2024.2.1.dist-info → psychopy-2024.2.4.dist-info}/WHEEL +1 -1
  240. {psychopy-2024.2.1.dist-info → psychopy-2024.2.4.dist-info}/entry_points.txt +2 -0
  241. psychopy/app/locale/ar_001/LC_MESSAGE/messages.mo +0 -0
  242. psychopy/app/locale/cs_CZ/LC_MESSAGE/messages.mo +0 -0
  243. psychopy/app/locale/da_DK/LC_MESSAGE/messages.mo +0 -0
  244. psychopy/app/locale/de_DE/LC_MESSAGE/messages.mo +0 -0
  245. psychopy/app/locale/el_GR/LC_MESSAGE/messages.mo +0 -0
  246. psychopy/app/locale/en_NZ/LC_MESSAGE/messages.mo +0 -0
  247. psychopy/app/locale/en_US/LC_MESSAGE/messages.mo +0 -0
  248. psychopy/app/locale/es_CO/LC_MESSAGE/messages.mo +0 -0
  249. psychopy/app/locale/es_ES/LC_MESSAGE/messages.mo +0 -0
  250. psychopy/app/locale/es_US/LC_MESSAGE/messages.mo +0 -0
  251. psychopy/app/locale/et_EE/LC_MESSAGE/messages.mo +0 -0
  252. psychopy/app/locale/fa_IR/LC_MESSAGE/messages.mo +0 -0
  253. psychopy/app/locale/fi_FI/LC_MESSAGE/messages.mo +0 -0
  254. psychopy/app/locale/fr_FR/LC_MESSAGE/messages.mo +0 -0
  255. psychopy/app/locale/he_IL/LC_MESSAGE/messages.mo +0 -0
  256. psychopy/app/locale/hi_IN/LC_MESSAGE/messages.mo +0 -0
  257. psychopy/app/locale/hu_HU/LC_MESSAGE/messages.mo +0 -0
  258. psychopy/app/locale/it_IT/LC_MESSAGE/messages.mo +0 -0
  259. psychopy/app/locale/ja_JP/LC_MESSAGE/messages.mo +0 -0
  260. psychopy/app/locale/ko_KR/LC_MESSAGE/messages.mo +0 -0
  261. psychopy/app/locale/ms_MY/LC_MESSAGE/messages.mo +0 -0
  262. psychopy/app/locale/nl_NL/LC_MESSAGE/messages.mo +0 -0
  263. psychopy/app/locale/nn_NO/LC_MESSAGE/messages.mo +0 -0
  264. psychopy/app/locale/pl_PL/LC_MESSAGE/messages.mo +0 -0
  265. psychopy/app/locale/pt_PT/LC_MESSAGE/messages.mo +0 -0
  266. psychopy/app/locale/ro_RO/LC_MESSAGE/messages.mo +0 -0
  267. psychopy/app/locale/ru_RU/LC_MESSAGE/messages.mo +0 -0
  268. psychopy/app/locale/sv_SE/LC_MESSAGE/messages.mo +0 -0
  269. psychopy/app/locale/tr_TR/LC_MESSAGE/messages.mo +0 -0
  270. psychopy/app/locale/zh_CN/LC_MESSAGE/messages.mo +0 -0
  271. psychopy/app/locale/zh_TW/LC_MESSAGE/messages.mo +0 -0
  272. psychopy-2024.2.1.dist-info/licenses/AUTHORS.md +0 -138
  273. /psychopy/{app/locale/ar_001/LC_MESSAGE → demos/builder}/.DS_Store +0 -0
  274. /psychopy/{app/locale/es_ES/LC_MESSAGE → demos/builder/Experiments}/.DS_Store +0 -0
  275. /psychopy/{visual → demos/builder/Tools/gammaCalibration/data}/.DS_Store +0 -0
  276. {psychopy-2024.2.1.dist-info → psychopy-2024.2.4.dist-info}/licenses/LICENSE +0 -0
@@ -68,7 +68,6 @@ class EnvironmentManagerDlg(wx.Dialog):
68
68
 
69
69
  self.notebook.ChangeSelection(0)
70
70
 
71
-
72
71
  @staticmethod
73
72
  def getPackageVersionInfo(packageName):
74
73
  """Query packages for available versions.
@@ -278,10 +277,13 @@ class EnvironmentManagerDlg(wx.Dialog):
278
277
  )
279
278
  else:
280
279
  command.append('--user')
281
-
280
+
282
281
  # add other options to the command
283
282
  command += ['--prefer-binary', '--no-input', '--no-color']
284
-
283
+
284
+ # disable pip version check
285
+ command += ['--disable-pip-version-check']
286
+
285
287
  # write command to output panel
286
288
  self.output.writeCmd(" ".join(command))
287
289
  # append own name to extra
@@ -359,7 +361,7 @@ class EnvironmentManagerDlg(wx.Dialog):
359
361
  # write installation termination statement
360
362
  msg = "Installation complete"
361
363
  if 'pipname' in self.pipProcess.extra:
362
- msg = f"Finished installing %(pipname)s" % self.pipProcess.extra
364
+ msg = "Finished installing %(pipname)s" % self.pipProcess.extra
363
365
  self.output.writeTerminus(msg)
364
366
 
365
367
  # if we have a plugin, write additional plugin information post-install
@@ -411,12 +413,12 @@ class EnvironmentManagerDlg(wx.Dialog):
411
413
  # refresh view
412
414
  pkgtools.refreshPackages()
413
415
  self.pluginMgr.updateInfo()
414
-
416
+
415
417
  def onUninstallExit(self, pid, exitCode):
416
418
  # write installation termination statement
417
419
  msg = "Uninstall complete"
418
420
  if 'pipname' in self.pipProcess.extra:
419
- msg = f"Finished uninstalling %(pipname)s" % self.pipProcess.extra
421
+ msg = "Finished uninstalling %(pipname)s" % self.pipProcess.extra
420
422
  self.output.writeTerminus(msg)
421
423
  # clear pip process
422
424
  self.pipProcess = None
@@ -435,7 +437,7 @@ class EnvironmentManagerDlg(wx.Dialog):
435
437
  # if they change their mind, cancel closing
436
438
  if dlg.ShowModal() == wx.ID_NO:
437
439
  return
438
-
440
+
439
441
  if evt is not None:
440
442
  evt.Skip()
441
443
 
psychopy/app/ribbon.py CHANGED
@@ -467,7 +467,8 @@ class FrameRibbonButton(wx.Button, handlers.ThemeMixin):
467
467
  wx.Button.__init__(self, parent, style=wx.BORDER_NONE | style, size=(w, 44))
468
468
  self.SetMinSize((40, 44))
469
469
  # set label
470
- self.SetLabelText(label)
470
+ if label and style | wx.BU_NOTEXT != style:
471
+ self.SetLabelText(label)
471
472
  # set tooltip
472
473
  if tooltip and style | wx.BU_NOTEXT == style:
473
474
  # if there's no label, include it in the tooltip
@@ -684,11 +684,13 @@ class RunnerPanel(wx.Panel, ScriptProcess, handlers.ThemeMixin):
684
684
  # get relevant paths
685
685
  htmlPath = str(self.currentFile.parent / self.outputPath)
686
686
  jsFile = self.currentFile.parent / (self.currentFile.stem + ".js")
687
- # make sure JS file exists
688
- if not os.path.exists(jsFile):
689
- generateScript(outfile=str(jsFile),
690
- exp=self.loadExperiment(),
691
- target="PsychoJS")
687
+ # regenerate JS file
688
+ if self.currentFile.suffix == ".psyexp":
689
+ generateScript(
690
+ outfile=str(jsFile),
691
+ exp=self.loadExperiment(),
692
+ target="PsychoJS"
693
+ )
692
694
  # start server
693
695
  self.startServer(htmlPath, port=port)
694
696
  # open experiment
psychopy/clock.py CHANGED
@@ -332,14 +332,18 @@ class Clock(MonotonicClock):
332
332
  self._epochTimeAtLastReset -= t
333
333
 
334
334
  def add(self, t):
335
- """DEPRECATED: use .addTime() instead
335
+ """
336
+ DEPRECATED: use .addTime() instead
336
337
 
337
338
  This function adds time TO THE BASE (t0) which, counterintuitively,
338
339
  reduces the apparent time on the clock
339
340
  """
340
- logging.warning("DEPRECATED: Clock.add() is deprecated in favor of .addTime() due to "
341
- "the counterintuitive design (it added time to the baseline, which "
342
- "reduced the values returned from getTime()")
341
+ psychopy.logging.log(msg=(
342
+ "Clock.add() is deprecated in favor of .addTime() due to the counterintuitive design "
343
+ "(it added time to the baseline, which reduced the values returned from getTime() )"
344
+ ),
345
+ level=psychopy.logging.DEPRECATION
346
+ )
343
347
  self._timeAtLastReset += t
344
348
  self._epochTimeAtLastReset += t
345
349
 
psychopy/core.py.orig ADDED
@@ -0,0 +1,169 @@
1
+ #!/usr/bin/env python
2
+ # -*- coding: utf-8 -*-
3
+
4
+ """Basic functions, including timing, rush (imported), quit
5
+ """
6
+ # Part of the PsychoPy library
7
+ # Copyright (C) 2002-2018 Jonathan Peirce (C) 2019-2021 Open Science Tools Ltd.
8
+ # Distributed under the terms of the GNU General Public License (GPL).
9
+
10
+ import sys
11
+ import threading
12
+ import subprocess
13
+ import shlex
14
+ import locale
15
+
16
+ # some things are imported just to be accessible within core's namespace
17
+ from psychopy.clock import (MonotonicClock, Clock, CountdownTimer,
18
+ wait, monotonicClock, getAbsTime,
19
+ StaticPeriod) # pylint: disable=W0611
20
+
21
+ # always safe to call rush, even if its not going to do anything for a
22
+ # particular OS
23
+ from psychopy.platform_specific import rush # pylint: disable=W0611
24
+ from psychopy import logging
25
+ <<<<<<< HEAD
26
+ from psychopy.constants import STARTED, NOT_STARTED, FINISHED
27
+ =======
28
+ from psychopy.constants import STARTED, NOT_STARTED, FINISHED, PY3
29
+ from psychopy.iohub.client import ioHubConnection
30
+ >>>>>>> c06fff3cf5e2f418f6db297fd47819041a00c07d
31
+
32
+ try:
33
+ import pyglet
34
+ havePyglet = True
35
+ # may not want to check, to preserve terminal window focus
36
+ checkPygletDuringWait = True
37
+ except ImportError:
38
+ havePyglet = False
39
+ checkPygletDuringWait = False
40
+
41
+ try:
42
+ import glfw
43
+ haveGLFW = True
44
+ except ImportError:
45
+ haveGLFW = False
46
+
47
+ runningThreads = [] # just for backwards compatibility?
48
+ openWindows = [] # visual.Window updates this, event.py and clock.py use it
49
+
50
+ # Set getTime in core to == the monotonicClock instance created in the
51
+ # clockModule.
52
+ # The logging module sets the defaultClock to == clock.monotonicClock,
53
+ # so by default the core.getTime() and logging.defaultClock.getTime()
54
+ # functions return the 'same' timebase.
55
+ #
56
+ # This way 'all' OSs have a core.getTime() timebase that starts at 0.0 when
57
+ # the experiment is launched, instead of it being this way on Windows only
58
+ # (which was also a descripancy between OS's when win32 was using time.clock).
59
+
60
+
61
+ def getTime(applyZero = True):
62
+ """Get the current time since psychopy.core was loaded.
63
+
64
+
65
+
66
+ Version Notes: Note that prior to PsychoPy 1.77.00 the behaviour of
67
+ getTime() was platform dependent (on OSX and linux it was equivalent to
68
+ :func:`psychopy.core.getAbsTime`
69
+ whereas on windows it returned time since loading of the module, as now)
70
+ """
71
+ return monotonicClock.getTime(applyZero)
72
+
73
+
74
+ def quit():
75
+ """Close everything and exit nicely (ending the experiment)
76
+ """
77
+ # pygame.quit() # safe even if pygame was never initialised
78
+ logging.flush()
79
+
80
+ # properly shutdown ioHub server
81
+ if ioHubConnection.ACTIVE_CONNECTION:
82
+ ioHubConnection.ACTIVE_CONNECTION.quit()
83
+
84
+ for thisThread in threading.enumerate():
85
+ if hasattr(thisThread, 'stop') and hasattr(thisThread, 'running'):
86
+ # this is one of our event threads - kill it and wait for success
87
+ thisThread.stop()
88
+ while thisThread.running == 0:
89
+ pass # wait until it has properly finished polling
90
+
91
+ sys.exit(0) # quits the python session entirely
92
+
93
+
94
+ def shellCall(shellCmd, stdin='', stderr=False, env=None, encoding=None):
95
+ """Call a single system command with arguments, return its stdout.
96
+ Returns stdout, stderr if stderr is True.
97
+ Handles simple pipes, passing stdin to shellCmd (pipes are untested
98
+ on windows) can accept string or list as the first argument
99
+
100
+ Parameters
101
+ ----------
102
+ shellCmd : str, or iterable
103
+ The command to execute, and its respective arguments.
104
+
105
+ stdin : str, or None
106
+ Input to pass to the command.
107
+
108
+ stderr : bool
109
+ Whether to return the standard error output once execution is finished.
110
+
111
+ env : dict
112
+ The environment variables to set during execution.
113
+
114
+ encoding : str
115
+ The encoding to use for communication with the executed command.
116
+ This argument will be ignored on Python 2.7.
117
+
118
+ Notes
119
+ -----
120
+ We use ``subprocess.Popen`` to execute the command and establish
121
+ `stdin` and `stdout` pipes.
122
+ Python 2.7 always opens the pipes in text mode; however,
123
+ Python 3 defaults to binary mode, unless an encoding is specified.
124
+ To unify pipe communication across Python 2 and 3, we now provide an
125
+ `encoding` parameter, enforcing `utf-8` text mode by default.
126
+ This parameter is present from Python 3.6 onwards; using an older
127
+ Python 3 version will raise an exception. The parameter will be ignored
128
+ when running Python 2.7.
129
+
130
+ """
131
+ if encoding is None:
132
+ encoding = locale.getpreferredencoding()
133
+
134
+ if type(shellCmd) == str:
135
+ # safely split into cmd+list-of-args, no pipes here
136
+ shellCmdList = shlex.split(shellCmd)
137
+ elif type(shellCmd) == bytes:
138
+ # safely split into cmd+list-of-args, no pipes here
139
+ shellCmdList = shlex.split(shellCmd.decode('utf-8'))
140
+ elif type(shellCmd) in (list, tuple): # handles whitespace in filenames
141
+ shellCmdList = shellCmd
142
+ else:
143
+ msg = 'shellCmd requires a string or iterable.'
144
+ raise TypeError(msg)
145
+
146
+ cmdObjects = []
147
+ for obj in shellCmdList:
148
+ if type(obj) != bytes:
149
+ cmdObjects.append(obj)
150
+ else:
151
+ cmdObjects.append(obj.decode('utf-8'))
152
+
153
+ # the `encoding` parameter results in unicode coming back
154
+ if sys.version_info.minor >= 6:
155
+ proc = subprocess.Popen(cmdObjects, stdin=subprocess.PIPE,
156
+ stdout=subprocess.PIPE,
157
+ stderr=subprocess.PIPE,
158
+ encoding=encoding, env=env)
159
+ else:
160
+ msg = 'shellCall() requires Python 2.7, or 3.6 and newer.'
161
+ raise RuntimeError(msg)
162
+
163
+ stdoutData, stderrData = proc.communicate(stdin)
164
+
165
+ del proc
166
+ if stderr:
167
+ return stdoutData.strip(), stderrData.strip()
168
+ else:
169
+ return stdoutData.strip()
@@ -0,0 +1,23 @@
1
+ <!doctype html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="user-scalable=no">
6
+ <title>randomisedBlocks [PsychoPy]</title>
7
+ <!-- styles -->
8
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/jquery-ui-dist@1.12.1/jquery-ui.min.css">
9
+ <link rel="stylesheet" href="./lib/psychojs-2022.2.0.css">
10
+ </head>
11
+ <body>
12
+ <div id="root"></div>
13
+ <!-- external libraries -->
14
+ <script src="https://cdn.jsdelivr.net/npm/jquery@3.6.0/dist/jquery.min.js"></script>
15
+ <script src="https://cdn.jsdelivr.net/npm/jquery-ui-dist@1.12.1/jquery-ui.min.js"></script>
16
+ <script src="https://cdn.jsdelivr.net/npm/preloadjs@1.0.1/lib/preloadjs.min.js"></script>
17
+ <!-- experiment -->
18
+ <script src="./randomisedBlocks.js" type="module"></script>
19
+ <!-- legacy browsers -->
20
+ <script src="./lib/psychojs-2022.2.0.iife.js" nomodule></script>
21
+ <script src="./randomisedBlocks-legacy-browsers.js" nomodule></script>
22
+ </body>
23
+ </html>