#!/usr/bin/python

# Generates a random password that is easy to type on a standard
# cellphone keyboard. Intended for passwords that need to be entered
# manually once, so a longer default password is generated to help
# add back in lost randomness.

from random import Random

class T9Password:
	chars = "adgjmptw1234567890"
	r = Random()
	def gen_password(self, length=8):
		pw = ""
		for i in range(0,length):
			pw = pw + self.r.choice(self.chars)

		return pw

t = T9Password()
print t.gen_password()
