/
opt
/
alt
/
python27
/
lib64
/
python2.7
/
/opt/alt/python27/lib64/python2.7
mkdir
upload
Name
Size
Mode
Actions
bsddb/
-
0755
rm
compiler/
-
0755
rm
config/
-
0755
rm
ctypes/
-
0755
rm
curses/
-
0755
rm
distutils/
-
0755
rm
email/
-
0755
rm
encodings/
-
0755
rm
ensurepip/
-
0755
rm
hotshot/
-
0755
rm
idlelib/
-
0755
rm
importlib/
-
0755
rm
json/
-
0755
rm
lib-dynload/
-
0755
rm
lib2to3/
-
0755
rm
logging/
-
0755
rm
multiprocessing/
-
0755
rm
plat-linux2/
-
0755
rm
pydoc_data/
-
0755
rm
site-packages/
-
0755
rm
sqlite3/
-
0755
rm
test/
-
0755
rm
unittest/
-
0755
rm
wsgiref/
-
0755
rm
xml/
-
0755
rm
abc.py
7145
0644
edit
dl
rm
abc.pyc
6286
0644
edit
dl
rm
abc.pyo
6230
0644
edit
dl
rm
aifc.py
34579
0644
edit
dl
rm
aifc.pyc
31408
0644
edit
dl
rm
aifc.pyo
31408
0644
edit
dl
rm
antigravity.py
60
0644
edit
dl
rm
antigravity.pyc
216
0644
edit
dl
rm
antigravity.pyo
216
0644
edit
dl
rm
anydbm.py
2663
0644
edit
dl
rm
anydbm.pyc
2839
0644
edit
dl
rm
anydbm.pyo
2839
0644
edit
dl
rm
argparse.py
89228
0644
edit
dl
rm
argparse.pyc
66382
0644
edit
dl
rm
argparse.pyo
66217
0644
edit
dl
rm
ast.py
11805
0644
edit
dl
rm
ast.pyc
13250
0644
edit
dl
rm
ast.pyo
13250
0644
edit
dl
rm
asynchat.py
11581
0644
edit
dl
rm
asynchat.pyc
9200
0644
edit
dl
rm
asynchat.pyo
9200
0644
edit
dl
rm
asyncore.py
20943
0644
edit
dl
rm
asyncore.pyc
19660
0644
edit
dl
rm
asyncore.pyo
19660
0644
edit
dl
rm
atexit.py
1705
0644
edit
dl
rm
atexit.pyc
2281
0644
edit
dl
rm
atexit.pyo
2281
0644
edit
dl
rm
audiodev.py
7597
0644
edit
dl
rm
audiodev.pyc
8820
0644
edit
dl
rm
audiodev.pyo
8820
0644
edit
dl
rm
base64.py
11803
0755
edit
dl
rm
base64.pyc
11531
0644
edit
dl
rm
base64.pyo
11531
0644
edit
dl
rm
BaseHTTPServer.py
22747
0644
edit
dl
rm
BaseHTTPServer.pyc
21982
0644
edit
dl
rm
BaseHTTPServer.pyo
21982
0644
edit
dl
rm
Bastion.py
5744
0644
edit
dl
rm
Bastion.pyc
6855
0644
edit
dl
rm
Bastion.pyo
6855
0644
edit
dl
rm
bdb.py
21714
0644
edit
dl
rm
bdb.pyc
19894
0644
edit
dl
rm
bdb.pyo
19894
0644
edit
dl
rm
binhex.py
14698
0644
edit
dl
rm
binhex.pyc
16123
0644
edit
dl
rm
binhex.pyo
16123
0644
edit
dl
rm
bisect.py
2595
0644
edit
dl
rm
bisect.pyc
3136
0644
edit
dl
rm
bisect.pyo
3136
0644
edit
dl
rm
calendar.py
23384
0644
edit
dl
rm
calendar.pyc
28940
0644
edit
dl
rm
calendar.pyo
28940
0644
edit
dl
rm
cgi.py
35794
0755
edit
dl
rm
cgi.pyc
34034
0644
edit
dl
rm
cgi.pyo
34034
0644
edit
dl
rm
CGIHTTPServer.py
13089
0644
edit
dl
rm
CGIHTTPServer.pyc
11187
0644
edit
dl
rm
CGIHTTPServer.pyo
11187
0644
edit
dl
rm
cgitb.py
12175
0644
edit
dl
rm
cgitb.pyc
12372
0644
edit
dl
rm
cgitb.pyo
12372
0644
edit
dl
rm
chunk.py
5419
0644
edit
dl
rm
chunk.pyc
5745
0644
edit
dl
rm
chunk.pyo
5745
0644
edit
dl
rm
cmd.py
15026
0644
edit
dl
rm
cmd.pyc
14312
0644
edit
dl
rm
cmd.pyo
14312
0644
edit
dl
rm
code.py
10189
0644
edit
dl
rm
code.pyc
10542
0644
edit
dl
rm
code.pyo
10542
0644
edit
dl
rm
codecs.py
36143
0644
edit
dl
rm
codecs.pyc
38046
0644
edit
dl
rm
codecs.pyo
38046
0644
edit
dl
rm
codeop.py
5999
0644
edit
dl
rm
codeop.pyc
6727
0644
edit
dl
rm
codeop.pyo
6727
0644
edit
dl
rm
collections.py
27798
0644
edit
dl
rm
collections.pyc
26839
0644
edit
dl
rm
collections.pyo
26788
0644
edit
dl
rm
colorsys.py
3691
0644
edit
dl
rm
colorsys.pyc
4095
0644
edit
dl
rm
colorsys.pyo
4095
0644
edit
dl
rm
commands.py
2545
0644
edit
dl
rm
commands.pyc
2547
0644
edit
dl
rm
commands.pyo
2547
0644
edit
dl
rm
compileall.py
7763
0644
edit
dl
rm
compileall.pyc
7095
0644
edit
dl
rm
compileall.pyo
7095
0644
edit
dl
rm
ConfigParser.py
27746
0644
edit
dl
rm
ConfigParser.pyc
25980
0644
edit
dl
rm
ConfigParser.pyo
25980
0644
edit
dl
rm
contextlib.py
4424
0644
edit
dl
rm
contextlib.pyc
4610
0644
edit
dl
rm
contextlib.pyo
4610
0644
edit
dl
rm
Cookie.py
26538
0644
edit
dl
rm
Cookie.pyc
23152
0644
edit
dl
rm
Cookie.pyo
23152
0644
edit
dl
rm
cookielib.py
65486
0644
edit
dl
rm
cookielib.pyc
55986
0644
edit
dl
rm
cookielib.pyo
55798
0644
edit
dl
rm
copy.py
11533
0644
edit
dl
rm
copy.pyc
12508
0644
edit
dl
rm
copy.pyo
12416
0644
edit
dl
rm
copy_reg.py
6974
0644
edit
dl
rm
copy_reg.pyc
5310
0644
edit
dl
rm
copy_reg.pyo
5266
0644
edit
dl
rm
cProfile.py
6570
0755
edit
dl
rm
cProfile.pyc
6577
0644
edit
dl
rm
cProfile.pyo
6577
0644
edit
dl
rm
crypt.py
2291
0644
edit
dl
rm
crypt.pyc
3025
0644
edit
dl
rm
crypt.pyo
3025
0644
edit
dl
rm
csv.py
16708
0644
edit
dl
rm
csv.pyc
13884
0644
edit
dl
rm
csv.pyo
13884
0644
edit
dl
rm
dbhash.py
498
0644
edit
dl
rm
dbhash.pyc
744
0644
edit
dl
rm
dbhash.pyo
744
0644
edit
dl
rm
decimal.py
221933
0644
edit
dl
rm
decimal.pyc
175470
0644
edit
dl
rm
decimal.pyo
175470
0644
edit
dl
rm
difflib.py
82325
0644
edit
dl
rm
difflib.pyc
62600
0644
edit
dl
rm
difflib.pyo
62549
0644
edit
dl
rm
dircache.py
1126
0644
edit
dl
rm
dircache.pyc
1628
0644
edit
dl
rm
dircache.pyo
1628
0644
edit
dl
rm
dis.py
6499
0644
edit
dl
rm
dis.pyc
6332
0644
edit
dl
rm
dis.pyo
6332
0644
edit
dl
rm
doctest.py
105095
0644
edit
dl
rm
doctest.pyc
85210
0644
edit
dl
rm
doctest.pyo
84923
0644
edit
dl
rm
DocXMLRPCServer.py
10768
0644
edit
dl
rm
DocXMLRPCServer.pyc
10442
0644
edit
dl
rm
DocXMLRPCServer.pyo
10333
0644
edit
dl
rm
dumbdbm.py
9141
0644
edit
dl
rm
dumbdbm.pyc
6993
0644
edit
dl
rm
dumbdbm.pyo
6993
0644
edit
dl
rm
dummy_thread.py
4418
0644
edit
dl
rm
dummy_thread.pyc
5589
0644
edit
dl
rm
dummy_thread.pyo
5589
0644
edit
dl
rm
dummy_threading.py
2804
0644
edit
dl
rm
dummy_threading.pyc
1298
0644
edit
dl
rm
dummy_threading.pyo
1298
0644
edit
dl
rm
filecmp.py
9588
0644
edit
dl
rm
filecmp.pyc
9882
0644
edit
dl
rm
filecmp.pyo
9882
0644
edit
dl
rm
fileinput.py
13746
0644
edit
dl
rm
fileinput.pyc
14890
0644
edit
dl
rm
fileinput.pyo
14890
0644
edit
dl
rm
fnmatch.py
3315
0644
edit
dl
rm
fnmatch.pyc
3692
0644
edit
dl
rm
fnmatch.pyo
3692
0644
edit
dl
rm
formatter.py
14911
0644
edit
dl
rm
formatter.pyc
20179
0644
edit
dl
rm
formatter.pyo
20179
0644
edit
dl
rm
fpformat.py
4732
0644
edit
dl
rm
fpformat.pyc
4807
0644
edit
dl
rm
fpformat.pyo
4807
0644
edit
dl
rm
fractions.py
22390
0644
edit
dl
rm
fractions.pyc
20218
0644
edit
dl
rm
fractions.pyo
20218
0644
edit
dl
rm
ftplib.py
38194
0644
edit
dl
rm
ftplib.pyc
35652
0644
edit
dl
rm
ftplib.pyo
35652
0644
edit
dl
rm
functools.py
4806
0644
edit
dl
rm
functools.pyc
7019
0644
edit
dl
rm
functools.pyo
7019
0644
edit
dl
rm
genericpath.py
3201
0644
edit
dl
rm
genericpath.pyc
3660
0644
edit
dl
rm
genericpath.pyo
3660
0644
edit
dl
rm
getopt.py
7319
0644
edit
dl
rm
getopt.pyc
6784
0644
edit
dl
rm
getopt.pyo
6739
0644
edit
dl
rm
getpass.py
5563
0644
edit
dl
rm
getpass.pyc
4835
0644
edit
dl
rm
getpass.pyo
4835
0644
edit
dl
rm
gettext.py
22666
0644
edit
dl
rm
gettext.pyc
18602
0644
edit
dl
rm
gettext.pyo
18602
0644
edit
dl
rm
glob.py
3114
0644
edit
dl
rm
glob.pyc
3047
0644
edit
dl
rm
glob.pyo
3047
0644
edit
dl
rm
gzip.py
19028
0644
edit
dl
rm
gzip.pyc
15626
0644
edit
dl
rm
gzip.pyo
15626
0644
edit
dl
rm
hashlib.py
7842
0644
edit
dl
rm
hashlib.pyc
7026
0644
edit
dl
rm
hashlib.pyo
7026
0644
edit
dl
rm
heapq.py
18295
0644
edit
dl
rm
heapq.pyc
14798
0644
edit
dl
rm
heapq.pyo
14798
0644
edit
dl
rm
hmac.py
4588
0644
edit
dl
rm
hmac.pyc
4672
0644
edit
dl
rm
hmac.pyo
4672
0644
edit
dl
rm
htmlentitydefs.py
18056
0644
edit
dl
rm
htmlentitydefs.pyc
6380
0644
edit
dl
rm
htmlentitydefs.pyo
6380
0644
edit
dl
rm
htmllib.py
12869
0644
edit
dl
rm
htmllib.pyc
21492
0644
edit
dl
rm
htmllib.pyo
21492
0644
edit
dl
rm
HTMLParser.py
17171
0644
edit
dl
rm
HTMLParser.pyc
14143
0644
edit
dl
rm
HTMLParser.pyo
13838
0644
edit
dl
rm
httplib.py
52300
0644
edit
dl
rm
httplib.pyc
38793
0644
edit
dl
rm
httplib.pyo
38609
0644
edit
dl
rm
ihooks.py
18986
0644
edit
dl
rm
ihooks.pyc
22269
0644
edit
dl
rm
ihooks.pyo
22269
0644
edit
dl
rm
imaplib.py
48366
0644
edit
dl
rm
imaplib.pyc
46272
0644
edit
dl
rm
imaplib.pyo
43506
0644
edit
dl
rm
imghdr.py
3541
0644
edit
dl
rm
imghdr.pyc
5046
0644
edit
dl
rm
imghdr.pyo
5046
0644
edit
dl
rm
imputil.py
25764
0644
edit
dl
rm
imputil.pyc
16117
0644
edit
dl
rm
imputil.pyo
15939
0644
edit
dl
rm
inspect.py
43008
0644
edit
dl
rm
inspect.pyc
41126
0644
edit
dl
rm
inspect.pyo
41126
0644
edit
dl
rm
io.py
3322
0644
edit
dl
rm
io.pyc
3654
0644
edit
dl
rm
io.pyo
3654
0644
edit
dl
rm
keyword.py
1992
0755
edit
dl
rm
keyword.pyc
2131
0644
edit
dl
rm
keyword.pyo
2131
0644
edit
dl
rm
linecache.py
4027
0644
edit
dl
rm
linecache.pyc
3350
0644
edit
dl
rm
linecache.pyo
3350
0644
edit
dl
rm
locale.py
102834
0644
edit
dl
rm
locale.pyc
57026
0644
edit
dl
rm
locale.pyo
57026
0644
edit
dl
rm
macpath.py
6289
0644
edit
dl
rm
macpath.pyc
7928
0644
edit
dl
rm
macpath.pyo
7928
0644
edit
dl
rm
macurl2path.py
2731
0644
edit
dl
rm
macurl2path.pyc
2296
0644
edit
dl
rm
macurl2path.pyo
2296
0644
edit
dl
rm
mailbox.py
81240
0644
edit
dl
rm
mailbox.pyc
79564
0644
edit
dl
rm
mailbox.pyo
79517
0644
edit
dl
rm
mailcap.py
7429
0644
edit
dl
rm
mailcap.pyc
7248
0644
edit
dl
rm
mailcap.pyo
7248
0644
edit
dl
rm
markupbase.py
14643
0644
edit
dl
rm
markupbase.pyc
9488
0644
edit
dl
rm
markupbase.pyo
9292
0644
edit
dl
rm
md5.py
358
0644
edit
dl
rm
md5.pyc
391
0644
edit
dl
rm
md5.pyo
391
0644
edit
dl
rm
mhlib.py
33434
0644
edit
dl
rm
mhlib.pyc
34791
0644
edit
dl
rm
mhlib.pyo
34791
0644
edit
dl
rm
mimetools.py
7168
0644
edit
dl
rm
mimetools.pyc
8461
0644
edit
dl
rm
mimetools.pyo
8461
0644
edit
dl
rm
mimetypes.py
21028
0644
edit
dl
rm
mimetypes.pyc
18736
0644
edit
dl
rm
mimetypes.pyo
18736
0644
edit
dl
rm
MimeWriter.py
6482
0644
edit
dl
rm
MimeWriter.pyc
7481
0644
edit
dl
rm
MimeWriter.pyo
7481
0644
edit
dl
rm
mimify.py
15017
0755
edit
dl
rm
mimify.pyc
12196
0644
edit
dl
rm
mimify.pyo
12196
0644
edit
dl
rm
modulefinder.py
24461
0644
edit
dl
rm
modulefinder.pyc
19582
0644
edit
dl
rm
modulefinder.pyo
19500
0644
edit
dl
rm
multifile.py
4820
0644
edit
dl
rm
multifile.pyc
5615
0644
edit
dl
rm
multifile.pyo
5573
0644
edit
dl
rm
mutex.py
1878
0644
edit
dl
rm
mutex.pyc
2607
0644
edit
dl
rm
mutex.pyo
2607
0644
edit
dl
rm
netrc.py
5888
0644
edit
dl
rm
netrc.pyc
4831
0644
edit
dl
rm
netrc.pyo
4831
0644
edit
dl
rm
new.py
610
0644
edit
dl
rm
new.pyc
875
0644
edit
dl
rm
new.pyo
875
0644
edit
dl
rm
nntplib.py
21470
0644
edit
dl
rm
nntplib.pyc
21616
0644
edit
dl
rm
nntplib.pyo
21616
0644
edit
dl
rm
ntpath.py
19429
0644
edit
dl
rm
ntpath.pyc
13415
0644
edit
dl
rm
ntpath.pyo
13415
0644
edit
dl
rm
nturl2path.py
2419
0644
edit
dl
rm
nturl2path.pyc
1854
0644
edit
dl
rm
nturl2path.pyo
1854
0644
edit
dl
rm
numbers.py
10319
0644
edit
dl
rm
numbers.pyc
14818
0644
edit
dl
rm
numbers.pyo
14818
0644
edit
dl
rm
opcode.py
5474
0644
edit
dl
rm
opcode.pyc
6210
0644
edit
dl
rm
opcode.pyo
6210
0644
edit
dl
rm
optparse.py
61203
0644
edit
dl
rm
optparse.pyc
55714
0644
edit
dl
rm
optparse.pyo
55631
0644
edit
dl
rm
os.py
25910
0644
edit
dl
rm
os.pyc
26378
0644
edit
dl
rm
os.pyo
26378
0644
edit
dl
rm
os2emxpath.py
4635
0644
edit
dl
rm
os2emxpath.pyc
4642
0644
edit
dl
rm
os2emxpath.pyo
4642
0644
edit
dl
rm
pdb.doc
7914
0644
edit
dl
rm
pdb.py
46095
0755
edit
dl
rm
pdb.pyc
45151
0644
edit
dl
rm
pdb.pyo
45151
0644
edit
dl
rm
pickle.py
45489
0644
edit
dl
rm
pickle.pyc
39912
0644
edit
dl
rm
pickle.pyo
39716
0644
edit
dl
rm
pickletools.py
74523
0644
edit
dl
rm
pickletools.pyc
57448
0644
edit
dl
rm
pickletools.pyo
56587
0644
edit
dl
rm
pipes.py
9582
0644
edit
dl
rm
pipes.pyc
9516
0644
edit
dl
rm
pipes.pyo
9516
0644
edit
dl
rm
pkgutil.py
20243
0644
edit
dl
rm
pkgutil.pyc
19388
0644
edit
dl
rm
pkgutil.pyo
19388
0644
edit
dl
rm
platform.py
52785
0755
edit
dl
rm
platform.pyc
38602
0644
edit
dl
rm
platform.pyo
38602
0644
edit
dl
rm
plistlib.py
15185
0644
edit
dl
rm
plistlib.pyc
20008
0644
edit
dl
rm
plistlib.pyo
19922
0644
edit
dl
rm
popen2.py
8416
0644
edit
dl
rm
popen2.pyc
9233
0644
edit
dl
rm
popen2.pyo
9191
0644
edit
dl
rm
poplib.py
12824
0644
edit
dl
rm
poplib.pyc
13774
0644
edit
dl
rm
poplib.pyo
13774
0644
edit
dl
rm
posixfile.py
8003
0644
edit
dl
rm
posixfile.pyc
7808
0644
edit
dl
rm
posixfile.pyo
7808
0644
edit
dl
rm
posixpath.py
14293
0644
edit
dl
rm
posixpath.pyc
11761
0644
edit
dl
rm
posixpath.pyo
11761
0644
edit
dl
rm
pprint.py
11777
0644
edit
dl
rm
pprint.pyc
10441
0644
edit
dl
rm
pprint.pyo
10264
0644
edit
dl
rm
profile.py
22778
0755
edit
dl
rm
profile.pyc
16963
0644
edit
dl
rm
profile.pyo
16716
0644
edit
dl
rm
pstats.py
26712
0644
edit
dl
rm
pstats.pyc
25793
0644
edit
dl
rm
pstats.pyo
25793
0644
edit
dl
rm
pty.py
5058
0644
edit
dl
rm
pty.pyc
5096
0644
edit
dl
rm
pty.pyo
5096
0644
edit
dl
rm
pyclbr.py
13388
0644
edit
dl
rm
pyclbr.pyc
9820
0644
edit
dl
rm
pyclbr.pyo
9820
0644
edit
dl
rm
pydoc.py
95663
0755
edit
dl
rm
pydoc.pyc
94914
0644
edit
dl
rm
pydoc.pyo
94850
0644
edit
dl
rm
py_compile.py
5936
0644
edit
dl
rm
py_compile.pyc
6519
0644
edit
dl
rm
py_compile.pyo
6519
0644
edit
dl
rm
Queue.py
8577
0644
edit
dl
rm
Queue.pyc
9788
0644
edit
dl
rm
Queue.pyo
9788
0644
edit
dl
rm
quopri.py
6965
0755
edit
dl
rm
quopri.pyc
6717
0644
edit
dl
rm
quopri.pyo
6717
0644
edit
dl
rm
random.py
32457
0644
edit
dl
rm
random.pyc
26263
0644
edit
dl
rm
random.pyo
26263
0644
edit
dl
rm
re.py
13423
0644
edit
dl
rm
re.pyc
13686
0644
edit
dl
rm
re.pyo
13686
0644
edit
dl
rm
repr.py
4296
0644
edit
dl
rm
repr.pyc
5606
0644
edit
dl
rm
repr.pyo
5606
0644
edit
dl
rm
rexec.py
20148
0644
edit
dl
rm
rexec.pyc
24574
0644
edit
dl
rm
rexec.pyo
24574
0644
edit
dl
rm
rfc822.py
33542
0644
edit
dl
rm
rfc822.pyc
32593
0644
edit
dl
rm
rfc822.pyo
32593
0644
edit
dl
rm
rlcompleter.py
5991
0644
edit
dl
rm
rlcompleter.pyc
6182
0644
edit
dl
rm
rlcompleter.pyo
6182
0644
edit
dl
rm
robotparser.py
7695
0644
edit
dl
rm
robotparser.pyc
8315
0644
edit
dl
rm
robotparser.pyo
8315
0644
edit
dl
rm
runpy.py
11081
0644
edit
dl
rm
runpy.pyc
9063
0644
edit
dl
rm
runpy.pyo
9063
0644
edit
dl
rm
sched.py
5088
0644
edit
dl
rm
sched.pyc
5111
0644
edit
dl
rm
sched.pyo
5111
0644
edit
dl
rm
sets.py
19050
0644
edit
dl
rm
sets.pyc
17623
0644
edit
dl
rm
sets.pyo
17623
0644
edit
dl
rm
sgmllib.py
17884
0644
edit
dl
rm
sgmllib.pyc
16047
0644
edit
dl
rm
sgmllib.pyo
16047
0644
edit
dl
rm
sha.py
393
0644
edit
dl
rm
sha.pyc
434
0644
edit
dl
rm
sha.pyo
434
0644
edit
dl
rm
shelve.py
8178
0644
edit
dl
rm
shelve.pyc
10607
0644
edit
dl
rm
shelve.pyo
10607
0644
edit
dl
rm
shlex.py
11164
0644
edit
dl
rm
shlex.pyc
7727
0644
edit
dl
rm
shlex.pyo
7727
0644
edit
dl
rm
shutil.py
19871
0644
edit
dl
rm
shutil.pyc
19649
0644
edit
dl
rm
shutil.pyo
19649
0644
edit
dl
rm
SimpleHTTPServer.py
7997
0644
edit
dl
rm
SimpleHTTPServer.pyc
8153
0644
edit
dl
rm
SimpleHTTPServer.pyo
8153
0644
edit
dl
rm
SimpleXMLRPCServer.py
25812
0644
edit
dl
rm
SimpleXMLRPCServer.pyc
23331
0644
edit
dl
rm
SimpleXMLRPCServer.pyo
23331
0644
edit
dl
rm
site.py
19637
0644
edit
dl
rm
site.pyc
19819
0644
edit
dl
rm
site.pyo
19819
0644
edit
dl
rm
smtpd.py
18539
0755
edit
dl
rm
smtpd.pyc
16286
0644
edit
dl
rm
smtpd.pyo
16286
0644
edit
dl
rm
smtplib.py
32131
0755
edit
dl
rm
smtplib.pyc
31019
0644
edit
dl
rm
smtplib.pyo
31019
0644
edit
dl
rm
sndhdr.py
5973
0644
edit
dl
rm
sndhdr.pyc
7582
0644
edit
dl
rm
sndhdr.pyo
7582
0644
edit
dl
rm
socket.py
20615
0644
edit
dl
rm
socket.pyc
16542
0644
edit
dl
rm
socket.pyo
16456
0644
edit
dl
rm
SocketServer.py
23948
0644
edit
dl
rm
SocketServer.pyc
24828
0644
edit
dl
rm
SocketServer.pyo
24828
0644
edit
dl
rm
sre.py
384
0644
edit
dl
rm
sre.pyc
532
0644
edit
dl
rm
sre.pyo
532
0644
edit
dl
rm
sre_compile.py
19823
0644
edit
dl
rm
sre_compile.pyc
12755
0644
edit
dl
rm
sre_compile.pyo
12599
0644
edit
dl
rm
sre_constants.py
7197
0644
edit
dl
rm
sre_constants.pyc
6260
0644
edit
dl
rm
sre_constants.pyo
6260
0644
edit
dl
rm
sre_parse.py
30700
0644
edit
dl
rm
sre_parse.pyc
21624
0644
edit
dl
rm
sre_parse.pyo
21624
0644
edit
dl
rm
ssl.py
37455
0644
edit
dl
rm
ssl.pyc
33015
0644
edit
dl
rm
ssl.pyo
33015
0644
edit
dl
rm
stat.py
1842
0644
edit
dl
rm
stat.pyc
2881
0644
edit
dl
rm
stat.pyo
2881
0644
edit
dl
rm
statvfs.py
898
0644
edit
dl
rm
statvfs.pyc
633
0644
edit
dl
rm
statvfs.pyo
633
0644
edit
dl
rm
string.py
21548
0644
edit
dl
rm
string.pyc
21122
0644
edit
dl
rm
string.pyo
21122
0644
edit
dl
rm
StringIO.py
10662
0644
edit
dl
rm
StringIO.pyc
11727
0644
edit
dl
rm
StringIO.pyo
11727
0644
edit
dl
rm
stringold.py
12449
0644
edit
dl
rm
stringold.pyc
12900
0644
edit
dl
rm
stringold.pyo
12900
0644
edit
dl
rm
stringprep.py
13522
0644
edit
dl
rm
stringprep.pyc
14747
0644
edit
dl
rm
stringprep.pyo
14675
0644
edit
dl
rm
struct.py
82
0644
edit
dl
rm
struct.pyc
252
0644
edit
dl
rm
struct.pyo
252
0644
edit
dl
rm
subprocess.py
50520
0644
edit
dl
rm
subprocess.pyc
33100
0644
edit
dl
rm
subprocess.pyo
33100
0644
edit
dl
rm
sunau.py
17222
0644
edit
dl
rm
sunau.pyc
19018
0644
edit
dl
rm
sunau.pyo
19018
0644
edit
dl
rm
sunaudio.py
1399
0644
edit
dl
rm
sunaudio.pyc
2052
0644
edit
dl
rm
sunaudio.pyo
2052
0644
edit
dl
rm
symbol.py
2054
0755
edit
dl
rm
symbol.pyc
3052
0644
edit
dl
rm
symbol.pyo
3052
0644
edit
dl
rm
symtable.py
7437
0644
edit
dl
rm
symtable.pyc
12436
0644
edit
dl
rm
symtable.pyo
12305
0644
edit
dl
rm
sysconfig.py
22852
0644
edit
dl
rm
sysconfig.pyc
18156
0644
edit
dl
rm
sysconfig.pyo
18153
0644
edit
dl
rm
tabnanny.py
11336
0755
edit
dl
rm
tabnanny.pyc
8507
0644
edit
dl
rm
tabnanny.pyo
8507
0644
edit
dl
rm
tarfile.py
90568
0644
edit
dl
rm
tarfile.pyc
78374
0644
edit
dl
rm
tarfile.pyo
78374
0644
edit
dl
rm
telnetlib.py
27036
0644
edit
dl
rm
telnetlib.pyc
23583
0644
edit
dl
rm
telnetlib.pyo
23583
0644
edit
dl
rm
tempfile.py
19547
0644
edit
dl
rm
tempfile.pyc
21046
0644
edit
dl
rm
tempfile.pyo
21046
0644
edit
dl
rm
textwrap.py
17280
0644
edit
dl
rm
textwrap.pyc
12279
0644
edit
dl
rm
textwrap.pyo
12187
0644
edit
dl
rm
this.py
1002
0644
edit
dl
rm
this.pyc
1233
0644
edit
dl
rm
this.pyo
1233
0644
edit
dl
rm
threading.py
47282
0644
edit
dl
rm
threading.pyc
43999
0644
edit
dl
rm
threading.pyo
41825
0644
edit
dl
rm
timeit.py
12788
0755
edit
dl
rm
timeit.pyc
12352
0644
edit
dl
rm
timeit.pyo
12352
0644
edit
dl
rm
toaiff.py
3142
0644
edit
dl
rm
toaiff.pyc
3158
0644
edit
dl
rm
toaiff.pyo
3158
0644
edit
dl
rm
token.py
2922
0644
edit
dl
rm
token.pyc
3881
0644
edit
dl
rm
token.pyo
3881
0644
edit
dl
rm
tokenize.py
17483
0644
edit
dl
rm
tokenize.pyc
14713
0644
edit
dl
rm
tokenize.pyo
14657
0644
edit
dl
rm
trace.py
29888
0755
edit
dl
rm
trace.pyc
23235
0644
edit
dl
rm
trace.pyo
23172
0644
edit
dl
rm
traceback.py
11285
0644
edit
dl
rm
traceback.pyc
11939
0644
edit
dl
rm
traceback.pyo
11939
0644
edit
dl
rm
tty.py
879
0644
edit
dl
rm
tty.pyc
1356
0644
edit
dl
rm
tty.pyo
1356
0644
edit
dl
rm
types.py
2094
0644
edit
dl
rm
types.pyc
2816
0644
edit
dl
rm
types.pyo
2816
0644
edit
dl
rm
urllib.py
60228
0644
edit
dl
rm
urllib.pyc
52580
0644
edit
dl
rm
urllib.pyo
52485
0644
edit
dl
rm
urllib2.py
52537
0644
edit
dl
rm
urllib2.pyc
48949
0644
edit
dl
rm
urllib2.pyo
48854
0644
edit
dl
rm
urlparse.py
16678
0644
edit
dl
rm
urlparse.pyc
15886
0644
edit
dl
rm
urlparse.pyo
15886
0644
edit
dl
rm
user.py
1627
0644
edit
dl
rm
user.pyc
1737
0644
edit
dl
rm
user.pyo
1737
0644
edit
dl
rm
UserDict.py
7060
0644
edit
dl
rm
UserDict.pyc
10296
0644
edit
dl
rm
UserDict.pyo
10296
0644
edit
dl
rm
UserList.py
3644
0644
edit
dl
rm
UserList.pyc
7019
0644
edit
dl
rm
UserList.pyo
7019
0644
edit
dl
rm
UserString.py
9684
0755
edit
dl
rm
UserString.pyc
15748
0644
edit
dl
rm
UserString.pyo
15748
0644
edit
dl
rm
uu.py
6694
0755
edit
dl
rm
uu.pyc
4455
0644
edit
dl
rm
uu.pyo
4455
0644
edit
dl
rm
uuid.py
23175
0644
edit
dl
rm
uuid.pyc
23778
0644
edit
dl
rm
uuid.pyo
23662
0644
edit
dl
rm
warnings.py
14823
0644
edit
dl
rm
warnings.pyc
13809
0644
edit
dl
rm
warnings.pyo
13020
0644
edit
dl
rm
wave.py
18582
0644
edit
dl
rm
wave.pyc
20676
0644
edit
dl
rm
wave.pyo
20532
0644
edit
dl
rm
weakref.py
14830
0644
edit
dl
rm
weakref.pyc
17130
0644
edit
dl
rm
weakref.pyo
17130
0644
edit
dl
rm
webbrowser.py
22722
0755
edit
dl
rm
webbrowser.pyc
20335
0644
edit
dl
rm
webbrowser.pyo
20290
0644
edit
dl
rm
whichdb.py
3388
0644
edit
dl
rm
whichdb.pyc
2267
0644
edit
dl
rm
whichdb.pyo
2267
0644
edit
dl
rm
wsgiref.egg-info
187
0644
edit
dl
rm
xdrlib.py
6069
0644
edit
dl
rm
xdrlib.pyc
10448
0644
edit
dl
rm
xdrlib.pyo
10448
0644
edit
dl
rm
xmllib.py
34865
0644
edit
dl
rm
xmllib.pyc
27550
0644
edit
dl
rm
xmllib.pyo
27550
0644
edit
dl
rm
xmlrpclib.py
52136
0644
edit
dl
rm
xmlrpclib.pyc
45887
0644
edit
dl
rm
xmlrpclib.pyo
45703
0644
edit
dl
rm
zipfile.py
59477
0644
edit
dl
rm
zipfile.pyc
42930
0644
edit
dl
rm
zipfile.pyo
42930
0644
edit
dl
rm
_abcoll.py
18619
0644
edit
dl
rm
_abcoll.pyc
27034
0644
edit
dl
rm
_abcoll.pyo
27034
0644
edit
dl
rm
_LWPCookieJar.py
6553
0644
edit
dl
rm
_LWPCookieJar.pyc
5512
0644
edit
dl
rm
_LWPCookieJar.pyo
5512
0644
edit
dl
rm
_MozillaCookieJar.py
5797
0644
edit
dl
rm
_MozillaCookieJar.pyc
4513
0644
edit
dl
rm
_MozillaCookieJar.pyo
4474
0644
edit
dl
rm
_osx_support.py
19100
0644
edit
dl
rm
_osx_support.pyc
12005
0644
edit
dl
rm
_osx_support.pyo
12005
0644
edit
dl
rm
_pyio.py
69630
0644
edit
dl
rm
_pyio.pyc
66976
0644
edit
dl
rm
_pyio.pyo
66976
0644
edit
dl
rm
_strptime.py
20728
0644
edit
dl
rm
_strptime.pyc
15432
0644
edit
dl
rm
_strptime.pyo
15432
0644
edit
dl
rm
_sysconfigdata.py
19182
0644
edit
dl
rm
_sysconfigdata.pyc
22361
0644
edit
dl
rm
_sysconfigdata.pyo
22361
0644
edit
dl
rm
_threading_local.py
7260
0644
edit
dl
rm
_threading_local.pyc
6490
0644
edit
dl
rm
_threading_local.pyo
6490
0644
edit
dl
rm
_weakrefset.py
5911
0644
edit
dl
rm
_weakrefset.pyc
10302
0644
edit
dl
rm
_weakrefset.pyo
10302
0644
edit
dl
rm
__future__.py
4380
0644
edit
dl
rm
__future__.pyc
4301
0644
edit
dl
rm
__future__.pyo
4301
0644
edit
dl
rm
__phello__.foo.py
64
0644
edit
dl
rm
__phello__.foo.pyc
138
0644
edit
dl
rm
__phello__.foo.pyo
138
0644
edit
dl
rm
Edit:
/opt/alt/python27/lib64/python2.7/_strptime.py
(20728B)
"""Strptime-related classes and functions. CLASSES: LocaleTime -- Discovers and stores locale-specific time information TimeRE -- Creates regexes for pattern matching a string of text containing time information FUNCTIONS: _getlang -- Figure out what language is being used for the locale strptime -- Calculates the time struct represented by the passed-in string """ import time import locale import calendar from re import compile as re_compile from re import IGNORECASE from re import escape as re_escape from datetime import date as datetime_date try: from thread import allocate_lock as _thread_allocate_lock except: from dummy_thread import allocate_lock as _thread_allocate_lock __all__ = [] def _getlang(): # Figure out what the current language is set to. return locale.getlocale(locale.LC_TIME) class LocaleTime(object): """Stores and handles locale-specific information related to time. ATTRIBUTES: f_weekday -- full weekday names (7-item list) a_weekday -- abbreviated weekday names (7-item list) f_month -- full month names (13-item list; dummy value in [0], which is added by code) a_month -- abbreviated month names (13-item list, dummy value in [0], which is added by code) am_pm -- AM/PM representation (2-item list) LC_date_time -- format string for date/time representation (string) LC_date -- format string for date representation (string) LC_time -- format string for time representation (string) timezone -- daylight- and non-daylight-savings timezone representation (2-item list of sets) lang -- Language used by instance (2-item tuple) """ def __init__(self): """Set all attributes. Order of methods called matters for dependency reasons. The locale language is set at the offset and then checked again before exiting. This is to make sure that the attributes were not set with a mix of information from more than one locale. This would most likely happen when using threads where one thread calls a locale-dependent function while another thread changes the locale while the function in the other thread is still running. Proper coding would call for locks to prevent changing the locale while locale-dependent code is running. The check here is done in case someone does not think about doing this. Only other possible issue is if someone changed the timezone and did not call tz.tzset . That is an issue for the programmer, though, since changing the timezone is worthless without that call. """ self.lang = _getlang() self.__calc_weekday() self.__calc_month() self.__calc_am_pm() self.__calc_timezone() self.__calc_date_time() if _getlang() != self.lang: raise ValueError("locale changed during initialization") if time.tzname != self.tzname or time.daylight != self.daylight: raise ValueError("timezone changed during initialization") def __pad(self, seq, front): # Add '' to seq to either the front (is True), else the back. seq = list(seq) if front: seq.insert(0, '') else: seq.append('') return seq def __calc_weekday(self): # Set self.a_weekday and self.f_weekday using the calendar # module. a_weekday = [calendar.day_abbr[i].lower() for i in range(7)] f_weekday = [calendar.day_name[i].lower() for i in range(7)] self.a_weekday = a_weekday self.f_weekday = f_weekday def __calc_month(self): # Set self.f_month and self.a_month using the calendar module. a_month = [calendar.month_abbr[i].lower() for i in range(13)] f_month = [calendar.month_name[i].lower() for i in range(13)] self.a_month = a_month self.f_month = f_month def __calc_am_pm(self): # Set self.am_pm by using time.strftime(). # The magic date (1999,3,17,hour,44,55,2,76,0) is not really that # magical; just happened to have used it everywhere else where a # static date was needed. am_pm = [] for hour in (01,22): time_tuple = time.struct_time((1999,3,17,hour,44,55,2,76,0)) am_pm.append(time.strftime("%p", time_tuple).lower()) self.am_pm = am_pm def __calc_date_time(self): # Set self.date_time, self.date, & self.time by using # time.strftime(). # Use (1999,3,17,22,44,55,2,76,0) for magic date because the amount of # overloaded numbers is minimized. The order in which searches for # values within the format string is very important; it eliminates # possible ambiguity for what something represents. time_tuple = time.struct_time((1999,3,17,22,44,55,2,76,0)) date_time = [None, None, None] date_time[0] = time.strftime("%c", time_tuple).lower() date_time[1] = time.strftime("%x", time_tuple).lower() date_time[2] = time.strftime("%X", time_tuple).lower() replacement_pairs = [('%', '%%'), (self.f_weekday[2], '%A'), (self.f_month[3], '%B'), (self.a_weekday[2], '%a'), (self.a_month[3], '%b'), (self.am_pm[1], '%p'), ('1999', '%Y'), ('99', '%y'), ('22', '%H'), ('44', '%M'), ('55', '%S'), ('76', '%j'), ('17', '%d'), ('03', '%m'), ('3', '%m'), # '3' needed for when no leading zero. ('2', '%w'), ('10', '%I')] replacement_pairs.extend([(tz, "%Z") for tz_values in self.timezone for tz in tz_values]) for offset,directive in ((0,'%c'), (1,'%x'), (2,'%X')): current_format = date_time[offset] for old, new in replacement_pairs: # Must deal with possible lack of locale info # manifesting itself as the empty string (e.g., Swedish's # lack of AM/PM info) or a platform returning a tuple of empty # strings (e.g., MacOS 9 having timezone as ('','')). if old: current_format = current_format.replace(old, new) # If %W is used, then Sunday, 2005-01-03 will fall on week 0 since # 2005-01-03 occurs before the first Monday of the year. Otherwise # %U is used. time_tuple = time.struct_time((1999,1,3,1,1,1,6,3,0)) if '00' in time.strftime(directive, time_tuple): U_W = '%W' else: U_W = '%U' date_time[offset] = current_format.replace('11', U_W) self.LC_date_time = date_time[0] self.LC_date = date_time[1] self.LC_time = date_time[2] def __calc_timezone(self): # Set self.timezone by using time.tzname. # Do not worry about possibility of time.tzname[0] == time.tzname[1] # and time.daylight; handle that in strptime. try: time.tzset() except AttributeError: pass self.tzname = time.tzname self.daylight = time.daylight no_saving = frozenset(["utc", "gmt", self.tzname[0].lower()]) if self.daylight: has_saving = frozenset([self.tzname[1].lower()]) else: has_saving = frozenset() self.timezone = (no_saving, has_saving) class TimeRE(dict): """Handle conversion from format directives to regexes.""" def __init__(self, locale_time=None): """Create keys/values. Order of execution is important for dependency reasons. """ if locale_time: self.locale_time = locale_time else: self.locale_time = LocaleTime() base = super(TimeRE, self) base.__init__({ # The " \d" part of the regex is to make %c from ANSI C work 'd': r"(?P<d>3[0-1]|[1-2]\d|0[1-9]|[1-9]| [1-9])", 'f': r"(?P<f>[0-9]{1,6})", 'H': r"(?P<H>2[0-3]|[0-1]\d|\d)", 'I': r"(?P<I>1[0-2]|0[1-9]|[1-9])", 'j': r"(?P<j>36[0-6]|3[0-5]\d|[1-2]\d\d|0[1-9]\d|00[1-9]|[1-9]\d|0[1-9]|[1-9])", 'm': r"(?P<m>1[0-2]|0[1-9]|[1-9])", 'M': r"(?P<M>[0-5]\d|\d)", 'S': r"(?P<S>6[0-1]|[0-5]\d|\d)", 'U': r"(?P<U>5[0-3]|[0-4]\d|\d)", 'w': r"(?P<w>[0-6])", # W is set below by using 'U' 'y': r"(?P<y>\d\d)", #XXX: Does 'Y' need to worry about having less or more than # 4 digits? 'Y': r"(?P<Y>\d\d\d\d)", 'A': self.__seqToRE(self.locale_time.f_weekday, 'A'), 'a': self.__seqToRE(self.locale_time.a_weekday, 'a'), 'B': self.__seqToRE(self.locale_time.f_month[1:], 'B'), 'b': self.__seqToRE(self.locale_time.a_month[1:], 'b'), 'p': self.__seqToRE(self.locale_time.am_pm, 'p'), 'Z': self.__seqToRE((tz for tz_names in self.locale_time.timezone for tz in tz_names), 'Z'), '%': '%'}) base.__setitem__('W', base.__getitem__('U').replace('U', 'W')) base.__setitem__('c', self.pattern(self.locale_time.LC_date_time)) base.__setitem__('x', self.pattern(self.locale_time.LC_date)) base.__setitem__('X', self.pattern(self.locale_time.LC_time)) def __seqToRE(self, to_convert, directive): """Convert a list to a regex string for matching a directive. Want possible matching values to be from longest to shortest. This prevents the possibility of a match occurring for a value that also a substring of a larger value that should have matched (e.g., 'abc' matching when 'abcdef' should have been the match). """ to_convert = sorted(to_convert, key=len, reverse=True) for value in to_convert: if value != '': break else: return '' regex = '|'.join(re_escape(stuff) for stuff in to_convert) regex = '(?P<%s>%s' % (directive, regex) return '%s)' % regex def pattern(self, format): """Return regex pattern for the format string. Need to make sure that any characters that might be interpreted as regex syntax are escaped. """ processed_format = '' # The sub() call escapes all characters that might be misconstrued # as regex syntax. Cannot use re.escape since we have to deal with # format directives (%m, etc.). regex_chars = re_compile(r"([\\.^$*+?\(\){}\[\]|])") format = regex_chars.sub(r"\\\1", format) whitespace_replacement = re_compile(r'\s+') format = whitespace_replacement.sub(r'\\s+', format) while '%' in format: directive_index = format.index('%')+1 processed_format = "%s%s%s" % (processed_format, format[:directive_index-1], self[format[directive_index]]) format = format[directive_index+1:] return "%s%s" % (processed_format, format) def compile(self, format): """Return a compiled re object for the format string.""" return re_compile(self.pattern(format), IGNORECASE) _cache_lock = _thread_allocate_lock() # DO NOT modify _TimeRE_cache or _regex_cache without acquiring the cache lock # first! _TimeRE_cache = TimeRE() _CACHE_MAX_SIZE = 5 # Max number of regexes stored in _regex_cache _regex_cache = {} def _calc_julian_from_U_or_W(year, week_of_year, day_of_week, week_starts_Mon): """Calculate the Julian day based on the year, week of the year, and day of the week, with week_start_day representing whether the week of the year assumes the week starts on Sunday or Monday (6 or 0).""" first_weekday = datetime_date(year, 1, 1).weekday() # If we are dealing with the %U directive (week starts on Sunday), it's # easier to just shift the view to Sunday being the first day of the # week. if not week_starts_Mon: first_weekday = (first_weekday + 1) % 7 day_of_week = (day_of_week + 1) % 7 # Need to watch out for a week 0 (when the first day of the year is not # the same as that specified by %U or %W). week_0_length = (7 - first_weekday) % 7 if week_of_year == 0: return 1 + day_of_week - first_weekday else: days_to_week = week_0_length + (7 * (week_of_year - 1)) return 1 + days_to_week + day_of_week def _strptime(data_string, format="%a %b %d %H:%M:%S %Y"): """Return a time struct based on the input string and the format string.""" global _TimeRE_cache, _regex_cache with _cache_lock: locale_time = _TimeRE_cache.locale_time if (_getlang() != locale_time.lang or time.tzname != locale_time.tzname or time.daylight != locale_time.daylight): _TimeRE_cache = TimeRE() _regex_cache.clear() locale_time = _TimeRE_cache.locale_time if len(_regex_cache) > _CACHE_MAX_SIZE: _regex_cache.clear() format_regex = _regex_cache.get(format) if not format_regex: try: format_regex = _TimeRE_cache.compile(format) # KeyError raised when a bad format is found; can be specified as # \\, in which case it was a stray % but with a space after it except KeyError, err: bad_directive = err.args[0] if bad_directive == "\\": bad_directive = "%" del err raise ValueError("'%s' is a bad directive in format '%s'" % (bad_directive, format)) # IndexError only occurs when the format string is "%" except IndexError: raise ValueError("stray %% in format '%s'" % format) _regex_cache[format] = format_regex found = format_regex.match(data_string) if not found: raise ValueError("time data %r does not match format %r" % (data_string, format)) if len(data_string) != found.end(): raise ValueError("unconverted data remains: %s" % data_string[found.end():]) year = None month = day = 1 hour = minute = second = fraction = 0 tz = -1 # Default to -1 to signify that values not known; not critical to have, # though week_of_year = -1 week_of_year_start = -1 # weekday and julian defaulted to None so as to signal need to calculate # values weekday = julian = None found_dict = found.groupdict() for group_key in found_dict.iterkeys(): # Directives not explicitly handled below: # c, x, X # handled by making out of other directives # U, W # worthless without day of the week if group_key == 'y': year = int(found_dict['y']) # Open Group specification for strptime() states that a %y #value in the range of [00, 68] is in the century 2000, while #[69,99] is in the century 1900 if year <= 68: year += 2000 else: year += 1900 elif group_key == 'Y': year = int(found_dict['Y']) elif group_key == 'm': month = int(found_dict['m']) elif group_key == 'B': month = locale_time.f_month.index(found_dict['B'].lower()) elif group_key == 'b': month = locale_time.a_month.index(found_dict['b'].lower()) elif group_key == 'd': day = int(found_dict['d']) elif group_key == 'H': hour = int(found_dict['H']) elif group_key == 'I': hour = int(found_dict['I']) ampm = found_dict.get('p', '').lower() # If there was no AM/PM indicator, we'll treat this like AM if ampm in ('', locale_time.am_pm[0]): # We're in AM so the hour is correct unless we're # looking at 12 midnight. # 12 midnight == 12 AM == hour 0 if hour == 12: hour = 0 elif ampm == locale_time.am_pm[1]: # We're in PM so we need to add 12 to the hour unless # we're looking at 12 noon. # 12 noon == 12 PM == hour 12 if hour != 12: hour += 12 elif group_key == 'M': minute = int(found_dict['M']) elif group_key == 'S': second = int(found_dict['S']) elif group_key == 'f': s = found_dict['f'] # Pad to always return microseconds. s += "0" * (6 - len(s)) fraction = int(s) elif group_key == 'A': weekday = locale_time.f_weekday.index(found_dict['A'].lower()) elif group_key == 'a': weekday = locale_time.a_weekday.index(found_dict['a'].lower()) elif group_key == 'w': weekday = int(found_dict['w']) if weekday == 0: weekday = 6 else: weekday -= 1 elif group_key == 'j': julian = int(found_dict['j']) elif group_key in ('U', 'W'): week_of_year = int(found_dict[group_key]) if group_key == 'U': # U starts week on Sunday. week_of_year_start = 6 else: # W starts week on Monday. week_of_year_start = 0 elif group_key == 'Z': # Since -1 is default value only need to worry about setting tz if # it can be something other than -1. found_zone = found_dict['Z'].lower() for value, tz_values in enumerate(locale_time.timezone): if found_zone in tz_values: # Deal with bad locale setup where timezone names are the # same and yet time.daylight is true; too ambiguous to # be able to tell what timezone has daylight savings if (time.tzname[0] == time.tzname[1] and time.daylight and found_zone not in ("utc", "gmt")): break else: tz = value break leap_year_fix = False if year is None and month == 2 and day == 29: year = 1904 # 1904 is first leap year of 20th century leap_year_fix = True elif year is None: year = 1900 # If we know the week of the year and what day of that week, we can figure # out the Julian day of the year. if julian is None and week_of_year != -1 and weekday is not None: week_starts_Mon = True if week_of_year_start == 0 else False julian = _calc_julian_from_U_or_W(year, week_of_year, weekday, week_starts_Mon) if julian <= 0: year -= 1 yday = 366 if calendar.isleap(year) else 365 julian += yday # Cannot pre-calculate datetime_date() since can change in Julian # calculation and thus could have different value for the day of the week # calculation. if julian is None: # Need to add 1 to result since first day of the year is 1, not 0. julian = datetime_date(year, month, day).toordinal() - \ datetime_date(year, 1, 1).toordinal() + 1 else: # Assume that if they bothered to include Julian day it will # be accurate. datetime_result = datetime_date.fromordinal((julian - 1) + datetime_date(year, 1, 1).toordinal()) year = datetime_result.year month = datetime_result.month day = datetime_result.day if weekday is None: weekday = datetime_date(year, month, day).weekday() if leap_year_fix: # the caller didn't supply a year but asked for Feb 29th. We couldn't # use the default of 1900 for computations. We set it back to ensure # that February 29th is smaller than March 1st. year = 1900 return (time.struct_time((year, month, day, hour, minute, second, weekday, julian, tz)), fraction) def _strptime_time(data_string, format="%a %b %d %H:%M:%S %Y"): return _strptime(data_string, format)[0]
Save
cmd:
run