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.
- psychopy/.DS_Store +0 -0
- psychopy/GIT_SHA +1 -1
- psychopy/VERSION +1 -1
- psychopy/__init__.py +10 -1
- psychopy/__init__.py.orig +65 -0
- psychopy/app/{locale/ar_001/.DS_Store → .DS_Store} +0 -0
- psychopy/app/Resources/.DS_Store +0 -0
- psychopy/app/_psychopyApp.py +11 -3
- psychopy/app/appData.spec +1 -1
- psychopy/app/builder/builder.py +1 -1
- psychopy/app/builder/builder.py.orig +3932 -0
- psychopy/app/builder/dialogs/__init__.py.orig +1679 -0
- psychopy/app/builder/dialogs/paramCtrls.py +1 -1
- psychopy/app/builder/dialogs/paramCtrls.py.orig +713 -0
- psychopy/app/colorpicker/__init__.py.orig +411 -0
- psychopy/app/cortex.log +0 -0
- psychopy/app/jobs.py +8 -1
- psychopy/app/locale/ar_001/LC_MESSAGE/messages.po +2452 -1731
- psychopy/app/locale/zh_CN/LC_MESSAGE/zh_CN.mo +0 -0
- psychopy/app/locale/zh_CN/LC_MESSAGE/zh_CN.po +6127 -0
- psychopy/app/locale/zh_CN/LC_MESSAGE/zh_CN_allFlagged.mo +0 -0
- psychopy/app/locale/zh_CN/LC_MESSAGE/zh_CN_allFlagged.po +7366 -0
- psychopy/app/plugin_manager/dialog.py +9 -7
- psychopy/app/ribbon.py +2 -1
- psychopy/app/runner/runner.py +7 -5
- psychopy/clock.py +8 -4
- psychopy/core.py.orig +169 -0
- psychopy/demos/builder/Design Templates/randomisedBlocks/html/index.html +23 -0
- psychopy/demos/builder/Design Templates/randomisedBlocks/html/randomisedBlocks-legacy-browsers.js +423 -0
- psychopy/demos/builder/Design Templates/randomisedBlocks/html/randomisedBlocks.js +427 -0
- psychopy/demos/builder/Design Templates/randomisedBlocks/html/resources/chooseBlock.xlsx +0 -0
- psychopy/demos/builder/Design Templates/randomisedBlocks/html/resources/facesBlock.xlsx +0 -0
- psychopy/demos/builder/Design Templates/randomisedBlocks/html/resources/housesBlock.xlsx +0 -0
- psychopy/demos/builder/Design Templates/randomisedBlocks/html/resources/stims/face01.jpg +0 -0
- psychopy/demos/builder/Design Templates/randomisedBlocks/html/resources/stims/face02.jpg +0 -0
- psychopy/demos/builder/Design Templates/randomisedBlocks/html/resources/stims/face03.jpg +0 -0
- psychopy/demos/builder/Design Templates/randomisedBlocks/html/resources/stims/house01.jpg +0 -0
- psychopy/demos/builder/Design Templates/randomisedBlocks/html/resources/stims/house02.jpg +0 -0
- psychopy/demos/builder/Design Templates/randomisedBlocks/html/resources/stims/house03.jpg +0 -0
- psychopy/demos/builder/Design Templates/randomisedBlocks/randomisedBlocks.py +330 -0
- psychopy/demos/builder/Design Templates/randomisedBlocks/randomisedBlocks_lastrun.py +330 -0
- psychopy/demos/builder/Feature Demos/eyetracking/eyetracking.xml +298 -0
- psychopy/demos/builder/Feature Demos/eyetracking/eyetracking.xsd +120 -0
- psychopy/demos/builder/Tools/.DS_Store +0 -0
- psychopy/demos/builder/Tools/gammaCalibration/.DS_Store +0 -0
- psychopy/demos/builder/Tools/gammaCalibration/data/_gamma_correction_visual_2022-05-18_14h18.29.439.csv +38 -0
- psychopy/demos/builder/Tools/gammaCalibration/data/_gamma_correction_visual_2022-05-18_14h18.29.439.log +3418 -0
- psychopy/demos/builder/Tools/gammaCalibration/data/_gamma_correction_visual_2022-05-18_14h18.29.439.psydat +0 -0
- psychopy/demos/builder/Tools/gammaCalibration/data/x1_gamma_correction_visual_2022-05-17_13h59.42.928.csv +2 -0
- psychopy/demos/builder/Tools/gammaCalibration/data/x1_gamma_correction_visual_2022-05-17_13h59.42.928.log +15 -0
- psychopy/demos/builder/Tools/gammaCalibration/data/x1_gamma_correction_visual_2022-05-17_13h59.42.928.psydat +0 -0
- psychopy/demos/builder/Tools/gammaCalibration/gamma_correction_visual.psyexp +323 -0
- psychopy/demos/builder/Tools/gammaCalibration/gamma_correction_visual.py +562 -0
- psychopy/demos/builder/Tools/gammaCalibration/gamma_correction_visual_lastrun.py +562 -0
- psychopy/demos/builder/Tools/gammaCalibration/questStairs.xlsx +0 -0
- psychopy/demos/builder/Tools/gammaCalibration/readme.md +0 -0
- psychopy/demos/builder/Tools/gammaCalibration/resources/low_contrast.png +0 -0
- psychopy/demos/builder/Tools/gammaCalibration/resources/make_2nd_order_tex.py +59 -0
- psychopy/demos/builder/Tools/gammaCalibration/resources/second_order_tex.png +0 -0
- psychopy/demos/coder/.DS_Store +0 -0
- psychopy/demos/coder/experiment control/info_gamma.pickle +0 -0
- psychopy/demos/coder/iohub/.iohpid +1 -0
- psychopy/demos/coder/iohub/eyetracking/.iohpid +1 -0
- psychopy/demos/coder/iohub/wintab/.DS_Store +0 -0
- psychopy/demos/coder/stimuli/.DS_Store +0 -0
- psychopy/demos/coder/stimuli/radialGratingContracting.py +29 -0
- psychopy/experiment/_experiment.py.orig +1032 -0
- psychopy/experiment/components/.DS_Store +0 -0
- psychopy/experiment/components/_base.py +13 -4
- psychopy/experiment/components/_base.py.orig +823 -0
- psychopy/experiment/components/form/.DS_Store +0 -0
- psychopy/experiment/components/microphone/__init__.py +10 -1
- psychopy/experiment/components/microphone/__init__.py.orig +490 -0
- psychopy/experiment/components/polygon/__init__.py +21 -22
- psychopy/experiment/components/settings/__init__.py +13 -14
- psychopy/experiment/components/settings/__init__.py.orig +1337 -0
- psychopy/experiment/components/textbox/__init__.py.orig +310 -0
- psychopy/experiment/components/webcam/.DS_Store +0 -0
- psychopy/experiment/components/webcam/light/.DS_Store +0 -0
- psychopy/experiment/flow.py +10 -8
- psychopy/experiment/loops.py.orig +829 -0
- psychopy/experiment/params.py +8 -3
- psychopy/experiment/params.py.orig +408 -0
- psychopy/experiment/routine.py.orig +503 -0
- psychopy/experiment/routines/_base.py +15 -6
- psychopy/experiment/routines/counterbalance/__init__.py +1 -0
- psychopy/gui/qtgui.py +14 -7
- psychopy/gui/util.py +10 -14
- psychopy/gui/wxgui.py +10 -4
- psychopy/hardware/.DS_Store +0 -0
- psychopy/hardware/brainproducts.py.orig +680 -0
- psychopy/hardware/iolab.py.orig +238 -0
- psychopy/hardware/manager.py +1 -1
- psychopy/hardware/photodiode.py +59 -27
- psychopy/hardware/serialport.py +51 -0
- psychopy/hardware/speaker.py +4 -4
- psychopy/iohub/datastore/__init__.py.orig +443 -0
- psychopy/iohub/datastore/util.py.orig +692 -0
- psychopy/iohub/devices/mouse/darwin.py.orig +427 -0
- psychopy/iohub/devices/mouse/linux2.py.orig +198 -0
- psychopy/preferences/.DS_Store +0 -0
- psychopy/projects/pavlovia.py +10 -3
- psychopy/projects/pavlovia.py.orig +1295 -0
- psychopy/sound/backend_ptb.py +22 -5
- psychopy/sound/transcribe.py +24 -4
- psychopy/tests/.DS_Store +0 -0
- psychopy/tests/data/.DS_Store +0 -0
- psychopy/tests/data/TestCircle_fill_local.png +0 -0
- psychopy/tests/data/__test.png +0 -0
- psychopy/tests/data/aperture1_normHexbackground_local.png +0 -0
- psychopy/tests/data/aperture1_norm_local.png +0 -0
- psychopy/tests/data/aperture2_normHexbackground_local.png +0 -0
- psychopy/tests/data/beatandrcos_height_local.png +0 -0
- psychopy/tests/data/beatandrcos_normAddBlend_local.png +0 -0
- psychopy/tests/data/beatandrcos_normHexbackground_local.png +0 -0
- psychopy/tests/data/beatandrcos_norm_local.png +0 -0
- psychopy/tests/data/beatandrcos_stencil_local.png +0 -0
- psychopy/tests/data/blend_add_height_local.png +0 -0
- psychopy/tests/data/blend_add_normAddBlend_local.png +0 -0
- psychopy/tests/data/blend_add_normHexbackground_local.png +0 -0
- psychopy/tests/data/blend_add_normNoShade_local.png +0 -0
- psychopy/tests/data/blend_add_norm_local.png +0 -0
- psychopy/tests/data/blend_add_stencil_local.png +0 -0
- psychopy/tests/data/bufferimg_gabor_height_local.png +0 -0
- psychopy/tests/data/bufferimg_gabor_normAddBlend_local.png +0 -0
- psychopy/tests/data/bufferimg_gabor_normHexbackground_local.png +0 -0
- psychopy/tests/data/bufferimg_gabor_normNoShade_local.png +0 -0
- psychopy/tests/data/bufferimg_gabor_norm_local.png +0 -0
- psychopy/tests/data/bufferimg_gabor_stencil_local.png +0 -0
- psychopy/tests/data/circleHex_height_local.png +0 -0
- psychopy/tests/data/circleHex_normAddBlend_local.png +0 -0
- psychopy/tests/data/circleHex_normHexbackground_local.png +0 -0
- psychopy/tests/data/circleHex_normNoShade_local.png +0 -0
- psychopy/tests/data/circleHex_norm_local.png +0 -0
- psychopy/tests/data/circleHex_stencil_local.png +0 -0
- psychopy/tests/data/color_comparison_local.png +0 -0
- psychopy/tests/data/corrFullRandom_local.csv +16 -0
- psychopy/tests/data/corrFullRandom_local.tsv +6 -0
- psychopy/tests/data/correctScript/.DS_Store +0 -0
- psychopy/tests/data/dots_height_local.png +0 -0
- psychopy/tests/data/dots_normAddBlend_local.png +0 -0
- psychopy/tests/data/dots_normHexbackground_local.png +0 -0
- psychopy/tests/data/dots_normNoShade_local.png +0 -0
- psychopy/tests/data/dots_norm_local.png +0 -0
- psychopy/tests/data/dots_stencil_local.png +0 -0
- psychopy/tests/data/elarray1_height_local.png +0 -0
- psychopy/tests/data/elarray1_normAddBlend_local.png +0 -0
- psychopy/tests/data/elarray1_normHexbackground_local.png +0 -0
- psychopy/tests/data/elarray1_norm_local.png +0 -0
- psychopy/tests/data/elarray1_stencil_local.png +0 -0
- psychopy/tests/data/envelopeandrcos_height_local.png +0 -0
- psychopy/tests/data/envelopeandrcos_normAddBlend_local.png +0 -0
- psychopy/tests/data/envelopeandrcos_normHexbackground_local.png +0 -0
- psychopy/tests/data/envelopeandrcos_norm_local.png +0 -0
- psychopy/tests/data/envelopeandrcos_stencil_local.png +0 -0
- psychopy/tests/data/envelopepowerandrcos_height_local.png +0 -0
- psychopy/tests/data/envelopepowerandrcos_normAddBlend_local.png +0 -0
- psychopy/tests/data/envelopepowerandrcos_normHexbackground_local.png +0 -0
- psychopy/tests/data/envelopepowerandrcos_norm_local.png +0 -0
- psychopy/tests/data/envelopepowerandrcos_stencil_local.png +0 -0
- psychopy/tests/data/gabor1_height_local.png +0 -0
- psychopy/tests/data/gabor1_normAddBlend_local.png +0 -0
- psychopy/tests/data/gabor1_normHexbackground_local.png +0 -0
- psychopy/tests/data/gabor1_normNoShade_local.png +0 -0
- psychopy/tests/data/gabor1_norm_local.png +0 -0
- psychopy/tests/data/gabor1_stencil_local.png +0 -0
- psychopy/tests/data/greyscale_normHexbackground_local.png +0 -0
- psychopy/tests/data/imageAndGauss_height_local.png +0 -0
- psychopy/tests/data/imageAndGauss_normAddBlend_local.png +0 -0
- psychopy/tests/data/imageAndGauss_normHexbackground_local.png +0 -0
- psychopy/tests/data/imageAndGauss_normNoShade_local.png +0 -0
- psychopy/tests/data/imageAndGauss_norm_local.png +0 -0
- psychopy/tests/data/imageAndGauss_stencil_local.png +0 -0
- psychopy/tests/data/movFrame1_stencil_local.png +0 -0
- psychopy/tests/data/noiseAndRcos_height_local.png +0 -0
- psychopy/tests/data/noiseAndRcos_normAddBlend_local.png +0 -0
- psychopy/tests/data/noiseAndRcos_normHexbackground_local.png +0 -0
- psychopy/tests/data/noiseAndRcos_normNoShade_local.png +0 -0
- psychopy/tests/data/noiseAndRcos_norm_local.png +0 -0
- psychopy/tests/data/noiseAndRcos_stencil_local.png +0 -0
- psychopy/tests/data/noiseFiltersAndRcos_height_local.png +0 -0
- psychopy/tests/data/noiseFiltersAndRcos_normAddBlend_local.png +0 -0
- psychopy/tests/data/noiseFiltersAndRcos_normHexbackground_local.png +0 -0
- psychopy/tests/data/noiseFiltersAndRcos_normNoShade_local.png +0 -0
- psychopy/tests/data/noiseFiltersAndRcos_norm_local.png +0 -0
- psychopy/tests/data/noiseFiltersAndRcos_stencil_local.png +0 -0
- psychopy/tests/data/numpyImage_height_local.png +0 -0
- psychopy/tests/data/numpyImage_normAddBlend_local.png +0 -0
- psychopy/tests/data/numpyImage_normHexbackground_local.png +0 -0
- psychopy/tests/data/numpyImage_normNoShade_local.png +0 -0
- psychopy/tests/data/numpyImage_norm_local.png +0 -0
- psychopy/tests/data/numpyImage_stencil_local.png +0 -0
- psychopy/tests/data/shape2_1_normAddBlend_local.png +0 -0
- psychopy/tests/data/shape2_1_normHexbackground_local.png +0 -0
- psychopy/tests/data/shape2_1_normNoShade_local.png +0 -0
- psychopy/tests/data/shape2_1_norm_local.png +0 -0
- psychopy/tests/data/shape2_1_stencil_local.png +0 -0
- psychopy/tests/data/testLoopsBlocks.psyexp_local.py +328 -0
- psychopy/tests/data/text1_height_local.png +0 -0
- psychopy/tests/data/text1_normAddBlend_local.png +0 -0
- psychopy/tests/data/text1_normHexbackground_local.png +0 -0
- psychopy/tests/data/text1_norm_local.png +0 -0
- psychopy/tests/data/text1_stencil_local.png +0 -0
- psychopy/tests/data/text2_height.png +0 -0
- psychopy/tests/data/text2_normAddBlend.png +0 -0
- psychopy/tests/data/text2_normHexbackground.png +0 -0
- psychopy/tests/data/text2_stencil.png +0 -0
- psychopy/tests/data/wedge1_height_local.png +0 -0
- psychopy/tests/data/wedge1_normAddBlend_local.png +0 -0
- psychopy/tests/data/wedge1_normHexbackground_local.png +0 -0
- psychopy/tests/data/wedge1_normNoShade_local.png +0 -0
- psychopy/tests/data/wedge1_norm_local.png +0 -0
- psychopy/tests/data/wedge1_stencil_local.png +0 -0
- psychopy/tests/test_app/.DS_Store +0 -0
- psychopy/tests/test_app/test_builder/.DS_Store +0 -0
- psychopy/tests/test_app/test_builder/data/_2021_ 5_03_1206.csv +9 -0
- psychopy/tests/test_app/test_builder/data/_2021_ 5_03_1206.log +177 -0
- psychopy/tests/test_app/test_builder/data/_2021_ 5_03_1206.psydat +0 -0
- psychopy/tests/test_app/test_builder/data/_2021_ 5_03_1206.xlsx +0 -0
- psychopy/tests/test_app/test_builder/data/_2021_ 5_03_1324.csv +9 -0
- psychopy/tests/test_app/test_builder/data/_2021_ 5_03_1324.log +168 -0
- psychopy/tests/test_app/test_builder/data/_2021_ 5_03_1324.psydat +0 -0
- psychopy/tests/test_app/test_builder/data/_2021_ 5_03_1324.xlsx +0 -0
- psychopy/tests/test_data/.DS_Store +0 -0
- psychopy/tests/test_hardware/test_CRS_BitsSharp.py.orig +68 -0
- psychopy/tests/test_tools/test_arraytools.py +112 -0
- psychopy/tests/test_visual/test_image.py.orig +219 -0
- psychopy/tools/arraytools.py +47 -0
- psychopy/tools/versionchooser.py +1 -1
- psychopy/visual/backends/pygletbackend.py +26 -8
- psychopy/visual/basevisual.py.orig +1723 -0
- psychopy/visual/form.py.orig +1181 -0
- psychopy/visual/text.py.orig +752 -0
- psychopy/visual/textbox2/textbox2.py.orig +1315 -0
- psychopy/visual/window.py +13 -5
- psychopy/visual/windowwarp.py.orig +463 -0
- {psychopy-2024.2.1.dist-info → psychopy-2024.2.4.dist-info}/METADATA +9 -9
- {psychopy-2024.2.1.dist-info → psychopy-2024.2.4.dist-info}/RECORD +244 -78
- {psychopy-2024.2.1.dist-info → psychopy-2024.2.4.dist-info}/WHEEL +1 -1
- {psychopy-2024.2.1.dist-info → psychopy-2024.2.4.dist-info}/entry_points.txt +2 -0
- psychopy/app/locale/ar_001/LC_MESSAGE/messages.mo +0 -0
- psychopy/app/locale/cs_CZ/LC_MESSAGE/messages.mo +0 -0
- psychopy/app/locale/da_DK/LC_MESSAGE/messages.mo +0 -0
- psychopy/app/locale/de_DE/LC_MESSAGE/messages.mo +0 -0
- psychopy/app/locale/el_GR/LC_MESSAGE/messages.mo +0 -0
- psychopy/app/locale/en_NZ/LC_MESSAGE/messages.mo +0 -0
- psychopy/app/locale/en_US/LC_MESSAGE/messages.mo +0 -0
- psychopy/app/locale/es_CO/LC_MESSAGE/messages.mo +0 -0
- psychopy/app/locale/es_ES/LC_MESSAGE/messages.mo +0 -0
- psychopy/app/locale/es_US/LC_MESSAGE/messages.mo +0 -0
- psychopy/app/locale/et_EE/LC_MESSAGE/messages.mo +0 -0
- psychopy/app/locale/fa_IR/LC_MESSAGE/messages.mo +0 -0
- psychopy/app/locale/fi_FI/LC_MESSAGE/messages.mo +0 -0
- psychopy/app/locale/fr_FR/LC_MESSAGE/messages.mo +0 -0
- psychopy/app/locale/he_IL/LC_MESSAGE/messages.mo +0 -0
- psychopy/app/locale/hi_IN/LC_MESSAGE/messages.mo +0 -0
- psychopy/app/locale/hu_HU/LC_MESSAGE/messages.mo +0 -0
- psychopy/app/locale/it_IT/LC_MESSAGE/messages.mo +0 -0
- psychopy/app/locale/ja_JP/LC_MESSAGE/messages.mo +0 -0
- psychopy/app/locale/ko_KR/LC_MESSAGE/messages.mo +0 -0
- psychopy/app/locale/ms_MY/LC_MESSAGE/messages.mo +0 -0
- psychopy/app/locale/nl_NL/LC_MESSAGE/messages.mo +0 -0
- psychopy/app/locale/nn_NO/LC_MESSAGE/messages.mo +0 -0
- psychopy/app/locale/pl_PL/LC_MESSAGE/messages.mo +0 -0
- psychopy/app/locale/pt_PT/LC_MESSAGE/messages.mo +0 -0
- psychopy/app/locale/ro_RO/LC_MESSAGE/messages.mo +0 -0
- psychopy/app/locale/ru_RU/LC_MESSAGE/messages.mo +0 -0
- psychopy/app/locale/sv_SE/LC_MESSAGE/messages.mo +0 -0
- psychopy/app/locale/tr_TR/LC_MESSAGE/messages.mo +0 -0
- psychopy/app/locale/zh_CN/LC_MESSAGE/messages.mo +0 -0
- psychopy/app/locale/zh_TW/LC_MESSAGE/messages.mo +0 -0
- psychopy-2024.2.1.dist-info/licenses/AUTHORS.md +0 -138
- /psychopy/{app/locale/ar_001/LC_MESSAGE → demos/builder}/.DS_Store +0 -0
- /psychopy/{app/locale/es_ES/LC_MESSAGE → demos/builder/Experiments}/.DS_Store +0 -0
- /psychopy/{visual → demos/builder/Tools/gammaCalibration/data}/.DS_Store +0 -0
- {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 =
|
|
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 =
|
|
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
|
-
|
|
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
|
psychopy/app/runner/runner.py
CHANGED
|
@@ -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
|
-
#
|
|
688
|
-
if
|
|
689
|
-
generateScript(
|
|
690
|
-
|
|
691
|
-
|
|
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
|
-
"""
|
|
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.
|
|
341
|
-
|
|
342
|
-
|
|
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>
|