1 |
douglas |
587 |
#!/usr/bin/env python |
2 |
|
|
# CCS Computer Science |
3 |
douglas |
592 |
# Change Full Name |
4 |
douglas |
587 |
# |
5 |
|
|
# Douglas Thrift |
6 |
|
|
# |
7 |
|
|
# $Id$ |
8 |
|
|
|
9 |
douglas |
591 |
import admin |
10 |
douglas |
590 |
import common |
11 |
douglas |
587 |
import re |
12 |
|
|
|
13 |
|
|
if __name__ == '__main__': |
14 |
douglas |
591 |
user = common.user() |
15 |
|
|
|
16 |
douglas |
587 |
try: |
17 |
douglas |
592 |
name = None |
18 |
|
|
string = re.compile('^[^:]+$') |
19 |
douglas |
587 |
|
20 |
douglas |
592 |
while name is None or string.match(name) is None: |
21 |
|
|
name = raw_input('Full Name: ') |
22 |
douglas |
587 |
|
23 |
douglas |
591 |
if admin.master(): |
24 |
douglas |
592 |
admin.chfn(user, name) |
25 |
|
|
|
26 |
|
|
admin.run(common.chfn_all(user, name)) |
27 |
douglas |
587 |
except (EOFError, KeyboardInterrupt): |
28 |
douglas |
592 |
admin.eof() |