Skip to content

Commit b2913c1

Browse files
authored
BF Get textstim_vs_textbox demo running again
As reported by @alexholcombe here: https://discourse.psychopy.org/t/textstim-vs-textbox-py-demo-not-working/2055 this demo had stopped working. Seems to be resolved by explicitly importing the textbox class. Perhaps there is a cleaner way to fix this?
1 parent 5029631 commit b2913c1

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

psychopy/demos/coder/stimuli/textBoxStim/textstim_vs_textbox.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
import string
2020
import random
2121
from psychopy import visual, core, event
22+
from psychopy.visual import textbox
2223
from psychopy.iohub.util import NumPyRingBuffer
2324
import pyglet.gl as gl
2425

@@ -81,7 +82,7 @@ def updateStimText(stim,text=None):
8182
)
8283

8384
# Find a font that is available on the system.
84-
fm=visual.textbox.getFontManager()
85+
fm = textbox.getFontManager()
8586
available_font_names=fm.getFontFamilyStyles()
8687
prefered_fonts=[fn for fn,fs in available_font_names if fn in [
8788
'Courier New',
@@ -218,4 +219,4 @@ def updateStimText(stim,text=None):
218219
print
219220
print '---------------------------------------'
220221

221-
core.quit()
222+
core.quit()

0 commit comments

Comments
 (0)