psychopy 2024.1.1__py3-none-any.whl → 2024.1.2__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 (81) hide show
  1. psychopy/__init__.py +2 -2
  2. psychopy/alerts/_alerts.py +6 -2
  3. psychopy/alerts/alertsCatalogue/alertmsg.py +15 -0
  4. psychopy/app/builder/dialogs/paramCtrls.py +4 -2
  5. psychopy/app/builder/localizedStrings.py +16 -4
  6. psychopy/app/locale/ar_001/LC_MESSAGE/messages.mo +0 -0
  7. psychopy/app/locale/cs_CZ/LC_MESSAGE/messages.mo +0 -0
  8. psychopy/app/locale/da_DK/LC_MESSAGE/messages.mo +0 -0
  9. psychopy/app/locale/de_DE/LC_MESSAGE/messages.mo +0 -0
  10. psychopy/app/locale/el_GR/LC_MESSAGE/messages.mo +0 -0
  11. psychopy/app/locale/en_NZ/LC_MESSAGE/messages.mo +0 -0
  12. psychopy/app/locale/en_US/LC_MESSAGE/messages.mo +0 -0
  13. psychopy/app/locale/es_ES/LC_MESSAGE/messages.mo +0 -0
  14. psychopy/app/locale/fa_IR/LC_MESSAGE/messages.mo +0 -0
  15. psychopy/app/locale/fi_FI/LC_MESSAGE/messages.mo +0 -0
  16. psychopy/app/locale/fr_FR/LC_MESSAGE/messages.mo +0 -0
  17. psychopy/app/locale/he_IL/LC_MESSAGE/messages.mo +0 -0
  18. psychopy/app/locale/hi_IN/LC_MESSAGE/messages.mo +0 -0
  19. psychopy/app/locale/hu_HU/LC_MESSAGE/messages.mo +0 -0
  20. psychopy/app/locale/it_IT/LC_MESSAGE/messages.mo +0 -0
  21. psychopy/app/locale/ja_JP/LC_MESSAGE/messages.mo +0 -0
  22. psychopy/app/locale/ja_JP/LC_MESSAGE/messages.po +3548 -5422
  23. psychopy/app/locale/ko_KR/LC_MESSAGE/messages.mo +0 -0
  24. psychopy/app/locale/ms_MY/LC_MESSAGE/messages.mo +0 -0
  25. psychopy/app/locale/nl_NL/LC_MESSAGE/messages.mo +0 -0
  26. psychopy/app/locale/nn_NO/LC_MESSAGE/messages.mo +0 -0
  27. psychopy/app/locale/pl_PL/LC_MESSAGE/messages.mo +0 -0
  28. psychopy/app/locale/pt_PT/LC_MESSAGE/messages.mo +0 -0
  29. psychopy/app/locale/ro_RO/LC_MESSAGE/messages.mo +0 -0
  30. psychopy/app/locale/ru_RU/LC_MESSAGE/messages.mo +0 -0
  31. psychopy/app/locale/sv_SE/LC_MESSAGE/messages.mo +0 -0
  32. psychopy/app/locale/tr_TR/LC_MESSAGE/messages.mo +0 -0
  33. psychopy/app/locale/zh_CN/LC_MESSAGE/messages.mo +0 -0
  34. psychopy/app/locale/zh_TW/LC_MESSAGE/messages.mo +0 -0
  35. psychopy/app/plugin_manager/plugins.py +1 -1
  36. psychopy/app/preferencesDlg.py +2 -1
  37. psychopy/demos/builder/Hardware/EEG_parallel_component/EEG_triggers_parallel_comp.psyexp +552 -550
  38. psychopy/demos/builder/Hardware/EEG_serial_component/EEG_triggers_serial_comp.psyexp +572 -570
  39. psychopy/demos/coder/timing/timeByFrames.py +7 -1
  40. psychopy/experiment/components/_base.py +122 -0
  41. psychopy/experiment/components/aperture/__init__.py +6 -2
  42. psychopy/experiment/components/brush/__init__.py +3 -1
  43. psychopy/experiment/components/button/__init__.py +6 -2
  44. psychopy/experiment/components/buttonBox/__init__.py +2 -1
  45. psychopy/experiment/components/camera/__init__.py +13 -0
  46. psychopy/experiment/components/code/__init__.py +34 -1
  47. psychopy/experiment/components/form/formItems.xltx +0 -0
  48. psychopy/experiment/components/polygon/__init__.py +14 -3
  49. psychopy/experiment/components/settings/__init__.py +4 -1
  50. psychopy/experiment/components/sound/__init__.py +1 -1
  51. psychopy/experiment/components/text/__init__.py +1 -1
  52. psychopy/experiment/params.py +17 -0
  53. psychopy/experiment/routines/_base.py +122 -0
  54. psychopy/hardware/button.py +4 -3
  55. psychopy/hardware/camera/__init__.py +6 -0
  56. psychopy/hardware/keyboard.py +7 -2
  57. psychopy/iohub/devices/eyetracker/hw/gazepoint/__init__.py +1 -1
  58. psychopy/iohub/devices/eyetracker/hw/gazepoint/gp3/__init__.py +1 -1
  59. psychopy/iohub/devices/eyetracker/hw/gazepoint/gp3/calibration.py +1 -1
  60. psychopy/iohub/devices/eyetracker/hw/gazepoint/gp3/eyetracker.py +1 -1
  61. psychopy/localization/generateTranslationTemplate.py +45 -19
  62. psychopy/localization/messages.pot +5049 -3418
  63. psychopy/preferences/Darwin.spec +2 -0
  64. psychopy/preferences/FreeBSD.spec +2 -0
  65. psychopy/preferences/Linux.spec +2 -0
  66. psychopy/preferences/Windows.spec +2 -0
  67. psychopy/preferences/baseNoArch.spec +2 -0
  68. psychopy/preferences/generateHints.py +2 -1
  69. psychopy/preferences/hints.py +118 -97
  70. psychopy/tools/fontmanager.py +1 -1
  71. psychopy/tools/versionchooser.py +1 -1
  72. psychopy/visual/noise.py +9 -0
  73. psychopy/visual/radial.py +8 -0
  74. psychopy/visual/secondorder.py +9 -0
  75. psychopy/visual/textbox2/textbox2.py +19 -21
  76. {psychopy-2024.1.1.dist-info → psychopy-2024.1.2.dist-info}/METADATA +2 -2
  77. {psychopy-2024.1.1.dist-info → psychopy-2024.1.2.dist-info}/RECORD +81 -53
  78. {psychopy-2024.1.1.dist-info → psychopy-2024.1.2.dist-info}/WHEEL +1 -1
  79. {psychopy-2024.1.1.dist-info → psychopy-2024.1.2.dist-info}/entry_points.txt +0 -0
  80. {psychopy-2024.1.1.dist-info → psychopy-2024.1.2.dist-info}/licenses/AUTHORS.md +0 -0
  81. {psychopy-2024.1.1.dist-info → psychopy-2024.1.2.dist-info}/licenses/LICENSE +0 -0
@@ -147,6 +147,8 @@
147
147
  [piloting]
148
148
  # Prevent the experiment from being fullscreen when piloting
149
149
  forceWindowed = boolean(default=True)
150
+ # What window size to use when forced to windowed mode
151
+ forcedWindowSize = list(default=list(800, 600))
150
152
  # How much output to include in the log files when piloting ('error' is fewest messages, 'debug' is most)
151
153
  pilotLoggingLevel = option('error', 'warning', 'data', 'exp', 'info', 'debug', default='debug')
152
154
  # Show an orange border around the window when in piloting mode
@@ -147,6 +147,8 @@
147
147
  [piloting]
148
148
  # Prevent the experiment from being fullscreen when piloting
149
149
  forceWindowed = boolean(default=True)
150
+ # What window size to use when forced to windowed mode
151
+ forcedWindowSize = list(default=list(800, 600))
150
152
  # How much output to include in the log files when piloting ('error' is fewest messages, 'debug' is most)
151
153
  pilotLoggingLevel = option('error', 'warning', 'data', 'exp', 'info', 'debug', default='debug')
152
154
  # Show an orange border around the window when in piloting mode
@@ -147,6 +147,8 @@
147
147
  [piloting]
148
148
  # Prevent the experiment from being fullscreen when piloting
149
149
  forceWindowed = boolean(default=True)
150
+ # What window size to use when forced to windowed mode
151
+ forcedWindowSize = list(default=list(800, 600))
150
152
  # How much output to include in the log files when piloting ('error' is fewest messages, 'debug' is most)
151
153
  pilotLoggingLevel = option('error', 'warning', 'data', 'exp', 'info', 'debug', default='debug')
152
154
  # Show an orange border around the window when in piloting mode
@@ -147,6 +147,8 @@
147
147
  [piloting]
148
148
  # Prevent the experiment from being fullscreen when piloting
149
149
  forceWindowed = boolean(default=True)
150
+ # What window size to use when forced to windowed mode
151
+ forcedWindowSize = list(default=list(800, 600))
150
152
  # How much output to include in the log files when piloting ('error' is fewest messages, 'debug' is most)
151
153
  pilotLoggingLevel = option('error', 'warning', 'data', 'exp', 'info', 'debug', default='debug')
152
154
  # Show an orange border around the window when in piloting mode
@@ -143,6 +143,8 @@
143
143
  [piloting]
144
144
  # Prevent the experiment from being fullscreen when piloting
145
145
  forceWindowed = boolean(default=True)
146
+ # What window size to use when forced to windowed mode
147
+ forcedWindowSize = list(default=list(800, 600))
146
148
  # How much output to include in the log files when piloting ('error' is fewest messages, 'debug' is most)
147
149
  pilotLoggingLevel = option('error', 'warning', 'data', 'exp', 'info', 'debug', default='debug')
148
150
  # Show an orange border around the window when in piloting mode
@@ -20,7 +20,8 @@ specfiles = ('baseNoArch.spec', 'Darwin.spec',
20
20
  'FreeBSD.spec', 'Linux.spec', 'Windows.spec')
21
21
  # list of sections to parse.
22
22
  prefsDlgSections = ('[general]', '[app]', '[coder]', '[builder]',
23
- '[hardware]', '[connections]', '[keyBindings]')
23
+ '[hardware]', '[piloting]', '[connections]',
24
+ '[keyBindings]')
24
25
  # regular expression to extract comment text (as in-lined in .spec files)
25
26
  commentObj = re.compile(r'\#\s*(\S.*$)')
26
27
 
@@ -9,40 +9,40 @@
9
9
  from psychopy.localization import _translate
10
10
 
11
11
  # baseNoArch.spec,[general],line25
12
- _translate("which system to use as a backend for drawing")
12
+ _translate("the default units for windows and visual stimuli")
13
13
 
14
14
  # baseNoArch.spec,[general],line27
15
- _translate("the default units for windows and visual stimuli")
15
+ _translate("full screen is best for accurate timing")
16
16
 
17
17
  # baseNoArch.spec,[general],line29
18
- _translate("full screen is best for accurate timing")
18
+ _translate("enable subjects to use the mouse and GUIs during experiments")
19
19
 
20
20
  # baseNoArch.spec,[general],line31
21
- _translate("enable subjects to use the mouse and GUIs during experiments")
21
+ _translate("'version' is for internal usage, not for the user")
22
22
 
23
23
  # baseNoArch.spec,[general],line33
24
- _translate("'version' is for internal usage, not for the user")
24
+ _translate("Add paths here to your custom Python modules")
25
25
 
26
26
  # baseNoArch.spec,[general],line35
27
- _translate("Add paths here to your custom Python modules")
27
+ _translate("path to flac (lossless audio compression) on this operating system")
28
28
 
29
29
  # baseNoArch.spec,[general],line37
30
- _translate("path to flac (lossless audio compression) on this operating system")
30
+ _translate("Shutdown keys, following the pyglet naming scheme.")
31
31
 
32
32
  # baseNoArch.spec,[general],line39
33
- _translate("Shutdown keys, following the pyglet naming scheme.")
33
+ _translate("Modifier keys for shutdown keys")
34
34
 
35
35
  # baseNoArch.spec,[general],line41
36
- _translate("Modifier keys for shutdown keys")
36
+ _translate("What to do if gamma-correction not possible")
37
37
 
38
38
  # baseNoArch.spec,[general],line43
39
- _translate("What to do if gamma-correction not possible")
39
+ _translate("Add plugin names here to load when a PsychoPy session starts.")
40
40
 
41
41
  # baseNoArch.spec,[general],line45
42
- _translate("Add plugin names here to load when a PsychoPy session starts.")
42
+ _translate("Google Cloud Platform key, required for the audio transcription using Google Speech Recognition. Specified as a path to a JSON file containing the key data.")
43
43
 
44
44
  # baseNoArch.spec,[general],line47
45
- _translate("Google Cloud Platform key, required for the audio transcription using Google Speech Recognition. Specified as a path to a JSON file containing the key data.")
45
+ _translate("LEGACY: which system to use as a backend for drawing")
46
46
 
47
47
  # baseNoArch.spec,[general],line50
48
48
  _translate("display tips when starting PsychoPy")
@@ -70,260 +70,281 @@ _translate(
70
70
  _translate("Theme")
71
71
 
72
72
  # baseNoArch.spec,[app],line66
73
+ _translate("Show / hide splash screen")
74
+
75
+ # baseNoArch.spec,[app],line68
73
76
  _translate(
74
77
  "open Coder files as read-only (allows running without accidental changes)")
75
78
 
76
- # baseNoArch.spec,[app],line69
79
+ # baseNoArch.spec,[app],line71
77
80
  _translate("a list of font names; the first one found on the system will be used")
78
81
 
79
- # baseNoArch.spec,[coder],line71
82
+ # baseNoArch.spec,[coder],line73
80
83
  _translate("Font size (in pts) takes an integer between 6 and 24")
81
84
 
82
- # baseNoArch.spec,[coder],line73
85
+ # baseNoArch.spec,[coder],line75
83
86
  _translate("Spacing between lines")
84
87
 
85
- # baseNoArch.spec,[coder],line77
88
+ # baseNoArch.spec,[coder],line79
86
89
  _translate("Long line edge guide, specify zero to disable")
87
90
 
88
- # baseNoArch.spec,[coder],line81
91
+ # baseNoArch.spec,[coder],line83
89
92
  _translate("Set the source assistant panel to be visible by default")
90
93
 
91
- # baseNoArch.spec,[coder],line83
94
+ # baseNoArch.spec,[coder],line85
92
95
  _translate("Set the output/shell to be visible by default")
93
96
 
94
- # baseNoArch.spec,[coder],line85
97
+ # baseNoArch.spec,[coder],line87
95
98
  _translate(
96
99
  "Show code completion suggestion and calltips automatically when typing.")
97
100
 
98
- # baseNoArch.spec,[coder],line87
101
+ # baseNoArch.spec,[coder],line89
99
102
  _translate("reload previously opened files after start")
100
103
 
101
- # baseNoArch.spec,[coder],line89
104
+ # baseNoArch.spec,[coder],line91
102
105
  _translate("for coder shell window, which shell to use")
103
106
 
104
- # baseNoArch.spec,[coder],line91
107
+ # baseNoArch.spec,[coder],line93
105
108
  _translate("whether to automatically reload a previously open experiment")
106
109
 
107
- # baseNoArch.spec,[coder],line93
110
+ # baseNoArch.spec,[coder],line95
108
111
  _translate("Default to when writing code components")
109
112
 
110
- # baseNoArch.spec,[coder],line96
113
+ # baseNoArch.spec,[coder],line98
111
114
  _translate(
112
115
  "if False will create scripts with an 'easier' but more cluttered namespace")
113
116
 
114
- # baseNoArch.spec,[builder],line98
117
+ # baseNoArch.spec,[builder],line100
115
118
  _translate("folder names for custom components; expects a comma-separated list")
116
119
 
117
- # baseNoArch.spec,[builder],line100
120
+ # baseNoArch.spec,[builder],line102
118
121
  _translate("Only show components which work in...")
119
122
 
120
- # baseNoArch.spec,[builder],line102
123
+ # baseNoArch.spec,[builder],line104
121
124
  _translate("a list of components to hide (eg, because you never use them)")
122
125
 
123
- # baseNoArch.spec,[builder],line104
126
+ # baseNoArch.spec,[builder],line106
127
+ _translate("Abbreviate long component names to maximise timeline space?")
128
+
129
+ # baseNoArch.spec,[builder],line108
124
130
  _translate("where the Builder demos are located on this computer (after unpacking)")
125
131
 
126
- # baseNoArch.spec,[builder],line106
132
+ # baseNoArch.spec,[builder],line110
127
133
  _translate(
128
134
  "name of the folder where subject data should be saved (relative to the script)")
129
135
 
130
- # baseNoArch.spec,[builder],line108
136
+ # baseNoArch.spec,[builder],line112
131
137
  _translate("Panels arrangement: Should Flow be on the top or bottom, and should Components be on the left or right?")
132
138
 
133
- # baseNoArch.spec,[builder],line110
139
+ # baseNoArch.spec,[builder],line114
134
140
  _translate("Display text in a floating window that describes the experiment")
135
141
 
136
- # baseNoArch.spec,[builder],line112
142
+ # baseNoArch.spec,[builder],line116
137
143
  _translate("Upper limit on how many components can be in favorites")
138
144
 
139
- # baseNoArch.spec,[builder],line114
145
+ # baseNoArch.spec,[builder],line118
140
146
  _translate("Ask for confirmation when closing a routine tab.")
141
147
 
142
- # baseNoArch.spec,[builder],line116
143
- _translate("choice of audio library")
148
+ # baseNoArch.spec,[builder],line120
149
+ _translate("LEGACY: choice of audio library")
144
150
 
145
- # baseNoArch.spec,[builder],line118
151
+ # baseNoArch.spec,[builder],line122
146
152
  _translate(
147
- "latency mode for PsychToolbox audio (3 is good for most applications. See")
153
+ "LEGACY: latency mode for PsychToolbox audio (3 is good for most applications. See")
148
154
 
149
- # baseNoArch.spec,[builder],line120
155
+ # baseNoArch.spec,[builder],line124
150
156
  _translate("audio driver to use")
151
157
 
152
- # baseNoArch.spec,[builder],line123
158
+ # baseNoArch.spec,[builder],line127
153
159
  _translate("audio device to use (if audioLib allows control)")
154
160
 
155
- # baseNoArch.spec,[hardware],line125
161
+ # baseNoArch.spec,[hardware],line129
156
162
  _translate("a list of parallel ports")
157
163
 
158
- # baseNoArch.spec,[hardware],line127
164
+ # baseNoArch.spec,[hardware],line131
159
165
  _translate("The name of the Qmix pump configuration to use")
160
166
 
161
- # baseNoArch.spec,[hardware],line129
167
+ # baseNoArch.spec,[hardware],line133
168
+ _translate("Prevent the experiment from being fullscreen when piloting")
169
+
170
+ # baseNoArch.spec,[hardware],line135
171
+ _translate("How much output to include in the log files when piloting ('error' is fewest messages, 'debug' is most)")
172
+
173
+ # baseNoArch.spec,[hardware],line137
174
+ _translate("Show an orange border around the window when in piloting mode")
175
+
176
+ # baseNoArch.spec,[hardware],line139
177
+ _translate("Prevent experiment from enabling rush mode when piloting")
178
+
179
+ # baseNoArch.spec,[hardware],line142
162
180
  _translate("the http proxy for usage stats and auto-updating; format is host: port")
163
181
 
164
- # baseNoArch.spec,[hardware],line131
182
+ # baseNoArch.spec,[piloting],line144
165
183
  _translate(
166
184
  "override the above proxy settings with values found in the environment (if possible)")
167
185
 
168
- # baseNoArch.spec,[hardware],line133
186
+ # baseNoArch.spec,[piloting],line146
169
187
  _translate("allow PsychoPy to send anonymous usage stats; please allow if possible, it helps PsychoPy's development")
170
188
 
171
- # baseNoArch.spec,[hardware],line135
189
+ # baseNoArch.spec,[piloting],line148
172
190
  _translate("allow PsychoPy to check for new features and bug fixes")
173
191
 
174
- # baseNoArch.spec,[hardware],line138
192
+ # baseNoArch.spec,[piloting],line150
175
193
  _translate("max time to wait for a connection response")
176
194
 
177
- # baseNoArch.spec,[connections],line140
195
+ # baseNoArch.spec,[piloting],line153
178
196
  _translate("open an existing file")
179
197
 
180
- # baseNoArch.spec,[connections],line142
198
+ # baseNoArch.spec,[connections],line155
181
199
  _translate("start a new experiment or script")
182
200
 
183
- # baseNoArch.spec,[connections],line144
201
+ # baseNoArch.spec,[connections],line157
184
202
  _translate("save a Builder or Coder file")
185
203
 
186
- # baseNoArch.spec,[connections],line146
204
+ # baseNoArch.spec,[connections],line159
187
205
  _translate("save a Builder or Coder file under a new name")
188
206
 
189
- # baseNoArch.spec,[connections],line148
207
+ # baseNoArch.spec,[connections],line161
190
208
  _translate("Coder: print the file")
191
209
 
192
- # baseNoArch.spec,[connections],line151
210
+ # baseNoArch.spec,[connections],line163
193
211
  _translate("close the Builder or Coder window")
194
212
 
195
- # baseNoArch.spec,[keyBindings],line153
213
+ # baseNoArch.spec,[connections],line166
196
214
  _translate("end the application (PsychoPy)")
197
215
 
198
- # baseNoArch.spec,[keyBindings],line155
216
+ # baseNoArch.spec,[keyBindings],line168
199
217
  _translate("open the preferences dialog")
200
218
 
201
- # baseNoArch.spec,[keyBindings],line157
219
+ # baseNoArch.spec,[keyBindings],line170
202
220
  _translate("export Builder experiment to HTML")
203
221
 
204
- # baseNoArch.spec,[keyBindings],line159
222
+ # baseNoArch.spec,[keyBindings],line172
205
223
  _translate("Coder: cut")
206
224
 
207
- # baseNoArch.spec,[keyBindings],line161
225
+ # baseNoArch.spec,[keyBindings],line174
208
226
  _translate("Coder: copy")
209
227
 
210
- # baseNoArch.spec,[keyBindings],line163
228
+ # baseNoArch.spec,[keyBindings],line176
211
229
  _translate("Coder: paste")
212
230
 
213
- # baseNoArch.spec,[keyBindings],line165
231
+ # baseNoArch.spec,[keyBindings],line178
214
232
  _translate("Coder: duplicate")
215
233
 
216
- # baseNoArch.spec,[keyBindings],line167
234
+ # baseNoArch.spec,[keyBindings],line180
217
235
  _translate("Coder: indent code by one level (4 spaces)")
218
236
 
219
- # baseNoArch.spec,[keyBindings],line169
237
+ # baseNoArch.spec,[keyBindings],line182
220
238
  _translate("Coder: reduce indentation by one level (4 spaces)")
221
239
 
222
- # baseNoArch.spec,[keyBindings],line172
240
+ # baseNoArch.spec,[keyBindings],line184
223
241
  _translate("Coder: indent to fit python syntax")
224
242
 
225
- # baseNoArch.spec,[keyBindings],line174
243
+ # baseNoArch.spec,[keyBindings],line187
226
244
  _translate("Coder: find")
227
245
 
228
- # baseNoArch.spec,[keyBindings],line176
246
+ # baseNoArch.spec,[keyBindings],line189
229
247
  _translate("Coder: find again")
230
248
 
231
- # baseNoArch.spec,[keyBindings],line178
249
+ # baseNoArch.spec,[keyBindings],line191
232
250
  _translate("Coder: undo")
233
251
 
234
- # baseNoArch.spec,[keyBindings],line180
252
+ # baseNoArch.spec,[keyBindings],line193
235
253
  _translate("Coder: redo")
236
254
 
237
- # baseNoArch.spec,[keyBindings],line182
255
+ # baseNoArch.spec,[keyBindings],line195
238
256
  _translate("Coder: add a # to the start of the line(s)")
239
257
 
240
- # baseNoArch.spec,[keyBindings],line184
258
+ # baseNoArch.spec,[keyBindings],line197
241
259
  _translate("Coder: remove # from start of line(s)")
242
260
 
243
- # baseNoArch.spec,[keyBindings],line186
261
+ # baseNoArch.spec,[keyBindings],line199
244
262
  _translate("Coder: add or remove # from start of line(s)")
245
263
 
246
- # baseNoArch.spec,[keyBindings],line188
264
+ # baseNoArch.spec,[keyBindings],line201
247
265
  _translate("Coder: fold this block of code")
248
266
 
249
- # baseNoArch.spec,[keyBindings],line190
267
+ # baseNoArch.spec,[keyBindings],line203
250
268
  _translate("Coder: increase font size this block of code")
251
269
 
252
- # baseNoArch.spec,[keyBindings],line192
270
+ # baseNoArch.spec,[keyBindings],line205
253
271
  _translate("Coder: decrease font size this block of code")
254
272
 
255
- # baseNoArch.spec,[keyBindings],line194
273
+ # baseNoArch.spec,[keyBindings],line207
256
274
  _translate("Coder: check for basic syntax errors")
257
275
 
258
- # baseNoArch.spec,[keyBindings],line196
276
+ # baseNoArch.spec,[keyBindings],line209
259
277
  _translate(
260
278
  "convert a Builder .psyexp script into a python script and open it in the Coder")
261
279
 
262
- # baseNoArch.spec,[keyBindings],line198
280
+ # baseNoArch.spec,[keyBindings],line211
263
281
  _translate("launch a script, Builder or Coder, or run unit-tests")
264
282
 
265
- # baseNoArch.spec,[keyBindings],line200
283
+ # baseNoArch.spec,[keyBindings],line213
266
284
  _translate("attempt to interrupt and halt a running script")
267
285
 
268
- # baseNoArch.spec,[keyBindings],line202
286
+ # baseNoArch.spec,[keyBindings],line215
269
287
  _translate("Coder: show / hide white-space dots")
270
288
 
271
- # baseNoArch.spec,[keyBindings],line204
289
+ # baseNoArch.spec,[keyBindings],line217
272
290
  _translate("Coder: show / hide end of line characters")
273
291
 
274
- # baseNoArch.spec,[keyBindings],line207
292
+ # baseNoArch.spec,[keyBindings],line219
275
293
  _translate("Coder: show / hide indentation level lines")
276
294
 
277
- # baseNoArch.spec,[keyBindings],line209
295
+ # baseNoArch.spec,[keyBindings],line222
278
296
  _translate("Builder: create a new routine")
279
297
 
280
- # baseNoArch.spec,[keyBindings],line211
298
+ # baseNoArch.spec,[keyBindings],line224
281
299
  _translate("Builder: copy an existing routine")
282
300
 
283
- # baseNoArch.spec,[keyBindings],line215
301
+ # baseNoArch.spec,[keyBindings],line226
284
302
  _translate("Builder: paste the copied routine")
285
303
 
286
- # baseNoArch.spec,[keyBindings],line218
304
+ # baseNoArch.spec,[keyBindings],line230
287
305
  _translate("Builder: paste the copied component")
288
306
 
289
- # baseNoArch.spec,[keyBindings],line220
307
+ # baseNoArch.spec,[keyBindings],line233
308
+ _translate("Builder: find")
309
+
310
+ # baseNoArch.spec,[keyBindings],line235
290
311
  _translate("Coder: show / hide the output panel")
291
312
 
292
- # baseNoArch.spec,[keyBindings],line222
313
+ # baseNoArch.spec,[keyBindings],line237
293
314
  _translate("Builder: rename an existing routine")
294
315
 
295
- # baseNoArch.spec,[keyBindings],line225
316
+ # baseNoArch.spec,[keyBindings],line240
296
317
  _translate("switch between windows")
297
318
 
298
- # baseNoArch.spec,[keyBindings],line227
319
+ # baseNoArch.spec,[keyBindings],line242
299
320
  _translate("increase display size in Flow")
300
321
 
301
- # baseNoArch.spec,[keyBindings],line229
322
+ # baseNoArch.spec,[keyBindings],line244
302
323
  _translate("decrease display size in Flow")
303
324
 
304
- # baseNoArch.spec,[keyBindings],line231
325
+ # baseNoArch.spec,[keyBindings],line246
305
326
  _translate("increase display size of Routines")
306
327
 
307
- # baseNoArch.spec,[keyBindings],line233
328
+ # baseNoArch.spec,[keyBindings],line248
308
329
  _translate("decrease display size of Routines")
309
330
 
310
- # baseNoArch.spec,[keyBindings],line235
331
+ # baseNoArch.spec,[keyBindings],line250
311
332
  _translate("show or hide the readme (info) for this experiment if possible")
312
333
 
313
- # baseNoArch.spec,[keyBindings],line237
334
+ # baseNoArch.spec,[keyBindings],line252
314
335
  _translate("Projects: Log in to pavlovia")
315
336
 
316
- # baseNoArch.spec,[keyBindings],line239
337
+ # baseNoArch.spec,[keyBindings],line254
317
338
  _translate("Projects: Log in to OSF")
318
339
 
319
- # baseNoArch.spec,[keyBindings],line241
340
+ # baseNoArch.spec,[keyBindings],line256
320
341
  _translate("Projects: Sync project")
321
342
 
322
- # baseNoArch.spec,[keyBindings],line243
343
+ # baseNoArch.spec,[keyBindings],line258
323
344
  _translate("Projects: Find projects")
324
345
 
325
- # baseNoArch.spec,[keyBindings],line245
346
+ # baseNoArch.spec,[keyBindings],line260
326
347
  _translate("Projects: Open project")
327
348
 
328
- # baseNoArch.spec,[keyBindings],line247
349
+ # baseNoArch.spec,[keyBindings],line262
329
350
  _translate("Projects: Create new project")
@@ -947,7 +947,7 @@ class FontManager():
947
947
  return False
948
948
  # If font is found, make glfont
949
949
  fontInfo = fontInfos[0]
950
- identifier = "{}_{}".format(str(fontInfo), size)
950
+ identifier = "{}_{}_{}".format(str(fontInfo), size, lineSpacing)
951
951
  glFont = self._glFonts.get(identifier)
952
952
  if glFont is None:
953
953
  glFont = GLFont(fontInfo.path, size, lineSpacing=lineSpacing)
@@ -33,7 +33,7 @@ _remoteVersionsCache = []
33
33
  versionMap = OrderedDict({
34
34
  Version('2.7'): (Version("0.0"), Version("2020.2.0")),
35
35
  Version('3.6'): (Version("1.9"), Version("2022.1.0")),
36
- Version('3.8'): (Version("2022.1.0"), Version("2024.1.0")),
36
+ Version('3.8'): (Version("2022.1.0"), None),
37
37
  Version('3.10'): (Version("2023.2.0"), None),
38
38
  })
39
39
  # fill out intermediate versions
psychopy/visual/noise.py CHANGED
@@ -30,5 +30,14 @@ except (ModuleNotFoundError, ImportError):
30
30
  "Support for `NoiseStim` is not available this session. Please install "
31
31
  "`psychopy-visionscience` and restart the session to enable support.")
32
32
 
33
+
34
+ class NoiseStim:
35
+ """
36
+ `psychopy.visual.NoiseStim` is now located within the `psychopy-visionscience` plugin. You
37
+ can find the documentation for it `here
38
+ <https://psychopy.github.io/psychopy-visionscience/coder/NoiseStim>`_
39
+ """
40
+
41
+
33
42
  if __name__ == "__main__":
34
43
  pass
psychopy/visual/radial.py CHANGED
@@ -26,6 +26,14 @@ except (ModuleNotFoundError, ImportError):
26
26
  "Support for `RadialStim` is not available this session. Please install "
27
27
  "`psychopy-visionscience` and restart the session to enable support.")
28
28
 
29
+
30
+ class RadialStim:
31
+ """
32
+ `psychopy.visual.RadialStim` is now located within the `psychopy-visionscience` plugin. You
33
+ can find the documentation for it `here <https://psychopy.github.io/psychopy-visionscience/coder/RadialStim>`_
34
+ """
35
+
36
+
29
37
  if __name__ == "__main__":
30
38
  pass
31
39
 
@@ -25,5 +25,14 @@ except (ModuleNotFoundError, ImportError):
25
25
  "install `psychopy-visionscience` and restart the session to enable "
26
26
  "support.")
27
27
 
28
+
29
+ class EnvelopeGrating:
30
+ """
31
+ `psychopy.visual.EnvelopeGrating` is now located within the `psychopy-visionscience` plugin. You
32
+ can find the documentation for it
33
+ `here <https://psychopy.github.io/psychopy-visionscience/coder/EnvelopeGrating>`_
34
+ """
35
+
36
+
28
37
  if __name__ == "__main__":
29
38
  pass
@@ -79,7 +79,7 @@ class TextBox2(BaseVisualStim, DraggingMixin, ContainerMixin, ColorMixin):
79
79
  bold=False,
80
80
  italic=False,
81
81
  placeholder="Type here...",
82
- lineSpacing=None,
82
+ lineSpacing=1.0,
83
83
  letterSpacing=None,
84
84
  padding=None, # gap between box and text
85
85
  speechPoint=None,
@@ -190,10 +190,11 @@ class TextBox2(BaseVisualStim, DraggingMixin, ContainerMixin, ColorMixin):
190
190
  self._pixelScaling = self.letterHeightPix / self.letterHeight
191
191
  self.bold = bold
192
192
  self.italic = italic
193
+ if lineSpacing is None:
194
+ lineSpacing = 1.0
195
+ self.lineSpacing = lineSpacing
193
196
  self.glFont = None # will be set by the self.font attribute setter
194
197
  self.font = font
195
- if lineSpacing is not None:
196
- self.lineSpacing = lineSpacing
197
198
  self.letterSpacing = letterSpacing
198
199
  # If font not found, default to Open Sans Regular and raise alert
199
200
  if not self.glFont:
@@ -353,7 +354,7 @@ class TextBox2(BaseVisualStim, DraggingMixin, ContainerMixin, ColorMixin):
353
354
  self.caret.color = self._foreColor
354
355
 
355
356
  @attributeSetter
356
- def font(self, fontName, italic=False, bold=False):
357
+ def font(self, fontName):
357
358
  if isinstance(fontName, GLFont):
358
359
  self.glFont = fontName
359
360
  self.__dict__['font'] = fontName.name
@@ -362,7 +363,9 @@ class TextBox2(BaseVisualStim, DraggingMixin, ContainerMixin, ColorMixin):
362
363
  self.glFont = allFonts.getFont(
363
364
  fontName,
364
365
  size=self.letterHeightPix,
365
- bold=self.bold, italic=self.italic)
366
+ bold=self.bold,
367
+ italic=self.italic,
368
+ lineSpacing=self.lineSpacing)
366
369
 
367
370
  @attributeSetter
368
371
  def overflow(self, value):
@@ -610,19 +613,6 @@ class TextBox2(BaseVisualStim, DraggingMixin, ContainerMixin, ColorMixin):
610
613
  """
611
614
  return self._letterHeight.pix[1]
612
615
 
613
- @property
614
- def lineSpacing(self):
615
- if hasattr(self.glFont, "lineSpacing"):
616
- return self.glFont.lineSpacing
617
-
618
- @lineSpacing.setter
619
- def lineSpacing(self, value):
620
- if hasattr(self, "_placeholder"):
621
- self._placeholder.lineSpacing = value
622
- if hasattr(self.glFont, "lineSpacing"):
623
- self.glFont.lineSpacing = value
624
- self._needVertexUpdate = True
625
-
626
616
  @attributeSetter
627
617
  def letterSpacing(self, value):
628
618
  """
@@ -930,6 +920,9 @@ class TextBox2(BaseVisualStim, DraggingMixin, ContainerMixin, ColorMixin):
930
920
 
931
921
  # are we wrapping the line?
932
922
  if charcode == "\n":
923
+ # check if we have stored the top/bottom of the previous line yet
924
+ if lineN + 1 > len(_lineBottoms):
925
+ _lineBottoms.append(current[1])
933
926
  lineWPix = current[0]
934
927
  current[0] = 0
935
928
  current[1] -= font.height
@@ -1628,6 +1621,8 @@ class Caret(ColorMixin):
1628
1621
  self.index = len(self.textbox._lineNs)
1629
1622
  # Get line of index
1630
1623
  if self.index >= len(self.textbox._lineNs):
1624
+ if len(self.textbox._lineBottoms) - 1 > self.textbox._lineNs[-1]:
1625
+ return len(self.textbox._lineBottoms) - 1
1631
1626
  return self.textbox._lineNs[-1]
1632
1627
  else:
1633
1628
  return self.textbox._lineNs[self.index]
@@ -1718,9 +1713,12 @@ class Caret(ColorMixin):
1718
1713
  else:
1719
1714
  # Otherwise, get caret position from character vertices
1720
1715
  if self.index >= len(textbox._lineNs):
1721
- # If the caret is after the last char, position it to the right
1722
- chrVerts = textbox._vertices.pix[range((ii-1) * 4, (ii-1) * 4 + 4)]
1723
- x = chrVerts[2, 0] # x-coord of left edge (of final char)
1716
+ if len(textbox._lineBottoms) - 1 > textbox._lineNs[-1]:
1717
+ x = textbox._lineWidths[len(textbox._lineBottoms) - 1]
1718
+ else:
1719
+ # If the caret is after the last char, position it to the right
1720
+ chrVerts = textbox._vertices.pix[range((ii-1) * 4, (ii-1) * 4 + 4)]
1721
+ x = chrVerts[2, 0] # x-coord of left edge (of final char)
1724
1722
  else:
1725
1723
  # Otherwise, position it to the left
1726
1724
  chrVerts = textbox._vertices.pix[range(ii * 4, ii * 4 + 4)]