Difference between revisions of "Meta:Samples/Software"

From TSG Doc
Jump to navigation Jump to search
Line 35: Line 35:
  
 
<syntaxhighlight lang="python" line>
 
<syntaxhighlight lang="python" line>
#!/usr/bin/env python
+
def main():
 
+
    """Lots of useless code here."""
# import psychopy and rusocsci
+
    if True:
from psychopy import core, visual
+
        print "Hello, world!"
from rusocsci import buttonbox
+
        return None # Explicitly returning None!
 
+
    else:
## Setup Section
+
        raise Exception
win = visual.Window(monitor="testMonitor")
+
bb = buttonbox.Buttonbox()
+
if __name__ == "__main__":
text = visual.TextStim(win, "Press a button on the buttonbox")
+
    main()
 
 
## 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 12:03, 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

  1. Step 1
  2. Step 2
  3. Step 3


Configuration

General settings.


Usage

Templates and how-to's go here.


Template

 1def main():
 2    """Lots of useless code here."""
 3    if True:
 4        print "Hello, world!"
 5        return None # Explicitly returning None!
 6    else:
 7        raise Exception
 8 
 9if __name__ == "__main__":
10    main()

See Also


References

  1. Some reference