Python 带格式文本的MTurk答案

Python 带格式文本的MTurk答案,python,boto,mechanicalturk,Python,Boto,Mechanicalturk,我有以下当前代码来创建答案选择: q1_answer_options=[('No URL exists', 0), ('http://www.imdb.com/name/nm2271332/', 1), ('http://www.imdb.com/title/tt0460987/', 2), ('http://www.imdb.com/title/tt1450653/', 3), ('http://www.imdb.com/title/tt1438289/', 4)] fta1 = Selec

我有以下当前代码来创建答案选择:

q1_answer_options=[('No URL exists', 0), ('http://www.imdb.com/name/nm2271332/', 1), ('http://www.imdb.com/title/tt0460987/', 2), ('http://www.imdb.com/title/tt1450653/', 3),  ('http://www.imdb.com/title/tt1438289/', 4)]
fta1 = SelectionAnswer(style='radiobutton', selections=q1_answer_options)
例如:

# Currently is this
<Selection>
  <SelectionIdentifier>0</SelectionIdentifier>
  <Text>No URL Exists</Text>
</Selection>

# I want it to be this
<Selection>
  <SelectionIdentifier>0</SelectionIdentifier>
  <FormattedContent><![CDATA[No URL Exists]]></FormattedContent>
</Selection>

如何使用boto将答案选项转换为格式化文本?

以下是如何自定义CreateQualificationType方法的任何部分:

conn = MTurkConnection(self.aws_access_key, self.aws_secret_key, host=self.host)

params = dict()
params['Operation'] = 'CreateQualificationType'
params['QualificationTypeStatus'] = 'Active'
params['Name'] = name
params['TestDurationInSeconds'] = test_duration
params['RetryDelayInSeconds'] = retry_delay
params['Keywords'] = keywords
params['Description'] = description
params['Test'] = test_as_xml
params['AnswerKey'] = answer_key_as_xml


response = m.conn.make_request(action=None, params=params, path='/', verb='POST)
m.conn._process_response(response) # this is the response and will tell if if there are any errors