import psychopy.visual
win = psychopy.visual.Window(
size=[400, 400],
units="pix",
fullscr=False,
color=[1, 1, 1]
)
text = psychopy.visual.TextStim(win=win, text="Hello, world!")
text.draw()
win.flip()
win.close()