Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

29 lines (23 sloc) 0.894 kb
import os
import functools
live_connection = False
mturk_host = 'mechanicalturk.sandbox.amazonaws.com'
external_url = 'http://www.example.com/'
SetHostMTurkConnection = None
def config_environment():
global SetHostMTurkConnection
try:
local = os.path.join(os.path.dirname(__file__), 'local.py')
execfile(local)
except:
pass
if live_connection:
#TODO: you must set the auth credentials to something valid
from boto.mturk.connection import MTurkConnection
else:
# Here the credentials must be set, but it doesn't matter what
# they're set to.
os.environ.setdefault('AWS_ACCESS_KEY_ID', 'foo')
os.environ.setdefault('AWS_SECRET_ACCESS_KEY', 'bar')
from mocks import MTurkConnection
SetHostMTurkConnection = functools.partial(MTurkConnection, host=mturk_host)
Jump to Line
Something went wrong with that request. Please try again.