Ejemplo n.º 1
0
def launch_server():
    ''' Add commands for testing, etc.. '''
    parser = argparse.ArgumentParser(
        description='Launch psiTurk experiment webserver process on the\
        host/port defined in config.txt.')

    # Optional flags
    parser.add_argument('-v',
                        '--version',
                        help='Print version number.',
                        action="store_true")
    args = parser.parse_args()

    # If requested version just print and quite
    if args.version:
        print version_number
    else:
        import psiturk.experiment_server as es
        es.launch()
Ejemplo n.º 2
0
def launch_server():
    ''' Add commands for testing, etc.. '''
    parser = argparse.ArgumentParser(
        description='Launch psiTurk experiment webserver process on the\
        host/port defined in config.txt.'
    )

    # Optional flags
    parser.add_argument(
        '-v', '--version', help='Print version number.', action="store_true"
    )
    args = parser.parse_args()

    # If requested version just print and quite
    if args.version:
        print version_number
    else:
        import psiturk.experiment_server as es
        es.launch()
Ejemplo n.º 3
0
# Important: Must be run first to copy environment vars to config
import env_to_config
env_to_config.copy_env_to_config()

# Now the code

import configparser
import psiturk.experiment_server as exp

config = configparser.ConfigParser()
config.read('config.txt')
sp = config['Server Parameters']
print('Server listening on ' + sp['host'] + ':' + sp['port'])

exp.launch()
Ejemplo n.º 4
0
import psiturk.experiment_server as exp
exp.launch()