author | Nishanth Amuluru <nishanth@fossee.in> |
Fri, 07 Jan 2011 08:29:21 +0530 | |
changeset 13 | 1773b48559e1 |
parent 12 | f4d062fb5f05 |
child 15 | beb830b0e744 |
permissions | -rw-r--r-- |
13
1773b48559e1
Added make_key to utils
Nishanth Amuluru <nishanth@fossee.in>
parents:
12
diff
changeset
|
1 |
import string,random |
1773b48559e1
Added make_key to utils
Nishanth Amuluru <nishanth@fossee.in>
parents:
12
diff
changeset
|
2 |
|
1773b48559e1
Added make_key to utils
Nishanth Amuluru <nishanth@fossee.in>
parents:
12
diff
changeset
|
3 |
def make_key(): |
1773b48559e1
Added make_key to utils
Nishanth Amuluru <nishanth@fossee.in>
parents:
12
diff
changeset
|
4 |
""" return a 10 character random key. |
1773b48559e1
Added make_key to utils
Nishanth Amuluru <nishanth@fossee.in>
parents:
12
diff
changeset
|
5 |
""" |
1773b48559e1
Added make_key to utils
Nishanth Amuluru <nishanth@fossee.in>
parents:
12
diff
changeset
|
6 |
|
1773b48559e1
Added make_key to utils
Nishanth Amuluru <nishanth@fossee.in>
parents:
12
diff
changeset
|
7 |
return ''.join([ random.choice(string.uppercase+string.digits) for i in range(10)]) |
1773b48559e1
Added make_key to utils
Nishanth Amuluru <nishanth@fossee.in>
parents:
12
diff
changeset
|
8 |