X-Git-Url: https://jfr.im/git/z_archive/twitter.git/blobdiff_plain/69e1f98ebc48d06391eeb5e3368e947d1176f8c7..1b31d642c54e09dc8f8a1ca49c934d6990f2ab33:/twitter/oauth.py?ds=inline diff --git a/twitter/oauth.py b/twitter/oauth.py index a839bb6..75ac3e3 100644 --- a/twitter/oauth.py +++ b/twitter/oauth.py @@ -8,6 +8,17 @@ import hashlib import hmac +def write_token_file(filename, oauth_token, oauth_token_secret): + oauth_file = open(filename, 'w') + print >> oauth_file, oauth_token + print >> oauth_file, oauth_token_secret + oauth_file.close() + +def read_token_file(filename): + f = open(filename) + return f.readline().strip(), f.readline().strip() + + class OAuth(Auth): """ An OAuth authenticator.