def displayhtml(public_key, use_ssl=False, error=None):
 error_param = ''
 if error:
  error_param = ('&error=%s' % error)
 if use_ssl:
  server = API_SSL_SERVER
 else:
  server = API_SERVER
 return ('<script type="text/javascript" src="%(ApiServer)s/challenge?k=%(PublicKey)s%(ErrorParam)s"></script>\n\n<noscript>\n  <iframe src="%(ApiServer)s/noscript?k=%(PublicKey)s%(ErrorParam)s" height="300" width="500" frameborder="0"></iframe><br />\n  <textarea name="recaptcha_challenge_field" rows="3" cols="40"></textarea>\n  <input type=\'hidden\' name=\'recaptcha_response_field\' value=\'manual_challenge\' />\n</noscript>\n' % {'ApiServer': server, 'PublicKey': public_key, 'ErrorParam': error_param})

def displayhtml ( public_key , use_ssl = False , error = None ) : error_param = '' if error : error_param = ( '&error=%s' % error ) if use_ssl : server = API_SSL_SERVER else : server = API_SERVER return ( '<script type="text/javascript" src="%(ApiServer)s/challenge?k=%(PublicKey)s%(ErrorParam)s"></script>\n\n<noscript>\n  <iframe src="%(ApiServer)s/noscript?k=%(PublicKey)s%(ErrorParam)s" height="300" width="500" frameborder="0"></iframe><br />\n  <textarea name="recaptcha_challenge_field" rows="3" cols="40"></textarea>\n  <input type=\'hidden\' name=\'recaptcha_response_field\' value=\'manual_challenge\' />\n</noscript>\n' % { 'ApiServer' : server , 'PublicKey' : public_key , 'ErrorParam' : error_param } )
gets the html to display for recaptcha public_key -- the public api key use_ssl -- should the request be sent over ssl? error -- an error message to display .