Changes

Jump to navigation Jump to search
110 bytes added ,  16:54, 29 April 2015
Line 175: Line 175:  
Example using buttons from the buttonbox in Python:
 
Example using buttons from the buttonbox in Python:
   −
<nowiki>
+
<syntaxhighlight lang="python" line>
 
#!/usr/bin/env python
 
#!/usr/bin/env python
   Line 188: Line 188:     
# print the button pressed
 
# print the button pressed
print("b: {}".format(b)) </nowiki>
+
print("b: {}".format(b))  
 +
</syntaxhighlight>
    
Example using markers with the buttonbox in Python:
 
Example using markers with the buttonbox in Python:
   −
<nowiki>
+
<syntaxhighlight lang="python" line>
 
#!/usr/bin/env python
 
#!/usr/bin/env python
   Line 202: Line 203:     
# wait for a single button press
 
# wait for a single button press
bb.sendMarker(val=100)    #This is your marker code, range code 1-255 </nowiki>
+
bb.sendMarker(val=100)    #This is your marker code, range code 1-255  
 +
</syntaxhighlight>
    
<br/>Example using the Buttonbox in PsychoPy:
 
<br/>Example using the Buttonbox in PsychoPy:
   −
<nowiki>
+
<syntaxhighlight lang="python" line>
 
#!/usr/bin/env python
 
#!/usr/bin/env python
   Line 231: Line 233:     
## Cleanup Section
 
## Cleanup Section
core.quit() </nowiki>
+
core.quit()
 +
</syntaxhighlight>
    
For more documentation click here: http://pythonhosted.org//RuSocSci/index.html
 
For more documentation click here: http://pythonhosted.org//RuSocSci/index.html

Navigation menu