Difference between revisions of "Meta:Samples/Software"
Jump to navigation
Jump to search
Line 35: | Line 35: | ||
<syntaxhighlight lang="html4strict" line> | <syntaxhighlight lang="html4strict" line> | ||
− | + | #!/usr/bin/env python | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | # import psychopy and rusocsci | |
− | + | from psychopy import core, visual | |
− | + | from rusocsci import buttonbox | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | ## Setup Section | |
− | + | win = visual.Window(monitor="testMonitor") | |
− | + | bb = buttonbox.Buttonbox() | |
− | + | text = visual.TextStim(win, "Press a button on the buttonbox") | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
+ | ## Experiment Section | ||
+ | # show text | ||
+ | text.draw() | ||
+ | win.flip() | ||
+ | # wait for response | ||
+ | b = bb.waitButtons() | ||
+ | # show response | ||
+ | text.setText("you pressed: {}".format(b)) | ||
+ | text.draw() | ||
+ | win.flip() | ||
+ | core.wait(5) | ||
+ | ## Cleanup Section | ||
+ | core.quit() | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Revision as of 11:45, 28 April 2015
Introduction.
Features
This software is made to do this, it has these unique selling points:
- Feature 1[1]
- Feature 2
- Feature 3
Requirements
- Microsoft Windows XP or later.
- Intel Core 2 Duo E8600 or higher.
- Python
Installation
Windows 7 64-bit
- Step 1
- Step 2
- Step 3
Configuration
General settings.
Usage
Templates and how-to's go here.
Template
1#!/usr/bin/env python
2
3# import psychopy and rusocsci
4from psychopy import core, visual
5from rusocsci import buttonbox
6
7## Setup Section
8win = visual.Window(monitor="testMonitor")
9bb = buttonbox.Buttonbox()
10text = visual.TextStim(win, "Press a button on the buttonbox")
11
12## Experiment Section
13# show text
14text.draw()
15win.flip()
16# wait for response
17b = bb.waitButtons()
18# show response
19text.setText("you pressed: {}".format(b))
20text.draw()
21win.flip()
22core.wait(5)
23
24## Cleanup Section
25core.quit()
See Also
References
- ↑ Some reference