psychopy 2024.1.3__py3-none-any.whl → 2024.2.0__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/CHANGELOG.txt +206 -0
- psychopy/GIT_SHA +1 -0
- psychopy/VERSION +1 -0
- psychopy/__init__.py +77 -15
- psychopy/app/Resources/classic/plugin16.png +0 -0
- psychopy/app/Resources/classic/plugin16@2x.png +0 -0
- psychopy/app/Resources/dark/plugin16.png +0 -0
- psychopy/app/Resources/dark/plugin16@2x.png +0 -0
- psychopy/app/Resources/light/plugin16.png +0 -0
- psychopy/app/Resources/light/plugin16@2x.png +0 -0
- psychopy/app/__init__.py +76 -2
- psychopy/app/_psychopyApp.py +126 -101
- psychopy/app/builder/builder.py +14 -10
- psychopy/app/builder/dialogs/__init__.py +8 -8
- psychopy/app/builder/dialogs/dlgsConditions.py +12 -13
- psychopy/app/builder/dialogs/paramCtrls.py +24 -57
- psychopy/app/builder/localizedStrings.py +11 -9
- psychopy/app/builder/validators.py +2 -2
- psychopy/app/coder/codeEditorBase.py +8 -8
- psychopy/app/coder/coder.py +4 -4
- psychopy/app/connections/sendusage.py +2 -2
- psychopy/app/connections/updates.py +9 -9
- psychopy/app/dialogs.py +34 -2
- psychopy/app/idle.py +31 -0
- psychopy/app/jobs.py +21 -3
- psychopy/app/linuxconfig/__init__.py +9 -0
- psychopy/app/locale/ar_001/LC_MESSAGE/messages.mo +0 -0
- psychopy/app/locale/ar_001/LC_MESSAGE/messages.po +4602 -2540
- psychopy/app/locale/es_CO/LC_MESSAGE/messages.mo +0 -0
- psychopy/app/locale/es_CO/LC_MESSAGE/messages.po +56 -54
- psychopy/app/locale/es_ES/LC_MESSAGE/messages.po +53 -43
- psychopy/app/locale/es_US/LC_MESSAGE/messages.mo +0 -0
- psychopy/app/locale/es_US/LC_MESSAGE/messages.po +56 -54
- psychopy/app/locale/ja_JP/LC_MESSAGE/messages.mo +0 -0
- psychopy/app/locale/ja_JP/LC_MESSAGE/messages.po +1258 -1176
- psychopy/app/locale/pt_PT/LC_MESSAGE/messages.po +9415 -5
- psychopy/app/pavlovia_ui/_base.py +33 -3
- psychopy/app/pavlovia_ui/search.py +0 -1
- psychopy/app/plugin_manager/dialog.py +104 -51
- psychopy/app/plugin_manager/packages.py +5 -0
- psychopy/app/plugin_manager/plugins.py +152 -67
- psychopy/app/preferencesDlg.py +8 -8
- psychopy/app/psychopyApp.py +11 -5
- psychopy/app/ribbon.py +124 -14
- psychopy/app/runner/runner.py +6 -1
- psychopy/app/stdout/stdOutRich.py +27 -11
- psychopy/app/themes/icons.py +52 -2
- psychopy/assets/__init__.py +0 -0
- psychopy/assets/click.png +0 -0
- psychopy/assets/clicknext.png +0 -0
- psychopy/assets/next.png +0 -0
- psychopy/assets/psychopy.ico +0 -0
- psychopy/assets/psychopy.png +0 -0
- psychopy/assets/templates/__init__.py +0 -0
- psychopy/assets/touch.png +0 -0
- psychopy/assets/touchnext.png +0 -0
- psychopy/assets/window.ico +0 -0
- psychopy/changes/2023.1.0.md +9 -0
- psychopy/changes/2024.1.0.md +16 -0
- psychopy/changes/__init__.py +0 -0
- psychopy/clock.py +2 -2
- psychopy/colors.py +2 -1
- psychopy/compatibility.py +53 -1
- psychopy/contrib/.DS_Store +0 -0
- psychopy/contrib/configobj/__init__.py +10 -8
- psychopy/data/__init__.py +3 -2
- psychopy/data/base.py +5 -5
- psychopy/data/experiment.py +130 -4
- psychopy/data/routine.py +56 -0
- psychopy/data/staircase.py +2 -2
- psychopy/data/trial.py +559 -97
- psychopy/data/utils.py +56 -21
- psychopy/demos/.DS_Store +0 -0
- psychopy/demos/builder/.DS_Store +0 -0
- psychopy/demos/builder/Design Templates/.DS_Store +0 -0
- psychopy/demos/builder/Experiments/.DS_Store +0 -0
- psychopy/demos/builder/Feature Demos/.DS_Store +0 -0
- psychopy/demos/builder/Feature Demos/buttonBox/buttonBoxDemo.psyexp +375 -0
- psychopy/demos/builder/Feature Demos/buttonBox/readme.md +5 -0
- psychopy/demos/builder/Feature Demos/pilotMode/pilotMode.psyexp +433 -0
- psychopy/demos/builder/Feature Demos/pilotMode/readme.md +7 -0
- psychopy/demos/builder/Feature Demos/progress/progressBar.psyexp +4 -4
- psychopy/demos/builder/Hardware/.DS_Store +0 -0
- psychopy/demos/builder/Helper Tools/.DS_Store +0 -0
- psychopy/demos/coder/.DS_Store +0 -0
- psychopy/demos/coder/hardware/testSoundLatency.py +2 -2
- psychopy/demos/coder/iohub/.DS_Store +0 -0
- psychopy/demos/coder/misc/hdf5_2_csv +33 -0
- psychopy/event.py +30 -29
- psychopy/experiment/.DS_Store +0 -0
- psychopy/experiment/_experiment.py +6 -6
- psychopy/experiment/components/.DS_Store +0 -0
- psychopy/experiment/components/__init__.py +6 -3
- psychopy/experiment/components/_base.py +286 -131
- psychopy/experiment/components/aperture/.DS_Store +0 -0
- psychopy/experiment/components/brush/.DS_Store +0 -0
- psychopy/experiment/components/button/.DS_Store +0 -0
- psychopy/experiment/components/button/__init__.py +5 -1
- psychopy/experiment/components/buttonBox/.DS_Store +0 -0
- psychopy/experiment/components/buttonBox/__init__.py +21 -12
- psychopy/experiment/components/camera/.DS_Store +0 -0
- psychopy/experiment/components/code/.DS_Store +0 -0
- psychopy/experiment/components/dots/.DS_Store +0 -0
- psychopy/experiment/components/eyetracker_record/.DS_Store +0 -0
- psychopy/experiment/components/eyetracker_record/__init__.py +92 -30
- psychopy/experiment/components/form/.DS_Store +0 -0
- psychopy/experiment/components/form/__init__.py +6 -2
- psychopy/experiment/components/grating/.DS_Store +0 -0
- psychopy/experiment/components/grating/__init__.py +14 -3
- psychopy/experiment/components/image/.DS_Store +0 -0
- psychopy/experiment/components/image/__init__.py +14 -3
- psychopy/experiment/components/joyButtons/.DS_Store +0 -0
- psychopy/experiment/components/joystick/.DS_Store +0 -0
- psychopy/experiment/components/keyboard/.DS_Store +0 -0
- psychopy/experiment/components/keyboard/__init__.py +22 -10
- psychopy/experiment/components/microphone/.DS_Store +0 -0
- psychopy/experiment/components/microphone/__init__.py +59 -39
- psychopy/experiment/components/mouse/.DS_Store +0 -0
- psychopy/experiment/components/mouse/__init__.py +44 -29
- psychopy/experiment/components/movie/.DS_Store +0 -0
- psychopy/experiment/components/movie/__init__.py +1 -1
- psychopy/experiment/components/panorama/.DS_Store +0 -0
- psychopy/experiment/components/parallelOut/.DS_Store +0 -0
- psychopy/experiment/components/patch/.DS_Store +0 -0
- psychopy/experiment/components/polygon/.DS_Store +0 -0
- psychopy/experiment/components/polygon/__init__.py +26 -6
- psychopy/experiment/components/progress/.DS_Store +0 -0
- psychopy/experiment/components/progress/__init__.py +1 -1
- psychopy/experiment/components/ratingScale/.DS_Store +0 -0
- psychopy/experiment/components/resourceManager/.DS_Store +0 -0
- psychopy/experiment/components/roi/.DS_Store +0 -0
- psychopy/experiment/components/roi/__init__.py +5 -0
- psychopy/experiment/components/routineSettings/.DS_Store +0 -0
- psychopy/experiment/components/routineSettings/__init__.py +57 -10
- psychopy/experiment/components/serialOut/.DS_Store +0 -0
- psychopy/experiment/components/settings/.DS_Store +0 -0
- psychopy/experiment/components/settings/__init__.py +117 -42
- psychopy/experiment/components/slider/.DS_Store +0 -0
- psychopy/experiment/components/sound/.DS_Store +0 -0
- psychopy/experiment/components/sound/__init__.py +54 -19
- psychopy/experiment/components/static/.DS_Store +0 -0
- psychopy/experiment/components/static/__init__.py +1 -1
- psychopy/experiment/components/text/.DS_Store +0 -0
- psychopy/experiment/components/text/__init__.py +28 -3
- psychopy/experiment/components/textbox/.DS_Store +0 -0
- psychopy/experiment/components/textbox/__init__.py +12 -2
- psychopy/experiment/components/unknown/.DS_Store +0 -0
- psychopy/experiment/components/unknown/__init__.py +1 -2
- psychopy/experiment/components/unknownPlugin/.DS_Store +0 -0
- psychopy/experiment/components/unknownPlugin/__init__.py +2 -2
- psychopy/experiment/components/variable/.DS_Store +0 -0
- psychopy/experiment/flow.py +11 -4
- psychopy/experiment/loops.py +85 -37
- psychopy/experiment/params.py +74 -32
- psychopy/experiment/py2js_transpiler.py +8 -1
- psychopy/experiment/routines/.DS_Store +0 -0
- psychopy/experiment/routines/_base.py +102 -22
- psychopy/experiment/routines/counterbalance/.DS_Store +0 -0
- psychopy/experiment/routines/counterbalance/__init__.py +5 -1
- psychopy/experiment/routines/eyetracker_calibrate/.DS_Store +0 -0
- psychopy/experiment/routines/eyetracker_validate/.DS_Store +0 -0
- psychopy/experiment/routines/pavlovia_survey/.DS_Store +0 -0
- psychopy/experiment/routines/photodiodeValidator/.DS_Store +0 -0
- psychopy/experiment/routines/photodiodeValidator/__init__.py +7 -6
- psychopy/experiment/routines/unknown/.DS_Store +0 -0
- psychopy/gui/wxgui.py +4 -4
- psychopy/hardware/.DS_Store +0 -0
- psychopy/hardware/__init__.py +1 -1
- psychopy/hardware/base.py +12 -0
- psychopy/hardware/camera/__init__.py +1 -15
- psychopy/hardware/cedrus.py +10 -11
- psychopy/hardware/crs/colorcal.py +13 -22
- psychopy/hardware/crs/optical.py +10 -20
- psychopy/hardware/emulator.py +17 -14
- psychopy/hardware/eyetracker.py +42 -118
- psychopy/hardware/gammasci.py +4 -15
- psychopy/hardware/keyboard.py +102 -11
- psychopy/hardware/listener.py +3 -0
- psychopy/hardware/microphone.py +148 -18
- psychopy/hardware/minolta.py +8 -15
- psychopy/hardware/photodiode.py +191 -16
- psychopy/hardware/photometer/__init__.py +11 -19
- psychopy/hardware/pr.py +8 -15
- psychopy/hardware/speaker.py +39 -4
- psychopy/info.py +0 -71
- psychopy/iohub/.DS_Store +0 -0
- psychopy/iohub/__init__.py +1 -1
- psychopy/iohub/client/__init__.py +30 -20
- psychopy/iohub/client/keyboard.py +24 -24
- psychopy/iohub/datastore/__init__.py +2 -2
- psychopy/iohub/datastore/util.py +2 -2
- psychopy/iohub/default_config.yaml +1 -1
- psychopy/iohub/devices/.DS_Store +0 -0
- psychopy/iohub/devices/__init__.py +112 -25
- psychopy/iohub/devices/deviceConfigValidation.py +2 -1
- psychopy/iohub/devices/experiment/default_experiment.yaml +12 -1
- psychopy/iohub/devices/experiment/supported_config_settings.yaml +5 -1
- psychopy/iohub/devices/eyetracker/.DS_Store +0 -0
- psychopy/iohub/devices/eyetracker/__init__.py +46 -0
- psychopy/iohub/devices/eyetracker/calibration/procedure.py +2 -2
- psychopy/iohub/devices/eyetracker/hw/gazepoint/__init__.py +14 -2
- psychopy/iohub/devices/eyetracker/hw/mouse/eyetracker.py +3 -4
- psychopy/iohub/server.py +2 -2
- psychopy/iohub/start_iohub_process.py +3 -0
- psychopy/iohub/util/__init__.py +62 -70
- psychopy/layout.py +5 -5
- psychopy/logging.py +8 -1
- psychopy/microphone.py +10 -37
- psychopy/platform_specific/__init__.py +0 -2
- psychopy/platform_specific/darwin.py +1 -3
- psychopy/platform_specific/linux.py +31 -33
- psychopy/platform_specific/win32.py +38 -13
- psychopy/plugins/__init__.py +148 -116
- psychopy/plugins/util.py +39 -0
- psychopy/preferences/Darwin.spec +4 -2
- psychopy/preferences/FreeBSD.spec +4 -2
- psychopy/preferences/Linux.spec +4 -2
- psychopy/preferences/Windows.spec +4 -2
- psychopy/preferences/baseNoArch.spec +4 -2
- psychopy/preferences/preferences.py +47 -24
- psychopy/projects/pavlovia.py +47 -4
- psychopy/scripts/psyexpCompile.py +0 -4
- psychopy/session.py +153 -21
- psychopy/sound/__init__.py +31 -21
- psychopy/sound/_base.py +20 -3
- psychopy/sound/audioclip.py +320 -33
- psychopy/sound/backend_ptb.py +47 -58
- psychopy/sound/backend_pygame.py +1 -1
- psychopy/sound/backend_pysound.py +6 -15
- psychopy/sound/transcribe.py +53 -0
- psychopy/tests/.DS_Store +0 -0
- psychopy/tests/data/.DS_Store +0 -0
- psychopy/tests/data/TestUnknownPluginComponent_load_resave.psyexp +135 -0
- psychopy/tests/data/Test_textbox/test_ori_0_bottom right.png +0 -0
- psychopy/tests/data/Test_textbox/test_ori_0_center.png +0 -0
- psychopy/tests/data/Test_textbox/test_ori_0_top left.png +0 -0
- psychopy/tests/data/Test_textbox/test_ori_120_bottom right.png +0 -0
- psychopy/tests/data/Test_textbox/test_ori_120_center.png +0 -0
- psychopy/tests/data/Test_textbox/test_ori_120_top left.png +0 -0
- psychopy/tests/data/Test_textbox/test_ori_180_bottom right.png +0 -0
- psychopy/tests/data/Test_textbox/test_ori_180_center.png +0 -0
- psychopy/tests/data/Test_textbox/test_ori_180_top left.png +0 -0
- psychopy/tests/data/Test_textbox/test_ori_240_bottom right.png +0 -0
- psychopy/tests/data/Test_textbox/test_ori_240_center.png +0 -0
- psychopy/tests/data/Test_textbox/test_ori_240_top left.png +0 -0
- psychopy/tests/data/correctScript/.DS_Store +0 -0
- psychopy/tests/data/test_components/testClearKeyboard/testClearKeyboard.psyexp +200 -0
- psychopy/tests/data/test_session/.DS_Store +0 -0
- psychopy/tests/data/test_session/root/testFutureTrials/testFutureTrials.psyexp +155 -0
- psychopy/tests/data/test_session/root/testTrialNav/trialNav.psyexp +158 -0
- psychopy/tests/test_app/.DS_Store +0 -0
- psychopy/tests/test_app/conftest.py +2 -2
- psychopy/tests/test_app/test_speed.py +4 -1
- psychopy/tests/test_data/test_TrialHandler2.py +146 -1
- psychopy/tests/test_experiment/.DS_Store +0 -0
- psychopy/tests/test_experiment/needs_wx/genComponsTemplate.py +3 -3
- psychopy/tests/test_experiment/needs_wx/test_components.py +2 -2
- psychopy/tests/test_experiment/test_components/test_KeyboardComponent.py +28 -0
- psychopy/tests/test_experiment/test_components/test_UnknownPluginComponent.py +27 -0
- psychopy/tests/test_experiment/test_components/test_base_components.py +58 -0
- psychopy/tests/test_experiment/test_py2js.py +1 -1
- psychopy/tests/test_hardware/test_keyboard.py +184 -16
- psychopy/tests/test_hardware/test_ports.py +1 -11
- psychopy/tests/test_liaison/test_Liaison.py +47 -0
- psychopy/tests/test_misc/test_core.py +5 -0
- psychopy/tests/test_session/test_Session.py +5 -1
- psychopy/tests/test_tools/test_versionchooser.py +39 -8
- psychopy/tests/test_visual/test_all_stimuli.py +0 -97
- psychopy/tests/test_visual/test_image.py +6 -5
- psychopy/tests/test_visual/test_textbox.py +36 -0
- psychopy/tests/utils.py +4 -0
- psychopy/tools/filetools.py +1 -1
- psychopy/tools/pkgtools.py +160 -137
- psychopy/tools/versionchooser.py +10 -10
- psychopy/tools/wizard.py +3 -3
- psychopy/visual/.DS_Store +0 -0
- psychopy/visual/backends/pygletbackend.py +24 -13
- psychopy/visual/basevisual.py +5 -11
- psychopy/visual/button.py +2 -14
- psychopy/visual/helpers.py +5 -5
- psychopy/visual/line.py +1 -2
- psychopy/visual/movie2.py +7 -816
- psychopy/visual/movie3.py +7 -589
- psychopy/visual/movies/__init__.py +8 -11
- psychopy/visual/movies/frame.py +5 -2
- psychopy/visual/movies/players/ffpyplayer_player.py +5 -2
- psychopy/visual/noise.py +8 -7
- psychopy/visual/patch.py +7 -16
- psychopy/visual/progress.py +1 -1
- psychopy/visual/radial.py +9 -7
- psychopy/visual/ratingscale.py +8 -1415
- psychopy/visual/secondorder.py +10 -9
- psychopy/visual/shape.py +7 -2
- psychopy/visual/text.py +1 -1
- psychopy/visual/textbox2/textbox2.py +28 -5
- psychopy/web.py +5 -2
- {psychopy-2024.1.3.dist-info → psychopy-2024.2.0.dist-info}/METADATA +8 -13
- {psychopy-2024.1.3.dist-info → psychopy-2024.2.0.dist-info}/RECORD +313 -219
- {psychopy-2024.1.3.dist-info → psychopy-2024.2.0.dist-info}/WHEEL +1 -1
- psychopy/app/Resources/click.png +0 -0
- psychopy/app/Resources/next.png +0 -0
- psychopy/experiment/components/patch/__init__.py +0 -121
- psychopy/experiment/components/patch/classic/patch.png +0 -0
- psychopy/experiment/components/patch/dark/patch.png +0 -0
- psychopy/experiment/components/patch/dark/patch@2x.png +0 -0
- psychopy/experiment/components/patch/light/patch.png +0 -0
- psychopy/experiment/components/patch/light/patch@2x.png +0 -0
- psychopy/experiment/components/ratingScale/__init__.py +0 -337
- psychopy/experiment/components/ratingScale/classic/ratingscale.png +0 -0
- psychopy/experiment/components/ratingScale/classic/ratingscale@2x.png +0 -0
- psychopy/experiment/components/ratingScale/dark/ratingScale@2x.png +0 -0
- psychopy/experiment/components/ratingScale/dark/ratingscale.png +0 -0
- psychopy/experiment/components/ratingScale/light/ratingScale@2x.png +0 -0
- psychopy/experiment/components/ratingScale/light/ratingscale.png +0 -0
- psychopy/platform_specific/posix.py +0 -16
- psychopy/tests/test_sound/test_microphone.py +0 -217
- psychopy/tests/test_visual/test_ratingScale.py +0 -299
- /psychopy/{app/Resources → assets}/Psychopy Window Favicon@16w.png +0 -0
- /psychopy/{app/Resources → assets}/Psychopy Window Favicon@32w.png +0 -0
- /psychopy/{app/Resources → assets}/USB-C.png +0 -0
- /psychopy/{app/Resources → assets}/USB.png +0 -0
- /psychopy/{app/Resources → assets}/creditCard.png +0 -0
- /psychopy/{app/Resources → assets}/default.mp3 +0 -0
- /psychopy/{app/Resources → assets}/default.mp4 +0 -0
- /psychopy/{app/Resources → assets}/default.png +0 -0
- /psychopy/{app/Resources → assets/templates}/instruct1.png +0 -0
- /psychopy/{app/Resources → assets/templates}/instruct2.png +0 -0
- {psychopy-2024.1.3.dist-info → psychopy-2024.2.0.dist-info}/entry_points.txt +0 -0
- {psychopy-2024.1.3.dist-info → psychopy-2024.2.0.dist-info}/licenses/AUTHORS.md +0 -0
- {psychopy-2024.1.3.dist-info → psychopy-2024.2.0.dist-info}/licenses/LICENSE +0 -0
psychopy/visual/secondorder.py
CHANGED
|
@@ -15,15 +15,16 @@ These are optional components that can be obtained by installing the
|
|
|
15
15
|
|
|
16
16
|
"""
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
18
|
+
from psychopy.tools.pkgtools import PluginStub
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
class EnvelopeGrating(
|
|
22
|
+
PluginStub,
|
|
23
|
+
plugin="psychopy-visionscience",
|
|
24
|
+
doclink="https://psychopy.github.io/psychopy-visionscience/coder/EnvelopeGrating"
|
|
25
|
+
):
|
|
26
|
+
pass
|
|
27
|
+
|
|
27
28
|
|
|
28
29
|
|
|
29
30
|
class EnvelopeGrating:
|
psychopy/visual/shape.py
CHANGED
|
@@ -31,7 +31,6 @@ from psychopy.visual.basevisual import (
|
|
|
31
31
|
)
|
|
32
32
|
# from psychopy.visual.helpers import setColor
|
|
33
33
|
import psychopy.visual
|
|
34
|
-
from psychopy.contrib import tesselate
|
|
35
34
|
|
|
36
35
|
pyglet.options['debug_gl'] = False
|
|
37
36
|
GL = pyglet.gl
|
|
@@ -370,7 +369,12 @@ class BaseShapeStim(BaseVisualStim, DraggingMixin, ColorMixin, ContainerMixin):
|
|
|
370
369
|
if self._borderColor != None and self.lineWidth != 0.0:
|
|
371
370
|
# then draw
|
|
372
371
|
GL.glLineWidth(self.lineWidth)
|
|
373
|
-
|
|
372
|
+
if self.opacity is not None:
|
|
373
|
+
borderRGBA = self._borderColor.render('rgba1')
|
|
374
|
+
borderRGBA[-1] = self.opacity # override opacity
|
|
375
|
+
GL.glColor4f(*borderRGBA)
|
|
376
|
+
else:
|
|
377
|
+
GL.glColor4f(*self._borderColor.render('rgba1'))
|
|
374
378
|
if self.closeShape:
|
|
375
379
|
GL.glDrawArrays(GL.GL_LINE_LOOP, 0, nVerts)
|
|
376
380
|
else:
|
|
@@ -578,6 +582,7 @@ class ShapeStim(BaseShapeStim):
|
|
|
578
582
|
# TO-DO: handle borders properly for multiloop stim like holes
|
|
579
583
|
# likely requires changes in ContainerMixin to iterate over each
|
|
580
584
|
# border loop
|
|
585
|
+
from psychopy.contrib import tesselate
|
|
581
586
|
|
|
582
587
|
self.border = copy.deepcopy(newVertices)
|
|
583
588
|
tessVertices = [] # define to keep the linter happy
|
psychopy/visual/text.py
CHANGED
|
@@ -242,7 +242,7 @@ class TextStim(BaseVisualStim, DraggingMixin, ForeColorMixin, ContainerMixin):
|
|
|
242
242
|
if GL: # because of pytest fail otherwise
|
|
243
243
|
try:
|
|
244
244
|
GL.glDeleteLists(self._listID, 1)
|
|
245
|
-
except (ImportError, ModuleNotFoundError, TypeError):
|
|
245
|
+
except (ImportError, ModuleNotFoundError, TypeError, GL.lib.GLException):
|
|
246
246
|
pass # if pyglet no longer exists
|
|
247
247
|
|
|
248
248
|
@attributeSetter
|
|
@@ -69,7 +69,10 @@ debug = False
|
|
|
69
69
|
class TextBox2(BaseVisualStim, DraggingMixin, ContainerMixin, ColorMixin):
|
|
70
70
|
def __init__(self, win, text,
|
|
71
71
|
font="Open Sans",
|
|
72
|
-
pos=(0, 0),
|
|
72
|
+
pos=(0, 0),
|
|
73
|
+
units=None,
|
|
74
|
+
letterHeight=None,
|
|
75
|
+
ori=0,
|
|
73
76
|
size=None,
|
|
74
77
|
color=(1.0, 1.0, 1.0), colorSpace='rgb',
|
|
75
78
|
fillColor=None, fillColorSpace=None,
|
|
@@ -248,6 +251,9 @@ class TextBox2(BaseVisualStim, DraggingMixin, ContainerMixin, ColorMixin):
|
|
|
248
251
|
self._text = ''
|
|
249
252
|
self.text = self.startText = text if text is not None else ""
|
|
250
253
|
|
|
254
|
+
# now that we have text, set orientation
|
|
255
|
+
self.ori = ori
|
|
256
|
+
|
|
251
257
|
# Initialise arabic reshaper
|
|
252
258
|
arabic_config = {'delete_harakat': False, # if present, retain any diacritics
|
|
253
259
|
'shift_harakat_position': False} # shift by 1 to be compatible with the bidi algorithm
|
|
@@ -472,8 +478,8 @@ class TextBox2(BaseVisualStim, DraggingMixin, ContainerMixin, ColorMixin):
|
|
|
472
478
|
if hasattr(self, "box"):
|
|
473
479
|
self.box.size = self._pos
|
|
474
480
|
if hasattr(self, "contentBox"):
|
|
475
|
-
#
|
|
476
|
-
self.contentBox.pos = self.pos + self.size * self.box._vertices.anchorAdjust
|
|
481
|
+
# set content box pos with offset for anchor (accounting for orientation)
|
|
482
|
+
self.contentBox.pos = self.pos + np.dot(self.size * self.box._vertices.anchorAdjust, self._rotationMatrix)
|
|
477
483
|
self.contentBox._needVertexUpdate = True
|
|
478
484
|
if hasattr(self, "_placeholder"):
|
|
479
485
|
self._placeholder.pos = self._pos
|
|
@@ -1169,8 +1175,11 @@ class TextBox2(BaseVisualStim, DraggingMixin, ContainerMixin, ColorMixin):
|
|
|
1169
1175
|
# Adjust vertices
|
|
1170
1176
|
vertices[:, 0] = vertices[:, 0] + adjustX
|
|
1171
1177
|
|
|
1172
|
-
#
|
|
1173
|
-
|
|
1178
|
+
# convert the vertices to be relative to content box and set
|
|
1179
|
+
vertices = vertices / self.contentBox._size.pix + (-0.5, 0.5)
|
|
1180
|
+
# apply orientation
|
|
1181
|
+
self.vertices = (vertices * self.size).dot(self._rotationMatrix) / self.size
|
|
1182
|
+
|
|
1174
1183
|
if len(_lineBottoms):
|
|
1175
1184
|
if self.flipVert:
|
|
1176
1185
|
self._lineBottoms = min(self.contentBox._vertices.pix[:, 1]) - np.array(_lineBottoms)
|
|
@@ -1187,6 +1196,20 @@ class TextBox2(BaseVisualStim, DraggingMixin, ContainerMixin, ColorMixin):
|
|
|
1187
1196
|
self.glFont._dirty = False
|
|
1188
1197
|
self._needVertexUpdate = True
|
|
1189
1198
|
|
|
1199
|
+
@attributeSetter
|
|
1200
|
+
def ori(self, value):
|
|
1201
|
+
# get previous orientaiton
|
|
1202
|
+
lastOri = self.__dict__.get("ori", 0)
|
|
1203
|
+
# set new value
|
|
1204
|
+
BaseVisualStim.ori.func(self, value)
|
|
1205
|
+
# set on all boxes
|
|
1206
|
+
self.box.ori = value
|
|
1207
|
+
self.boundingBox.ori = value
|
|
1208
|
+
self.contentBox.ori = value
|
|
1209
|
+
# trigger layout if value has changed
|
|
1210
|
+
if lastOri != value:
|
|
1211
|
+
self._layout()
|
|
1212
|
+
|
|
1190
1213
|
def draw(self):
|
|
1191
1214
|
"""Draw the text to the back buffer"""
|
|
1192
1215
|
# Border width
|
psychopy/web.py
CHANGED
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
# Copyright (C) 2002-2018 Jonathan Peirce (C) 2019-2024 Open Science Tools Ltd.
|
|
8
8
|
# Distributed under the terms of the GNU General Public License (GPL).
|
|
9
9
|
|
|
10
|
+
import pathlib
|
|
10
11
|
import sys
|
|
11
12
|
import socket
|
|
12
13
|
import re
|
|
@@ -115,8 +116,10 @@ def getPacFiles():
|
|
|
115
116
|
pacFiles.append(subkeys['AutoConfigURL'])
|
|
116
117
|
elif sys.platform == 'darwin':
|
|
117
118
|
import plistlib
|
|
118
|
-
|
|
119
|
-
|
|
119
|
+
prefs_loc = pathlib.Path('/Library/Preferences/SystemConfiguration/preferences.plist')
|
|
120
|
+
if prefs_loc.exists():
|
|
121
|
+
with open(prefs_loc, 'rb') as fp :
|
|
122
|
+
sysPrefs = plistlib.loads(fp.read())
|
|
120
123
|
networks = sysPrefs['NetworkServices']
|
|
121
124
|
# loop through each possible network (e.g. Ethernet, Airport...)
|
|
122
125
|
for network in list(networks.items()):
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: psychopy
|
|
3
|
-
Version: 2024.
|
|
3
|
+
Version: 2024.2.0
|
|
4
4
|
Summary: PsychoPy provides easy, precise, flexible experiments in behavioural sciences
|
|
5
5
|
Author-Email: Open Science Tools Ltd <support@opensciencetools.org>
|
|
6
6
|
Maintainer-Email: Open Science Tools Ltd <support@opensciencetools.org>
|
|
@@ -17,7 +17,7 @@ Classifier: License :: OSI Approved :: GNU General Public License v3 or later (G
|
|
|
17
17
|
Project-URL: Homepage, https://www.psychopy.org/
|
|
18
18
|
Project-URL: Download, https://github.com/psychopy/psychopy/releases/
|
|
19
19
|
Requires-Python: <3.11,>=3.8
|
|
20
|
-
Requires-Dist: numpy
|
|
20
|
+
Requires-Dist: numpy<2.0
|
|
21
21
|
Requires-Dist: scipy
|
|
22
22
|
Requires-Dist: matplotlib
|
|
23
23
|
Requires-Dist: pyglet==1.4.11; platform_system == "Windows"
|
|
@@ -70,9 +70,11 @@ Requires-Dist: pyobjc-framework-Quartz<8.0; platform_system == "Darwin"
|
|
|
70
70
|
Requires-Dist: pyobjc; platform_system == "Darwin"
|
|
71
71
|
Requires-Dist: zeroconf; platform_system == "Darwin"
|
|
72
72
|
Requires-Dist: python-xlib; platform_system == "Linux"
|
|
73
|
+
Requires-Dist: distro; platform_system == "Linux"
|
|
73
74
|
Requires-Dist: tables<3.9; python_version < "3.9"
|
|
74
75
|
Requires-Dist: tables; python_version >= "3.9"
|
|
75
76
|
Requires-Dist: blosc2<2.2.8; python_version < "3.9"
|
|
77
|
+
Requires-Dist: packaging>=24.1
|
|
76
78
|
Requires-Dist: pytest>=6.2.5; extra == "tests"
|
|
77
79
|
Requires-Dist: pytest-codecov; extra == "tests"
|
|
78
80
|
Requires-Dist: pytest-cov; extra == "tests"
|
|
@@ -82,11 +84,10 @@ Requires-Dist: xmlschema; extra == "tests"
|
|
|
82
84
|
Requires-Dist: bdist-mpkg>=0.5.0; platform_system == "Darwin" and extra == "building"
|
|
83
85
|
Requires-Dist: py2app; platform_system == "Darwin" and extra == "building"
|
|
84
86
|
Requires-Dist: dmgbuild; platform_system == "Darwin" and extra == "building"
|
|
87
|
+
Requires-Dist: sounddevice; extra == "suggested"
|
|
85
88
|
Requires-Dist: pylsl>=1.16.1; extra == "suggested"
|
|
86
89
|
Requires-Dist: xlwt; extra == "suggested"
|
|
87
90
|
Requires-Dist: h5py; extra == "suggested"
|
|
88
|
-
Requires-Dist: google-api-python-client; extra == "suggested"
|
|
89
|
-
Requires-Dist: pygaze>=1.1.2; extra == "suggested"
|
|
90
91
|
Requires-Dist: tobii_research; extra == "suggested"
|
|
91
92
|
Requires-Dist: badapted>=0.0.3; extra == "suggested"
|
|
92
93
|
Requires-Dist: egi-pynetstation>=0.0.0rc1; extra == "suggested"
|
|
@@ -109,12 +110,6 @@ Description-Content-Type: text/markdown
|
|
|
109
110
|
|
|
110
111
|
---
|
|
111
112
|
|
|
112
|
-
**Announcement!!**
|
|
113
|
-
|
|
114
|
-
We are excited to announce that PsychoPy will be hosting a 3-day in-person code-sprint at the University of Nottingham from 15-17 April 2024. The code sprint will be an opportunity for us to get together in person and improve PsychoPy/JS. Anyone who would like to attend will need to fill out the [online application](https://run.pavlovia.org/pavlovia/survey/?surveyId=171ed328-d5ea-4819-83dc-9ba00ef5683b) by 31 January 2024. Those selected will be notified by the end of February.
|
|
115
|
-
|
|
116
|
-
---
|
|
117
|
-
|
|
118
113
|
PsychoPy is an open-source package for creating experiments in behavioral science. It aims to provide a single package that is:
|
|
119
114
|
|
|
120
115
|
* precise enough for psychophysics
|
|
@@ -142,9 +137,9 @@ and the developers documentation at [https://www.psychopy.org/developers](https:
|
|
|
142
137
|
|
|
143
138
|
## Code Status
|
|
144
139
|
|
|
145
|
-
[](https://github.com/psychopy/psychopy/actions/workflows/pytests.yaml?query=branch%3Adev) [](https://github.com/psychopy/psychopy/actions/workflows/CodeQL.yaml?query=branch%3Adev)
|
|
141
|
+
|
|
142
|
+
Release branch: [](https://github.com/psychopy/psychopy/actions/workflows/pytests.yaml?query=branch%3Arelease) [](https://github.com/psychopy/psychopy/actions/workflows/CodeQL.yaml?query=branch%3Arelease)
|
|
148
143
|
|
|
149
144
|
## More information
|
|
150
145
|
|