annotate example/persona.py @ 23:21124b238feb

stub persona/browserid example
author Jeff Hammel <jhammel@mozilla.com>
date Thu, 26 Dec 2013 20:04:08 -0800
parents
children bdb005ae848b
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
23
21124b238feb stub persona/browserid example
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
1 #!/usr/bin/env python
21124b238feb stub persona/browserid example
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
2
21124b238feb stub persona/browserid example
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
3 import optparse
21124b238feb stub persona/browserid example
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
4 import os
21124b238feb stub persona/browserid example
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
5 import sys
21124b238feb stub persona/browserid example
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
6
21124b238feb stub persona/browserid example
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
7 """
21124b238feb stub persona/browserid example
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
8 test Mozilla persona auth
21124b238feb stub persona/browserid example
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
9
21124b238feb stub persona/browserid example
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
10 https://login.persona.org/about
21124b238feb stub persona/browserid example
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
11 """
21124b238feb stub persona/browserid example
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
12
21124b238feb stub persona/browserid example
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
13 here = os.path.dirname(os.path.realpath(__file__))
21124b238feb stub persona/browserid example
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
14 page = os.path.join(here, 'persona.html')
21124b238feb stub persona/browserid example
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
15
21124b238feb stub persona/browserid example
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
16 def main(args=sys.argv[1:]):
21124b238feb stub persona/browserid example
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
17
21124b238feb stub persona/browserid example
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
18 usage = '%prog [options]'
21124b238feb stub persona/browserid example
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
19 parser = optparse.OptionParser(usage=usage, description=__doc__)
21124b238feb stub persona/browserid example
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
20 parser
21124b238feb stub persona/browserid example
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
21 options, args = parser.parse_args(args)
21124b238feb stub persona/browserid example
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
22
21124b238feb stub persona/browserid example
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
23 if __name__ == '__main__':
21124b238feb stub persona/browserid example
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
24 main()