golden hour
/opt/alt/python27/lib64/python2.7
⬆️ Go Up
Upload
File/Folder
Size
Actions
BaseHTTPServer.py
22.21 KB
Del
OK
BaseHTTPServer.pyc
21.47 KB
Del
OK
BaseHTTPServer.pyo
21.47 KB
Del
OK
Bastion.py
5.61 KB
Del
OK
Bastion.pyc
6.69 KB
Del
OK
Bastion.pyo
6.69 KB
Del
OK
CGIHTTPServer.py
12.78 KB
Del
OK
CGIHTTPServer.pyc
10.92 KB
Del
OK
CGIHTTPServer.pyo
10.92 KB
Del
OK
ConfigParser.py
27.1 KB
Del
OK
ConfigParser.pyc
25.37 KB
Del
OK
ConfigParser.pyo
25.37 KB
Del
OK
Cookie.py
25.92 KB
Del
OK
Cookie.pyc
22.61 KB
Del
OK
Cookie.pyo
22.61 KB
Del
OK
DocXMLRPCServer.py
10.52 KB
Del
OK
DocXMLRPCServer.pyc
10.2 KB
Del
OK
DocXMLRPCServer.pyo
10.09 KB
Del
OK
HTMLParser.py
16.77 KB
Del
OK
HTMLParser.pyc
13.81 KB
Del
OK
HTMLParser.pyo
13.51 KB
Del
OK
MimeWriter.py
6.33 KB
Del
OK
MimeWriter.pyc
7.31 KB
Del
OK
MimeWriter.pyo
7.31 KB
Del
OK
Queue.py
8.38 KB
Del
OK
Queue.pyc
9.56 KB
Del
OK
Queue.pyo
9.56 KB
Del
OK
SimpleHTTPServer.py
7.81 KB
Del
OK
SimpleHTTPServer.pyc
7.96 KB
Del
OK
SimpleHTTPServer.pyo
7.96 KB
Del
OK
SimpleXMLRPCServer.py
25.21 KB
Del
OK
SimpleXMLRPCServer.pyc
22.78 KB
Del
OK
SimpleXMLRPCServer.pyo
22.78 KB
Del
OK
SocketServer.py
23.39 KB
Del
OK
SocketServer.pyc
24.25 KB
Del
OK
SocketServer.pyo
24.25 KB
Del
OK
StringIO.py
10.41 KB
Del
OK
StringIO.pyc
11.45 KB
Del
OK
StringIO.pyo
11.45 KB
Del
OK
UserDict.py
6.89 KB
Del
OK
UserDict.pyc
10.05 KB
Del
OK
UserDict.pyo
10.05 KB
Del
OK
UserList.py
3.56 KB
Del
OK
UserList.pyc
6.85 KB
Del
OK
UserList.pyo
6.85 KB
Del
OK
UserString.py
9.47 KB
Del
OK
UserString.pyc
15.38 KB
Del
OK
UserString.pyo
15.38 KB
Del
OK
_LWPCookieJar.py
6.4 KB
Del
OK
_LWPCookieJar.pyc
5.38 KB
Del
OK
_LWPCookieJar.pyo
5.38 KB
Del
OK
_MozillaCookieJar.py
5.66 KB
Del
OK
_MozillaCookieJar.pyc
4.41 KB
Del
OK
_MozillaCookieJar.pyo
4.37 KB
Del
OK
__future__.py
4.28 KB
Del
OK
__future__.pyc
4.2 KB
Del
OK
__future__.pyo
4.2 KB
Del
OK
__phello__.foo.py
64 B
Del
OK
__phello__.foo.pyc
138 B
Del
OK
__phello__.foo.pyo
138 B
Del
OK
_abcoll.py
18.18 KB
Del
OK
_abcoll.pyc
26.4 KB
Del
OK
_abcoll.pyo
26.4 KB
Del
OK
_osx_support.py
18.65 KB
Del
OK
_osx_support.pyc
11.72 KB
Del
OK
_osx_support.pyo
11.72 KB
Del
OK
_pyio.py
68 KB
Del
OK
_pyio.pyc
65.41 KB
Del
OK
_pyio.pyo
65.41 KB
Del
OK
_strptime.py
20.24 KB
Del
OK
_strptime.pyc
15.07 KB
Del
OK
_strptime.pyo
15.07 KB
Del
OK
_sysconfigdata.py
18.9 KB
Del
OK
_sysconfigdata.pyc
22 KB
Del
OK
_sysconfigdata.pyo
22 KB
Del
OK
_threading_local.py
7.09 KB
Del
OK
_threading_local.pyc
6.34 KB
Del
OK
_threading_local.pyo
6.34 KB
Del
OK
_weakrefset.py
5.77 KB
Del
OK
_weakrefset.pyc
10.06 KB
Del
OK
_weakrefset.pyo
10.06 KB
Del
OK
abc.py
6.98 KB
Del
OK
abc.pyc
6.14 KB
Del
OK
abc.pyo
6.08 KB
Del
OK
aifc.py
33.77 KB
Del
OK
aifc.pyc
30.67 KB
Del
OK
aifc.pyo
30.67 KB
Del
OK
antigravity.py
60 B
Del
OK
antigravity.pyc
216 B
Del
OK
antigravity.pyo
216 B
Del
OK
anydbm.py
2.6 KB
Del
OK
anydbm.pyc
2.77 KB
Del
OK
anydbm.pyo
2.77 KB
Del
OK
argparse.py
87.14 KB
Del
OK
argparse.pyc
64.83 KB
Del
OK
argparse.pyo
64.67 KB
Del
OK
ast.py
11.53 KB
Del
OK
ast.pyc
12.94 KB
Del
OK
ast.pyo
12.94 KB
Del
OK
asynchat.py
11.31 KB
Del
OK
asynchat.pyc
8.98 KB
Del
OK
asynchat.pyo
8.98 KB
Del
OK
asyncore.py
20.45 KB
Del
OK
asyncore.pyc
19.2 KB
Del
OK
asyncore.pyo
19.2 KB
Del
OK
atexit.py
1.67 KB
Del
OK
atexit.pyc
2.23 KB
Del
OK
atexit.pyo
2.23 KB
Del
OK
audiodev.py
7.42 KB
Del
OK
audiodev.pyc
8.61 KB
Del
OK
audiodev.pyo
8.61 KB
Del
OK
base64.py
11.54 KB
Del
OK
base64.pyc
11.26 KB
Del
OK
base64.pyo
11.26 KB
Del
OK
bdb.py
21.21 KB
Del
OK
bdb.pyc
19.43 KB
Del
OK
bdb.pyo
19.43 KB
Del
OK
binhex.py
14.35 KB
Del
OK
binhex.pyc
15.75 KB
Del
OK
binhex.pyo
15.75 KB
Del
OK
bisect.py
2.53 KB
Del
OK
bisect.pyc
3.06 KB
Del
OK
bisect.pyo
3.06 KB
Del
OK
bsddb
-
Del
OK
cProfile.py
6.43 KB
Del
OK
cProfile.pyc
6.42 KB
Del
OK
cProfile.pyo
6.42 KB
Del
OK
calendar.py
22.84 KB
Del
OK
calendar.pyc
28.26 KB
Del
OK
calendar.pyo
28.26 KB
Del
OK
cgi.py
34.97 KB
Del
OK
cgi.pyc
33.24 KB
Del
OK
cgi.pyo
33.24 KB
Del
OK
cgitb.py
11.89 KB
Del
OK
cgitb.pyc
12.08 KB
Del
OK
cgitb.pyo
12.08 KB
Del
OK
chunk.py
5.29 KB
Del
OK
chunk.pyc
5.61 KB
Del
OK
chunk.pyo
5.61 KB
Del
OK
cmd.py
14.67 KB
Del
OK
cmd.pyc
13.98 KB
Del
OK
cmd.pyo
13.98 KB
Del
OK
code.py
9.95 KB
Del
OK
code.pyc
10.29 KB
Del
OK
code.pyo
10.29 KB
Del
OK
codecs.py
35.3 KB
Del
OK
codecs.pyc
37.15 KB
Del
OK
codecs.pyo
37.15 KB
Del
OK
codeop.py
5.86 KB
Del
OK
codeop.pyc
6.57 KB
Del
OK
codeop.pyo
6.57 KB
Del
OK
collections.py
27.15 KB
Del
OK
collections.pyc
26.21 KB
Del
OK
collections.pyo
26.16 KB
Del
OK
colorsys.py
3.6 KB
Del
OK
colorsys.pyc
4 KB
Del
OK
colorsys.pyo
4 KB
Del
OK
commands.py
2.49 KB
Del
OK
commands.pyc
2.49 KB
Del
OK
commands.pyo
2.49 KB
Del
OK
compileall.py
7.58 KB
Del
OK
compileall.pyc
6.93 KB
Del
OK
compileall.pyo
6.93 KB
Del
OK
compiler
-
Del
OK
config
-
Del
OK
contextlib.py
4.32 KB
Del
OK
contextlib.pyc
4.5 KB
Del
OK
contextlib.pyo
4.5 KB
Del
OK
cookielib.py
63.95 KB
Del
OK
cookielib.pyc
54.67 KB
Del
OK
cookielib.pyo
54.49 KB
Del
OK
copy.py
11.26 KB
Del
OK
copy.pyc
12.21 KB
Del
OK
copy.pyo
12.13 KB
Del
OK
copy_reg.py
6.81 KB
Del
OK
copy_reg.pyc
5.19 KB
Del
OK
copy_reg.pyo
5.14 KB
Del
OK
crypt.py
2.24 KB
Del
OK
crypt.pyc
2.95 KB
Del
OK
crypt.pyo
2.95 KB
Del
OK
csv.py
16.32 KB
Del
OK
csv.pyc
13.56 KB
Del
OK
csv.pyo
13.56 KB
Del
OK
ctypes
-
Del
OK
curses
-
Del
OK
dbhash.py
498 B
Del
OK
dbhash.pyc
744 B
Del
OK
dbhash.pyo
744 B
Del
OK
decimal.py
216.73 KB
Del
OK
decimal.pyc
171.36 KB
Del
OK
decimal.pyo
171.36 KB
Del
OK
difflib.py
80.4 KB
Del
OK
difflib.pyc
61.13 KB
Del
OK
difflib.pyo
61.08 KB
Del
OK
dircache.py
1.1 KB
Del
OK
dircache.pyc
1.59 KB
Del
OK
dircache.pyo
1.59 KB
Del
OK
dis.py
6.35 KB
Del
OK
dis.pyc
6.18 KB
Del
OK
dis.pyo
6.18 KB
Del
OK
distutils
-
Del
OK
doctest.py
102.63 KB
Del
OK
doctest.pyc
83.21 KB
Del
OK
doctest.pyo
82.93 KB
Del
OK
dumbdbm.py
8.93 KB
Del
OK
dumbdbm.pyc
6.83 KB
Del
OK
dumbdbm.pyo
6.83 KB
Del
OK
dummy_thread.py
4.31 KB
Del
OK
dummy_thread.pyc
5.46 KB
Del
OK
dummy_thread.pyo
5.46 KB
Del
OK
dummy_threading.py
2.74 KB
Del
OK
dummy_threading.pyc
1.27 KB
Del
OK
dummy_threading.pyo
1.27 KB
Del
OK
email
-
Del
OK
encodings
-
Del
OK
ensurepip
-
Del
OK
filecmp.py
9.36 KB
Del
OK
filecmp.pyc
9.65 KB
Del
OK
filecmp.pyo
9.65 KB
Del
OK
fileinput.py
13.42 KB
Del
OK
fileinput.pyc
14.54 KB
Del
OK
fileinput.pyo
14.54 KB
Del
OK
fnmatch.py
3.24 KB
Del
OK
fnmatch.pyc
3.61 KB
Del
OK
fnmatch.pyo
3.61 KB
Del
OK
formatter.py
14.56 KB
Del
OK
formatter.pyc
19.71 KB
Del
OK
formatter.pyo
19.71 KB
Del
OK
fpformat.py
4.62 KB
Del
OK
fpformat.pyc
4.69 KB
Del
OK
fpformat.pyo
4.69 KB
Del
OK
fractions.py
21.87 KB
Del
OK
fractions.pyc
19.74 KB
Del
OK
fractions.pyo
19.74 KB
Del
OK
ftplib.py
37.3 KB
Del
OK
ftplib.pyc
34.82 KB
Del
OK
ftplib.pyo
34.82 KB
Del
OK
functools.py
4.69 KB
Del
OK
functools.pyc
6.85 KB
Del
OK
functools.pyo
6.85 KB
Del
OK
genericpath.py
3.13 KB
Del
OK
genericpath.pyc
3.57 KB
Del
OK
genericpath.pyo
3.57 KB
Del
OK
getopt.py
7.15 KB
Del
OK
getopt.pyc
6.63 KB
Del
OK
getopt.pyo
6.58 KB
Del
OK
getpass.py
5.43 KB
Del
OK
getpass.pyc
4.72 KB
Del
OK
getpass.pyo
4.72 KB
Del
OK
gettext.py
22.13 KB
Del
OK
gettext.pyc
18.17 KB
Del
OK
gettext.pyo
18.17 KB
Del
OK
glob.py
3.04 KB
Del
OK
glob.pyc
2.98 KB
Del
OK
glob.pyo
2.98 KB
Del
OK
gzip.py
18.58 KB
Del
OK
gzip.pyc
15.26 KB
Del
OK
gzip.pyo
15.26 KB
Del
OK
hashlib.py
7.66 KB
Del
OK
hashlib.pyc
6.86 KB
Del
OK
hashlib.pyo
6.86 KB
Del
OK
heapq.py
17.87 KB
Del
OK
heapq.pyc
14.45 KB
Del
OK
heapq.pyo
14.45 KB
Del
OK
hmac.py
4.48 KB
Del
OK
hmac.pyc
4.56 KB
Del
OK
hmac.pyo
4.56 KB
Del
OK
hotshot
-
Del
OK
htmlentitydefs.py
17.63 KB
Del
OK
htmlentitydefs.pyc
6.23 KB
Del
OK
htmlentitydefs.pyo
6.23 KB
Del
OK
htmllib.py
12.57 KB
Del
OK
htmllib.pyc
20.99 KB
Del
OK
htmllib.pyo
20.99 KB
Del
OK
httplib.py
51.07 KB
Del
OK
httplib.pyc
37.88 KB
Del
OK
httplib.pyo
37.7 KB
Del
OK
idlelib
-
Del
OK
ihooks.py
18.54 KB
Del
OK
ihooks.pyc
21.75 KB
Del
OK
ihooks.pyo
21.75 KB
Del
OK
imaplib.py
47.23 KB
Del
OK
imaplib.pyc
45.19 KB
Del
OK
imaplib.pyo
42.49 KB
Del
OK
imghdr.py
3.46 KB
Del
OK
imghdr.pyc
4.93 KB
Del
OK
imghdr.pyo
4.93 KB
Del
OK
importlib
-
Del
OK
imputil.py
25.16 KB
Del
OK
imputil.pyc
15.74 KB
Del
OK
imputil.pyo
15.57 KB
Del
OK
inspect.py
42 KB
Del
OK
inspect.pyc
40.16 KB
Del
OK
inspect.pyo
40.16 KB
Del
OK
io.py
3.24 KB
Del
OK
io.pyc
3.57 KB
Del
OK
io.pyo
3.57 KB
Del
OK
json
-
Del
OK
keyword.py
1.96 KB
Del
OK
keyword.pyc
2.08 KB
Del
OK
keyword.pyo
2.08 KB
Del
OK
lib-dynload
-
Del
OK
lib2to3
-
Del
OK
linecache.py
3.93 KB
Del
OK
linecache.pyc
3.27 KB
Del
OK
linecache.pyo
3.27 KB
Del
OK
locale.py
100.42 KB
Del
OK
locale.pyc
55.69 KB
Del
OK
locale.pyo
55.69 KB
Del
OK
logging
-
Del
OK
macpath.py
6.14 KB
Del
OK
macpath.pyc
7.74 KB
Del
OK
macpath.pyo
7.74 KB
Del
OK
macurl2path.py
2.67 KB
Del
OK
macurl2path.pyc
2.24 KB
Del
OK
macurl2path.pyo
2.24 KB
Del
OK
mailbox.py
79.34 KB
Del
OK
mailbox.pyc
77.7 KB
Del
OK
mailbox.pyo
77.65 KB
Del
OK
mailcap.py
7.25 KB
Del
OK
mailcap.pyc
7.08 KB
Del
OK
mailcap.pyo
7.08 KB
Del
OK
markupbase.py
14.3 KB
Del
OK
markupbase.pyc
9.27 KB
Del
OK
markupbase.pyo
9.07 KB
Del
OK
md5.py
358 B
Del
OK
md5.pyc
391 B
Del
OK
md5.pyo
391 B
Del
OK
mhlib.py
32.65 KB
Del
OK
mhlib.pyc
33.98 KB
Del
OK
mhlib.pyo
33.98 KB
Del
OK
mimetools.py
7 KB
Del
OK
mimetools.pyc
8.26 KB
Del
OK
mimetools.pyo
8.26 KB
Del
OK
mimetypes.py
20.54 KB
Del
OK
mimetypes.pyc
18.3 KB
Del
OK
mimetypes.pyo
18.3 KB
Del
OK
mimify.py
14.68 KB
Del
OK
mimify.pyc
11.91 KB
Del
OK
mimify.pyo
11.91 KB
Del
OK
modulefinder.py
23.89 KB
Del
OK
modulefinder.pyc
19.12 KB
Del
OK
modulefinder.pyo
19.04 KB
Del
OK
multifile.py
4.71 KB
Del
OK
multifile.pyc
5.48 KB
Del
OK
multifile.pyo
5.44 KB
Del
OK
multiprocessing
-
Del
OK
mutex.py
1.83 KB
Del
OK
mutex.pyc
2.55 KB
Del
OK
mutex.pyo
2.55 KB
Del
OK
netrc.py
5.75 KB
Del
OK
netrc.pyc
4.72 KB
Del
OK
netrc.pyo
4.72 KB
Del
OK
new.py
610 B
Del
OK
new.pyc
875 B
Del
OK
new.pyo
875 B
Del
OK
nntplib.py
20.97 KB
Del
OK
nntplib.pyc
21.11 KB
Del
OK
nntplib.pyo
21.11 KB
Del
OK
ntpath.py
18.97 KB
Del
OK
ntpath.pyc
13.1 KB
Del
OK
ntpath.pyo
13.1 KB
Del
OK
nturl2path.py
2.36 KB
Del
OK
nturl2path.pyc
1.81 KB
Del
OK
nturl2path.pyo
1.81 KB
Del
OK
numbers.py
10.08 KB
Del
OK
numbers.pyc
14.47 KB
Del
OK
numbers.pyo
14.47 KB
Del
OK
opcode.py
5.35 KB
Del
OK
opcode.pyc
6.06 KB
Del
OK
opcode.pyo
6.06 KB
Del
OK
optparse.py
59.77 KB
Del
OK
optparse.pyc
54.41 KB
Del
OK
optparse.pyo
54.33 KB
Del
OK
os.py
25.3 KB
Del
OK
os.pyc
25.76 KB
Del
OK
os.pyo
25.76 KB
Del
OK
os2emxpath.py
4.53 KB
Del
OK
os2emxpath.pyc
4.53 KB
Del
OK
os2emxpath.pyo
4.53 KB
Del
OK
pdb.doc
7.73 KB
Del
OK
pdb.py
45.03 KB
Del
OK
pdb.pyc
44.09 KB
Del
OK
pdb.pyo
44.09 KB
Del
OK
pickle.py
44.42 KB
Del
OK
pickle.pyc
38.98 KB
Del
OK
pickle.pyo
38.79 KB
Del
OK
pickletools.py
72.78 KB
Del
OK
pickletools.pyc
56.1 KB
Del
OK
pickletools.pyo
55.26 KB
Del
OK
pipes.py
9.36 KB
Del
OK
pipes.pyc
9.29 KB
Del
OK
pipes.pyo
9.29 KB
Del
OK
pkgutil.py
19.77 KB
Del
OK
pkgutil.pyc
18.93 KB
Del
OK
pkgutil.pyo
18.93 KB
Del
OK
plat-linux2
-
Del
OK
platform.py
51.56 KB
Del
OK
platform.pyc
37.7 KB
Del
OK
platform.pyo
37.7 KB
Del
OK
plistlib.py
14.83 KB
Del
OK
plistlib.pyc
19.54 KB
Del
OK
plistlib.pyo
19.46 KB
Del
OK
popen2.py
8.22 KB
Del
OK
popen2.pyc
9.02 KB
Del
OK
popen2.pyo
8.98 KB
Del
OK
poplib.py
12.52 KB
Del
OK
poplib.pyc
13.45 KB
Del
OK
poplib.pyo
13.45 KB
Del
OK
posixfile.py
7.82 KB
Del
OK
posixfile.pyc
7.63 KB
Del
OK
posixfile.pyo
7.63 KB
Del
OK
posixpath.py
13.96 KB
Del
OK
posixpath.pyc
11.49 KB
Del
OK
posixpath.pyo
11.49 KB
Del
OK
pprint.py
11.5 KB
Del
OK
pprint.pyc
10.2 KB
Del
OK
pprint.pyo
10.02 KB
Del
OK
profile.py
22.26 KB
Del
OK
profile.pyc
16.57 KB
Del
OK
profile.pyo
16.32 KB
Del
OK
pstats.py
26.09 KB
Del
OK
pstats.pyc
25.19 KB
Del
OK
pstats.pyo
25.19 KB
Del
OK
pty.py
4.94 KB
Del
OK
pty.pyc
4.98 KB
Del
OK
pty.pyo
4.98 KB
Del
OK
py_compile.py
5.8 KB
Del
OK
py_compile.pyc
6.37 KB
Del
OK
py_compile.pyo
6.37 KB
Del
OK
pyclbr.py
13.07 KB
Del
OK
pyclbr.pyc
9.59 KB
Del
OK
pyclbr.pyo
9.59 KB
Del
OK
pydoc.py
93.43 KB
Del
OK
pydoc.pyc
92.69 KB
Del
OK
pydoc.pyo
92.63 KB
Del
OK
pydoc_data
-
Del
OK
quopri.py
6.81 KB
Del
OK
quopri.pyc
6.56 KB
Del
OK
quopri.pyo
6.56 KB
Del
OK
random.py
31.7 KB
Del
OK
random.pyc
25.65 KB
Del
OK
random.pyo
25.65 KB
Del
OK
re.py
13.11 KB
Del
OK
re.pyc
13.37 KB
Del
OK
re.pyo
13.37 KB
Del
OK
repr.py
4.2 KB
Del
OK
repr.pyc
5.47 KB
Del
OK
repr.pyo
5.47 KB
Del
OK
rexec.py
19.68 KB
Del
OK
rexec.pyc
24 KB
Del
OK
rexec.pyo
24 KB
Del
OK
rfc822.py
32.76 KB
Del
OK
rfc822.pyc
31.83 KB
Del
OK
rfc822.pyo
31.83 KB
Del
OK
rlcompleter.py
5.85 KB
Del
OK
rlcompleter.pyc
6.04 KB
Del
OK
rlcompleter.pyo
6.04 KB
Del
OK
robotparser.py
7.51 KB
Del
OK
robotparser.pyc
8.12 KB
Del
OK
robotparser.pyo
8.12 KB
Del
OK
runpy.py
10.82 KB
Del
OK
runpy.pyc
8.85 KB
Del
OK
runpy.pyo
8.85 KB
Del
OK
sched.py
4.97 KB
Del
OK
sched.pyc
4.99 KB
Del
OK
sched.pyo
4.99 KB
Del
OK
sets.py
18.6 KB
Del
OK
sets.pyc
17.21 KB
Del
OK
sets.pyo
17.21 KB
Del
OK
sgmllib.py
17.46 KB
Del
OK
sgmllib.pyc
15.67 KB
Del
OK
sgmllib.pyo
15.67 KB
Del
OK
sha.py
393 B
Del
OK
sha.pyc
434 B
Del
OK
sha.pyo
434 B
Del
OK
shelve.py
7.99 KB
Del
OK
shelve.pyc
10.36 KB
Del
OK
shelve.pyo
10.36 KB
Del
OK
shlex.py
10.9 KB
Del
OK
shlex.pyc
7.55 KB
Del
OK
shlex.pyo
7.55 KB
Del
OK
shutil.py
19.41 KB
Del
OK
shutil.pyc
19.19 KB
Del
OK
shutil.pyo
19.19 KB
Del
OK
site-packages
-
Del
OK
site.py
19.18 KB
Del
OK
site.pyc
19.35 KB
Del
OK
site.pyo
19.35 KB
Del
OK
smtpd.py
18.12 KB
Del
OK
smtpd.pyc
15.9 KB
Del
OK
smtpd.pyo
15.9 KB
Del
OK
smtplib.py
31.39 KB
Del
OK
smtplib.pyc
30.29 KB
Del
OK
smtplib.pyo
30.29 KB
Del
OK
sndhdr.py
5.83 KB
Del
OK
sndhdr.pyc
7.4 KB
Del
OK
sndhdr.pyo
7.4 KB
Del
OK
socket.py
20.13 KB
Del
OK
socket.pyc
16.15 KB
Del
OK
socket.pyo
16.07 KB
Del
OK
sqlite3
-
Del
OK
sre.py
384 B
Del
OK
sre.pyc
532 B
Del
OK
sre.pyo
532 B
Del
OK
sre_compile.py
19.36 KB
Del
OK
sre_compile.pyc
12.46 KB
Del
OK
sre_compile.pyo
12.3 KB
Del
OK
sre_constants.py
7.03 KB
Del
OK
sre_constants.pyc
6.11 KB
Del
OK
sre_constants.pyo
6.11 KB
Del
OK
sre_parse.py
29.98 KB
Del
OK
sre_parse.pyc
21.12 KB
Del
OK
sre_parse.pyo
21.12 KB
Del
OK
ssl.py
36.58 KB
Del
OK
ssl.pyc
32.24 KB
Del
OK
ssl.pyo
32.24 KB
Del
OK
stat.py
1.8 KB
Del
OK
stat.pyc
2.81 KB
Del
OK
stat.pyo
2.81 KB
Del
OK
statvfs.py
898 B
Del
OK
statvfs.pyc
633 B
Del
OK
statvfs.pyo
633 B
Del
OK
string.py
21.04 KB
Del
OK
string.pyc
20.63 KB
Del
OK
string.pyo
20.63 KB
Del
OK
stringold.py
12.16 KB
Del
OK
stringold.pyc
12.6 KB
Del
OK
stringold.pyo
12.6 KB
Del
OK
stringprep.py
13.21 KB
Del
OK
stringprep.pyc
14.4 KB
Del
OK
stringprep.pyo
14.33 KB
Del
OK
struct.py
82 B
Del
OK
struct.pyc
252 B
Del
OK
struct.pyo
252 B
Del
OK
subprocess.py
49.34 KB
Del
OK
subprocess.pyc
32.32 KB
Del
OK
subprocess.pyo
32.32 KB
Del
OK
sunau.py
16.82 KB
Del
OK
sunau.pyc
18.57 KB
Del
OK
sunau.pyo
18.57 KB
Del
OK
sunaudio.py
1.37 KB
Del
OK
sunaudio.pyc
2 KB
Del
OK
sunaudio.pyo
2 KB
Del
OK
symbol.py
2.02 KB
Del
OK
symbol.pyc
2.98 KB
Del
OK
symbol.pyo
2.98 KB
Del
OK
symtable.py
7.26 KB
Del
OK
symtable.pyc
12.14 KB
Del
OK
symtable.pyo
12.02 KB
Del
OK
sysconfig.py
22.32 KB
Del
OK
sysconfig.pyc
17.73 KB
Del
OK
sysconfig.pyo
17.73 KB
Del
OK
tabnanny.py
11.08 KB
Del
OK
tabnanny.pyc
8.31 KB
Del
OK
tabnanny.pyo
8.31 KB
Del
OK
tarfile.py
88.45 KB
Del
OK
tarfile.pyc
76.54 KB
Del
OK
tarfile.pyo
76.54 KB
Del
OK
telnetlib.py
26.4 KB
Del
OK
telnetlib.pyc
23.03 KB
Del
OK
telnetlib.pyo
23.03 KB
Del
OK
tempfile.py
19.09 KB
Del
OK
tempfile.pyc
20.55 KB
Del
OK
tempfile.pyo
20.55 KB
Del
OK
test
-
Del
OK
textwrap.py
16.88 KB
Del
OK
textwrap.pyc
11.99 KB
Del
OK
textwrap.pyo
11.9 KB
Del
OK
this.py
1002 B
Del
OK
this.pyc
1.2 KB
Del
OK
this.pyo
1.2 KB
Del
OK
threading.py
46.17 KB
Del
OK
threading.pyc
42.97 KB
Del
OK
threading.pyo
40.84 KB
Del
OK
timeit.py
12.5 KB
Del
OK
timeit.pyc
12.06 KB
Del
OK
timeit.pyo
12.06 KB
Del
OK
toaiff.py
3.07 KB
Del
OK
toaiff.pyc
3.08 KB
Del
OK
toaiff.pyo
3.08 KB
Del
OK
token.py
2.85 KB
Del
OK
token.pyc
3.79 KB
Del
OK
token.pyo
3.79 KB
Del
OK
tokenize.py
17.07 KB
Del
OK
tokenize.pyc
14.37 KB
Del
OK
tokenize.pyo
14.31 KB
Del
OK
trace.py
29.2 KB
Del
OK
trace.pyc
22.69 KB
Del
OK
trace.pyo
22.63 KB
Del
OK
traceback.py
11.02 KB
Del
OK
traceback.pyc
11.66 KB
Del
OK
traceback.pyo
11.66 KB
Del
OK
tty.py
879 B
Del
OK
tty.pyc
1.32 KB
Del
OK
tty.pyo
1.32 KB
Del
OK
types.py
2.04 KB
Del
OK
types.pyc
2.75 KB
Del
OK
types.pyo
2.75 KB
Del
OK
unittest
-
Del
OK
urllib.py
58.82 KB
Del
OK
urllib.pyc
51.35 KB
Del
OK
urllib.pyo
51.25 KB
Del
OK
urllib2.py
51.31 KB
Del
OK
urllib2.pyc
47.8 KB
Del
OK
urllib2.pyo
47.71 KB
Del
OK
urlparse.py
16.29 KB
Del
OK
urlparse.pyc
15.51 KB
Del
OK
urlparse.pyo
15.51 KB
Del
OK
user.py
1.59 KB
Del
OK
user.pyc
1.7 KB
Del
OK
user.pyo
1.7 KB
Del
OK
uu.py
6.55 KB
Del
OK
uu.pyc
4.35 KB
Del
OK
uu.pyo
4.35 KB
Del
OK
uuid.py
22.63 KB
Del
OK
uuid.pyc
23.22 KB
Del
OK
uuid.pyo
23.11 KB
Del
OK
warnings.py
14.48 KB
Del
OK
warnings.pyc
13.49 KB
Del
OK
warnings.pyo
12.71 KB
Del
OK
wave.py
18.15 KB
Del
OK
wave.pyc
20.19 KB
Del
OK
wave.pyo
20.05 KB
Del
OK
weakref.py
14.48 KB
Del
OK
weakref.pyc
16.73 KB
Del
OK
weakref.pyo
16.73 KB
Del
OK
webbrowser.py
22.2 KB
Del
OK
webbrowser.pyc
19.86 KB
Del
OK
webbrowser.pyo
19.81 KB
Del
OK
whichdb.py
3.31 KB
Del
OK
whichdb.pyc
2.21 KB
Del
OK
whichdb.pyo
2.21 KB
Del
OK
wsgiref
-
Del
OK
wsgiref.egg-info
187 B
Del
OK
xdrlib.py
5.93 KB
Del
OK
xdrlib.pyc
10.2 KB
Del
OK
xdrlib.pyo
10.2 KB
Del
OK
xml
-
Del
OK
xmllib.py
34.05 KB
Del
OK
xmllib.pyc
26.9 KB
Del
OK
xmllib.pyo
26.9 KB
Del
OK
xmlrpclib.py
50.91 KB
Del
OK
xmlrpclib.pyc
44.81 KB
Del
OK
xmlrpclib.pyo
44.63 KB
Del
OK
zipfile.py
58.08 KB
Del
OK
zipfile.pyc
41.92 KB
Del
OK
zipfile.pyo
41.92 KB
Del
OK
Edit: calendar.py
"""Calendar printing functions Note when comparing these calendars to the ones printed by cal(1): By default, these calendars have Monday as the first day of the week, and Sunday as the last (the European convention). Use setfirstweekday() to set the first day of the week (0=Monday, 6=Sunday).""" import sys import datetime import locale as _locale __all__ = ["IllegalMonthError", "IllegalWeekdayError", "setfirstweekday", "firstweekday", "isleap", "leapdays", "weekday", "monthrange", "monthcalendar", "prmonth", "month", "prcal", "calendar", "timegm", "month_name", "month_abbr", "day_name", "day_abbr"] # Exception raised for bad input (with string parameter for details) error = ValueError # Exceptions raised for bad input class IllegalMonthError(ValueError): def __init__(self, month): self.month = month def __str__(self): return "bad month number %r; must be 1-12" % self.month class IllegalWeekdayError(ValueError): def __init__(self, weekday): self.weekday = weekday def __str__(self): return "bad weekday number %r; must be 0 (Monday) to 6 (Sunday)" % self.weekday # Constants for months referenced later January = 1 February = 2 # Number of days per month (except for February in leap years) mdays = [0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31] # This module used to have hard-coded lists of day and month names, as # English strings. The classes following emulate a read-only version of # that, but supply localized names. Note that the values are computed # fresh on each call, in case the user changes locale between calls. class _localized_month: _months = [datetime.date(2001, i+1, 1).strftime for i in range(12)] _months.insert(0, lambda x: "") def __init__(self, format): self.format = format def __getitem__(self, i): funcs = self._months[i] if isinstance(i, slice): return [f(self.format) for f in funcs] else: return funcs(self.format) def __len__(self): return 13 class _localized_day: # January 1, 2001, was a Monday. _days = [datetime.date(2001, 1, i+1).strftime for i in range(7)] def __init__(self, format): self.format = format def __getitem__(self, i): funcs = self._days[i] if isinstance(i, slice): return [f(self.format) for f in funcs] else: return funcs(self.format) def __len__(self): return 7 # Full and abbreviated names of weekdays day_name = _localized_day('%A') day_abbr = _localized_day('%a') # Full and abbreviated names of months (1-based arrays!!!) month_name = _localized_month('%B') month_abbr = _localized_month('%b') # Constants for weekdays (MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, SUNDAY) = range(7) def isleap(year): """Return True for leap years, False for non-leap years.""" return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) def leapdays(y1, y2): """Return number of leap years in range [y1, y2). Assume y1 <= y2.""" y1 -= 1 y2 -= 1 return (y2//4 - y1//4) - (y2//100 - y1//100) + (y2//400 - y1//400) def weekday(year, month, day): """Return weekday (0-6 ~ Mon-Sun) for year (1970-...), month (1-12), day (1-31).""" return datetime.date(year, month, day).weekday() def monthrange(year, month): """Return weekday (0-6 ~ Mon-Sun) and number of days (28-31) for year, month.""" if not 1 <= month <= 12: raise IllegalMonthError(month) day1 = weekday(year, month, 1) ndays = mdays[month] + (month == February and isleap(year)) return day1, ndays class Calendar(object): """ Base calendar class. This class doesn't do any formatting. It simply provides data to subclasses. """ def __init__(self, firstweekday=0): self.firstweekday = firstweekday # 0 = Monday, 6 = Sunday def getfirstweekday(self): return self._firstweekday % 7 def setfirstweekday(self, firstweekday): self._firstweekday = firstweekday firstweekday = property(getfirstweekday, setfirstweekday) def iterweekdays(self): """ Return an iterator for one week of weekday numbers starting with the configured first one. """ for i in range(self.firstweekday, self.firstweekday + 7): yield i%7 def itermonthdates(self, year, month): """ Return an iterator for one month. The iterator will yield datetime.date values and will always iterate through complete weeks, so it will yield dates outside the specified month. """ date = datetime.date(year, month, 1) # Go back to the beginning of the week days = (date.weekday() - self.firstweekday) % 7 date -= datetime.timedelta(days=days) oneday = datetime.timedelta(days=1) while True: yield date try: date += oneday except OverflowError: # Adding one day could fail after datetime.MAXYEAR break if date.month != month and date.weekday() == self.firstweekday: break def itermonthdays2(self, year, month): """ Like itermonthdates(), but will yield (day number, weekday number) tuples. For days outside the specified month the day number is 0. """ for i, d in enumerate(self.itermonthdays(year, month), self.firstweekday): yield d, i % 7 def itermonthdays(self, year, month): """ Like itermonthdates(), but will yield day numbers. For days outside the specified month the day number is 0. """ day1, ndays = monthrange(year, month) days_before = (day1 - self.firstweekday) % 7 for _ in range(days_before): yield 0 for d in range(1, ndays + 1): yield d days_after = (self.firstweekday - day1 - ndays) % 7 for _ in range(days_after): yield 0 def monthdatescalendar(self, year, month): """ Return a matrix (list of lists) representing a month's calendar. Each row represents a week; week entries are datetime.date values. """ dates = list(self.itermonthdates(year, month)) return [ dates[i:i+7] for i in range(0, len(dates), 7) ] def monthdays2calendar(self, year, month): """ Return a matrix representing a month's calendar. Each row represents a week; week entries are (day number, weekday number) tuples. Day numbers outside this month are zero. """ days = list(self.itermonthdays2(year, month)) return [ days[i:i+7] for i in range(0, len(days), 7) ] def monthdayscalendar(self, year, month): """ Return a matrix representing a month's calendar. Each row represents a week; days outside this month are zero. """ days = list(self.itermonthdays(year, month)) return [ days[i:i+7] for i in range(0, len(days), 7) ] def yeardatescalendar(self, year, width=3): """ Return the data for the specified year ready for formatting. The return value is a list of month rows. Each month row contains up to width months. Each month contains between 4 and 6 weeks and each week contains 1-7 days. Days are datetime.date objects. """ months = [ self.monthdatescalendar(year, i) for i in range(January, January+12) ] return [months[i:i+width] for i in range(0, len(months), width) ] def yeardays2calendar(self, year, width=3): """ Return the data for the specified year ready for formatting (similar to yeardatescalendar()). Entries in the week lists are (day number, weekday number) tuples. Day numbers outside this month are zero. """ months = [ self.monthdays2calendar(year, i) for i in range(January, January+12) ] return [months[i:i+width] for i in range(0, len(months), width) ] def yeardayscalendar(self, year, width=3): """ Return the data for the specified year ready for formatting (similar to yeardatescalendar()). Entries in the week lists are day numbers. Day numbers outside this month are zero. """ months = [ self.monthdayscalendar(year, i) for i in range(January, January+12) ] return [months[i:i+width] for i in range(0, len(months), width) ] class TextCalendar(Calendar): """ Subclass of Calendar that outputs a calendar as a simple plain text similar to the UNIX program cal. """ def prweek(self, theweek, width): """ Print a single week (no newline). """ print self.formatweek(theweek, width), def formatday(self, day, weekday, width): """ Returns a formatted day. """ if day == 0: s = '' else: s = '%2i' % day # right-align single-digit days return s.center(width) def formatweek(self, theweek, width): """ Returns a single week in a string (no newline). """ return ' '.join(self.formatday(d, wd, width) for (d, wd) in theweek) def formatweekday(self, day, width): """ Returns a formatted week day name. """ if width >= 9: names = day_name else: names = day_abbr return names[day][:width].center(width) def formatweekheader(self, width): """ Return a header for a week. """ return ' '.join(self.formatweekday(i, width) for i in self.iterweekdays()) def formatmonthname(self, theyear, themonth, width, withyear=True): """ Return a formatted month name. """ s = month_name[themonth] if withyear: s = "%s %r" % (s, theyear) return s.center(width) def prmonth(self, theyear, themonth, w=0, l=0): """ Print a month's calendar. """ print self.formatmonth(theyear, themonth, w, l), def formatmonth(self, theyear, themonth, w=0, l=0): """ Return a month's calendar string (multi-line). """ w = max(2, w) l = max(1, l) s = self.formatmonthname(theyear, themonth, 7 * (w + 1) - 1) s = s.rstrip() s += '\n' * l s += self.formatweekheader(w).rstrip() s += '\n' * l for week in self.monthdays2calendar(theyear, themonth): s += self.formatweek(week, w).rstrip() s += '\n' * l return s def formatyear(self, theyear, w=2, l=1, c=6, m=3): """ Returns a year's calendar as a multi-line string. """ w = max(2, w) l = max(1, l) c = max(2, c) colwidth = (w + 1) * 7 - 1 v = [] a = v.append a(repr(theyear).center(colwidth*m+c*(m-1)).rstrip()) a('\n'*l) header = self.formatweekheader(w) for (i, row) in enumerate(self.yeardays2calendar(theyear, m)): # months in this row months = range(m*i+1, min(m*(i+1)+1, 13)) a('\n'*l) names = (self.formatmonthname(theyear, k, colwidth, False) for k in months) a(formatstring(names, colwidth, c).rstrip()) a('\n'*l) headers = (header for k in months) a(formatstring(headers, colwidth, c).rstrip()) a('\n'*l) # max number of weeks for this row height = max(len(cal) for cal in row) for j in range(height): weeks = [] for cal in row: if j >= len(cal): weeks.append('') else: weeks.append(self.formatweek(cal[j], w)) a(formatstring(weeks, colwidth, c).rstrip()) a('\n' * l) return ''.join(v) def pryear(self, theyear, w=0, l=0, c=6, m=3): """Print a year's calendar.""" print self.formatyear(theyear, w, l, c, m) class HTMLCalendar(Calendar): """ This calendar returns complete HTML pages. """ # CSS classes for the day <td>s cssclasses = ["mon", "tue", "wed", "thu", "fri", "sat", "sun"] def formatday(self, day, weekday): """ Return a day as a table cell. """ if day == 0: return '<td class="noday"> </td>' # day outside month else: return '<td class="%s">%d</td>' % (self.cssclasses[weekday], day) def formatweek(self, theweek): """ Return a complete week as a table row. """ s = ''.join(self.formatday(d, wd) for (d, wd) in theweek) return '<tr>%s</tr>' % s def formatweekday(self, day): """ Return a weekday name as a table header. """ return '<th class="%s">%s</th>' % (self.cssclasses[day], day_abbr[day]) def formatweekheader(self): """ Return a header for a week as a table row. """ s = ''.join(self.formatweekday(i) for i in self.iterweekdays()) return '<tr>%s</tr>' % s def formatmonthname(self, theyear, themonth, withyear=True): """ Return a month name as a table row. """ if withyear: s = '%s %s' % (month_name[themonth], theyear) else: s = '%s' % month_name[themonth] return '<tr><th colspan="7" class="month">%s</th></tr>' % s def formatmonth(self, theyear, themonth, withyear=True): """ Return a formatted month as a table. """ v = [] a = v.append a('<table border="0" cellpadding="0" cellspacing="0" class="month">') a('\n') a(self.formatmonthname(theyear, themonth, withyear=withyear)) a('\n') a(self.formatweekheader()) a('\n') for week in self.monthdays2calendar(theyear, themonth): a(self.formatweek(week)) a('\n') a('</table>') a('\n') return ''.join(v) def formatyear(self, theyear, width=3): """ Return a formatted year as a table of tables. """ v = [] a = v.append width = max(width, 1) a('<table border="0" cellpadding="0" cellspacing="0" class="year">') a('\n') a('<tr><th colspan="%d" class="year">%s</th></tr>' % (width, theyear)) for i in range(January, January+12, width): # months in this row months = range(i, min(i+width, 13)) a('<tr>') for m in months: a('<td>') a(self.formatmonth(theyear, m, withyear=False)) a('</td>') a('</tr>') a('</table>') return ''.join(v) def formatyearpage(self, theyear, width=3, css='calendar.css', encoding=None): """ Return a formatted year as a complete HTML page. """ if encoding is None: encoding = sys.getdefaultencoding() v = [] a = v.append a('<?xml version="1.0" encoding="%s"?>\n' % encoding) a('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">\n') a('<html>\n') a('<head>\n') a('<meta http-equiv="Content-Type" content="text/html; charset=%s" />\n' % encoding) if css is not None: a('<link rel="stylesheet" type="text/css" href="%s" />\n' % css) a('<title>Calendar for %d</title>\n' % theyear) a('</head>\n') a('<body>\n') a(self.formatyear(theyear, width)) a('</body>\n') a('</html>\n') return ''.join(v).encode(encoding, "xmlcharrefreplace") class TimeEncoding: def __init__(self, locale): self.locale = locale def __enter__(self): self.oldlocale = _locale.getlocale(_locale.LC_TIME) _locale.setlocale(_locale.LC_TIME, self.locale) return _locale.getlocale(_locale.LC_TIME)[1] def __exit__(self, *args): _locale.setlocale(_locale.LC_TIME, self.oldlocale) class LocaleTextCalendar(TextCalendar): """ This class can be passed a locale name in the constructor and will return month and weekday names in the specified locale. If this locale includes an encoding all strings containing month and weekday names will be returned as unicode. """ def __init__(self, firstweekday=0, locale=None): TextCalendar.__init__(self, firstweekday) if locale is None: locale = _locale.getdefaultlocale() self.locale = locale def formatweekday(self, day, width): with TimeEncoding(self.locale) as encoding: if width >= 9: names = day_name else: names = day_abbr name = names[day] if encoding is not None: name = name.decode(encoding) return name[:width].center(width) def formatmonthname(self, theyear, themonth, width, withyear=True): with TimeEncoding(self.locale) as encoding: s = month_name[themonth] if encoding is not None: s = s.decode(encoding) if withyear: s = "%s %r" % (s, theyear) return s.center(width) class LocaleHTMLCalendar(HTMLCalendar): """ This class can be passed a locale name in the constructor and will return month and weekday names in the specified locale. If this locale includes an encoding all strings containing month and weekday names will be returned as unicode. """ def __init__(self, firstweekday=0, locale=None): HTMLCalendar.__init__(self, firstweekday) if locale is None: locale = _locale.getdefaultlocale() self.locale = locale def formatweekday(self, day): with TimeEncoding(self.locale) as encoding: s = day_abbr[day] if encoding is not None: s = s.decode(encoding) return '<th class="%s">%s</th>' % (self.cssclasses[day], s) def formatmonthname(self, theyear, themonth, withyear=True): with TimeEncoding(self.locale) as encoding: s = month_name[themonth] if encoding is not None: s = s.decode(encoding) if withyear: s = '%s %s' % (s, theyear) return '<tr><th colspan="7" class="month">%s</th></tr>' % s # Support for old module level interface c = TextCalendar() firstweekday = c.getfirstweekday def setfirstweekday(firstweekday): try: firstweekday.__index__ except AttributeError: raise IllegalWeekdayError(firstweekday) if not MONDAY <= firstweekday <= SUNDAY: raise IllegalWeekdayError(firstweekday) c.firstweekday = firstweekday monthcalendar = c.monthdayscalendar prweek = c.prweek week = c.formatweek weekheader = c.formatweekheader prmonth = c.prmonth month = c.formatmonth calendar = c.formatyear prcal = c.pryear # Spacing of month columns for multi-column year calendar _colwidth = 7*3 - 1 # Amount printed by prweek() _spacing = 6 # Number of spaces between columns def format(cols, colwidth=_colwidth, spacing=_spacing): """Prints multi-column formatting for year calendars""" print formatstring(cols, colwidth, spacing) def formatstring(cols, colwidth=_colwidth, spacing=_spacing): """Returns a string formatted from n strings, centered within n columns.""" spacing *= ' ' return spacing.join(c.center(colwidth) for c in cols) EPOCH = 1970 _EPOCH_ORD = datetime.date(EPOCH, 1, 1).toordinal() def timegm(tuple): """Unrelated but handy function to calculate Unix timestamp from GMT.""" year, month, day, hour, minute, second = tuple[:6] days = datetime.date(year, month, 1).toordinal() - _EPOCH_ORD + day - 1 hours = days*24 + hour minutes = hours*60 + minute seconds = minutes*60 + second return seconds def main(args): import optparse parser = optparse.OptionParser(usage="usage: %prog [options] [year [month]]") parser.add_option( "-w", "--width", dest="width", type="int", default=2, help="width of date column (default 2, text only)" ) parser.add_option( "-l", "--lines", dest="lines", type="int", default=1, help="number of lines for each week (default 1, text only)" ) parser.add_option( "-s", "--spacing", dest="spacing", type="int", default=6, help="spacing between months (default 6, text only)" ) parser.add_option( "-m", "--months", dest="months", type="int", default=3, help="months per row (default 3, text only)" ) parser.add_option( "-c", "--css", dest="css", default="calendar.css", help="CSS to use for page (html only)" ) parser.add_option( "-L", "--locale", dest="locale", default=None, help="locale to be used from month and weekday names" ) parser.add_option( "-e", "--encoding", dest="encoding", default=None, help="Encoding to use for output" ) parser.add_option( "-t", "--type", dest="type", default="text", choices=("text", "html"), help="output type (text or html)" ) (options, args) = parser.parse_args(args) if options.locale and not options.encoding: parser.error("if --locale is specified --encoding is required") sys.exit(1) locale = options.locale, options.encoding if options.type == "html": if options.locale: cal = LocaleHTMLCalendar(locale=locale) else: cal = HTMLCalendar() encoding = options.encoding if encoding is None: encoding = sys.getdefaultencoding() optdict = dict(encoding=encoding, css=options.css) if len(args) == 1: print cal.formatyearpage(datetime.date.today().year, **optdict) elif len(args) == 2: print cal.formatyearpage(int(args[1]), **optdict) else: parser.error("incorrect number of arguments") sys.exit(1) else: if options.locale: cal = LocaleTextCalendar(locale=locale) else: cal = TextCalendar() optdict = dict(w=options.width, l=options.lines) if len(args) != 3: optdict["c"] = options.spacing optdict["m"] = options.months if len(args) == 1: result = cal.formatyear(datetime.date.today().year, **optdict) elif len(args) == 2: result = cal.formatyear(int(args[1]), **optdict) elif len(args) == 3: result = cal.formatmonth(int(args[1]), int(args[2]), **optdict) else: parser.error("incorrect number of arguments") sys.exit(1) if options.encoding: result = result.encode(options.encoding) print result if __name__ == "__main__": main(sys.argv)
Save