Difference between revisions of "Help:LimeSurvey/Demo Psychopy"
Jump to navigation
Jump to search
(Created page with "== Demo entering a survey after a Psychopy experiment == Make sure your survey has a token table which contains the participant ID's: <nowiki> participantID = 2 url = "https...") |
|||
Line 2: | Line 2: | ||
Make sure your survey has a token table which contains the participant ID's: | Make sure your survey has a token table which contains the participant ID's: | ||
+ | |||
+ | [[File:Token.png|thumbnail]] | ||
+ | |||
+ | |||
<nowiki> | <nowiki> | ||
participantID = 2 | participantID = 2 | ||
url = "https://survey.socsci.ru.nl/index.php/survey/index/sid/459278/newtest/Y/lang/en?token={:d}".format(participantID) | url = "https://survey.socsci.ru.nl/index.php/survey/index/sid/459278/newtest/Y/lang/en?token={:d}".format(participantID) | ||
+ | import os | ||
if sys.platform == 'win32': | if sys.platform == 'win32': | ||
− | + | # windows has no command to start the default browser, hope this one exists | |
+ | os.system("chrome.exe "+url) | ||
else: | else: | ||
− | + | # this always selects the default browser | |
+ | os.system("xdg-open "+url) | ||
</nowiki> | </nowiki> |
Revision as of 14:04, 1 February 2015
Demo entering a survey after a Psychopy experiment
Make sure your survey has a token table which contains the participant ID's:
participantID = 2 url = "https://survey.socsci.ru.nl/index.php/survey/index/sid/459278/newtest/Y/lang/en?token={:d}".format(participantID) import os if sys.platform == 'win32': # windows has no command to start the default browser, hope this one exists os.system("chrome.exe "+url) else: # this always selects the default browser os.system("xdg-open "+url)