Skip to content

Instantly share code, notes, and snippets.

@longears
longears / gist:3813110
Created October 1, 2012 17:15
authenticating with a Tent server
# This is a demo of how to authenticate with a Tent server
# Code taken from https://github.com/longears/python-tent-client
# but shortened and cleaned up.
# It won't actually run as-is because I took out a lot of the
# other code in __init__.
# It uses an ugly workflow requiring the user to cut and paste
# parameters from the browser URL bar because we don't have
# a webserver running that the server can use to give us
# auth keys directly.
@longears
longears / gist:1667108
Created January 24, 2012 01:07
using command line arguments in python
# example of how to use command-line arguments
import sys
#===================================================
# COMMAND LINE HANDLING
# this is the message the user will get if they don't supply the right number
# of args at the command line