Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
29 lines (26 sloc) 1.01 KB
# password.py: Super simple, reads username/password/api key from a file
#
# Copyright (c) 2009 Jay Parlar <parlar@gmail.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import sys
def get_username_password_key(filename):
f = open(filename)
lines = f.readlines()
username = lines[0].strip()
password = lines[1].strip()
key = "abcd"
if len(lines) ==3:
key = lines[2].strip()
return username, password, key