Meta:Samples/Software: Difference between revisions

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 11: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

def main():
    """Lots of useless code here."""
    if True:
        print "Hello, world!"
        return None # Explicitly returning None!
    else:
        raise Exception
 
if __name__ == "__main__":
    main()

See Also


References

  1. ↑ Some reference