/opt/alt/python34/lib64/python3.4/__pycache__
NameSizeModeActions
abc.cpython-34.pyc78770644editdlrm
abc.cpython-34.pyo78270644editdlrm
aifc.cpython-34.pyc279120644editdlrm
aifc.cpython-34.pyo279120644editdlrm
antigravity.cpython-34.pyc8470644editdlrm
antigravity.cpython-34.pyo8470644editdlrm
argparse.cpython-34.pyc658740644editdlrm
argparse.cpython-34.pyo657150644editdlrm
ast.cpython-34.pyc123600644editdlrm
ast.cpython-34.pyo123600644editdlrm
asynchat.cpython-34.pyc83590644editdlrm
asynchat.cpython-34.pyo83590644editdlrm
asyncore.cpython-34.pyc179630644editdlrm
asyncore.cpython-34.pyo179630644editdlrm
base64.cpython-34.pyc182970644editdlrm
base64.cpython-34.pyo180990644editdlrm
bdb.cpython-34.pyc186940644editdlrm
bdb.cpython-34.pyo186940644editdlrm
binhex.cpython-34.pyc135410644editdlrm
binhex.cpython-34.pyo135410644editdlrm
bisect.cpython-34.pyc28580644editdlrm
bisect.cpython-34.pyo28580644editdlrm
bz2.cpython-34.pyc151560644editdlrm
bz2.cpython-34.pyo151560644editdlrm
calendar.cpython-34.pyc275670644editdlrm
calendar.cpython-34.pyo275670644editdlrm
cgi.cpython-34.pyc298270644editdlrm
cgi.cpython-34.pyo298270644editdlrm
cgitb.cpython-34.pyc110640644editdlrm
cgitb.cpython-34.pyo110640644editdlrm
chunk.cpython-34.pyc52700644editdlrm
chunk.cpython-34.pyo52700644editdlrm
cmd.cpython-34.pyc134560644editdlrm
cmd.cpython-34.pyo134560644editdlrm
code.cpython-34.pyc97020644editdlrm
code.cpython-34.pyo97020644editdlrm
codecs.cpython-34.pyc351320644editdlrm
codecs.cpython-34.pyo351320644editdlrm
codeop.cpython-34.pyc64660644editdlrm
codeop.cpython-34.pyo64660644editdlrm
colorsys.cpython-34.pyc36590644editdlrm
colorsys.cpython-34.pyo36590644editdlrm
compileall.cpython-34.pyc73780644editdlrm
compileall.cpython-34.pyo73780644editdlrm
configparser.cpython-34.pyc448820644editdlrm
configparser.cpython-34.pyo448820644editdlrm
contextlib.cpython-34.pyc103700644editdlrm
contextlib.cpython-34.pyo103700644editdlrm
copy.cpython-34.pyc80610644editdlrm
copy.cpython-34.pyo79750644editdlrm
copyreg.cpython-34.pyc46070644editdlrm
copyreg.cpython-34.pyo45660644editdlrm
cProfile.cpython-34.pyc46220644editdlrm
cProfile.cpython-34.pyo46220644editdlrm
crypt.cpython-34.pyc24370644editdlrm
crypt.cpython-34.pyo24370644editdlrm
csv.cpython-34.pyc129970644editdlrm
csv.cpython-34.pyo129970644editdlrm
datetime.cpython-34.pyc562640644editdlrm
datetime.cpython-34.pyo542960644editdlrm
decimal.cpython-34.pyc1725260644editdlrm
decimal.cpython-34.pyo1725260644editdlrm
difflib.cpython-34.pyc605150644editdlrm
difflib.cpython-34.pyo604670644editdlrm
dis.cpython-34.pyc145870644editdlrm
dis.cpython-34.pyo145870644editdlrm
doctest.cpython-34.pyc801100644editdlrm
doctest.cpython-34.pyo798370644editdlrm
dummy_threading.cpython-34.pyc12140644editdlrm
dummy_threading.cpython-34.pyo12140644editdlrm
enum.cpython-34.pyc163390644editdlrm
enum.cpython-34.pyo163390644editdlrm
filecmp.cpython-34.pyc91200644editdlrm
filecmp.cpython-34.pyo91200644editdlrm
fileinput.cpython-34.pyc142970644editdlrm
fileinput.cpython-34.pyo142970644editdlrm
fnmatch.cpython-34.pyc31460644editdlrm
fnmatch.cpython-34.pyo31460644editdlrm
formatter.cpython-34.pyc189160644editdlrm
formatter.cpython-34.pyo189160644editdlrm
fractions.cpython-34.pyc192700644editdlrm
fractions.cpython-34.pyo192700644editdlrm
ftplib.cpython-34.pyc333220644editdlrm
ftplib.cpython-34.pyo333220644editdlrm
functools.cpython-34.pyc236140644editdlrm
functools.cpython-34.pyo236140644editdlrm
genericpath.cpython-34.pyc34930644editdlrm
genericpath.cpython-34.pyo34930644editdlrm
getopt.cpython-34.pyc67330644editdlrm
getopt.cpython-34.pyo66910644editdlrm
getpass.cpython-34.pyc46240644editdlrm
getpass.cpython-34.pyo46240644editdlrm
gettext.cpython-34.pyc151740644editdlrm
gettext.cpython-34.pyo151740644editdlrm
glob.cpython-34.pyc28800644editdlrm
glob.cpython-34.pyo28800644editdlrm
gzip.cpython-34.pyc194460644editdlrm
gzip.cpython-34.pyo193920644editdlrm
hashlib.cpython-34.pyc79440644editdlrm
hashlib.cpython-34.pyo79440644editdlrm
heapq.cpython-34.pyc139100644editdlrm
heapq.cpython-34.pyo139100644editdlrm
hmac.cpython-34.pyc51460644editdlrm
hmac.cpython-34.pyo51460644editdlrm
imaplib.cpython-34.pyc434790644editdlrm
imaplib.cpython-34.pyo409550644editdlrm
imghdr.cpython-34.pyc41430644editdlrm
imghdr.cpython-34.pyo41430644editdlrm
imp.cpython-34.pyc98670644editdlrm
imp.cpython-34.pyo98670644editdlrm
inspect.cpython-34.pyc763270644editdlrm
inspect.cpython-34.pyo760060644editdlrm
io.cpython-34.pyc34580644editdlrm
io.cpython-34.pyo34580644editdlrm
ipaddress.cpython-34.pyc629840644editdlrm
ipaddress.cpython-34.pyo629840644editdlrm
keyword.cpython-34.pyc19460644editdlrm
keyword.cpython-34.pyo19460644editdlrm
linecache.cpython-34.pyc31120644editdlrm
linecache.cpython-34.pyo31120644editdlrm
locale.cpython-34.pyc372760644editdlrm
locale.cpython-34.pyo372760644editdlrm
lzma.cpython-34.pyc159170644editdlrm
lzma.cpython-34.pyo159170644editdlrm
macpath.cpython-34.pyc60060644editdlrm
macpath.cpython-34.pyo60060644editdlrm
macurl2path.cpython-34.pyc21020644editdlrm
macurl2path.cpython-34.pyo21020644editdlrm
mailbox.cpython-34.pyc702880644editdlrm
mailbox.cpython-34.pyo701890644editdlrm
mailcap.cpython-34.pyc65440644editdlrm
mailcap.cpython-34.pyo65440644editdlrm
mimetypes.cpython-34.pyc168070644editdlrm
mimetypes.cpython-34.pyo168070644editdlrm
modulefinder.cpython-34.pyc173760644editdlrm
modulefinder.cpython-34.pyo172970644editdlrm
netrc.cpython-34.pyc42770644editdlrm
netrc.cpython-34.pyo42770644editdlrm
nntplib.cpython-34.pyc363100644editdlrm
nntplib.cpython-34.pyo363100644editdlrm
ntpath.cpython-34.pyc133050644editdlrm
ntpath.cpython-34.pyo133050644editdlrm
nturl2path.cpython-34.pyc17160644editdlrm
nturl2path.cpython-34.pyo17160644editdlrm
numbers.cpython-34.pyc126670644editdlrm
numbers.cpython-34.pyo126670644editdlrm
opcode.cpython-34.pyc51740644editdlrm
opcode.cpython-34.pyo51740644editdlrm
operator.cpython-34.pyc127780644editdlrm
operator.cpython-34.pyo127780644editdlrm
optparse.cpython-34.pyc515370644editdlrm
optparse.cpython-34.pyo514600644editdlrm
os.cpython-34.pyc295990644editdlrm
os.cpython-34.pyo295990644editdlrm
pathlib.cpython-34.pyc404830644editdlrm
pathlib.cpython-34.pyo404830644editdlrm
pdb.cpython-34.pyc494720644editdlrm
pdb.cpython-34.pyo494060644editdlrm
pickle.cpython-34.pyc469840644editdlrm
pickle.cpython-34.pyo468380644editdlrm
pickletools.cpython-34.pyc702540644editdlrm
pickletools.cpython-34.pyo691670644editdlrm
pipes.cpython-34.pyc84310644editdlrm
pipes.cpython-34.pyo84310644editdlrm
pkgutil.cpython-34.pyc176000644editdlrm
pkgutil.cpython-34.pyo176000644editdlrm
platform.cpython-34.pyc311720644editdlrm
platform.cpython-34.pyo311720644editdlrm
plistlib.cpython-34.pyc301510644editdlrm
plistlib.cpython-34.pyo300680644editdlrm
poplib.cpython-34.pyc137540644editdlrm
poplib.cpython-34.pyo137540644editdlrm
posixpath.cpython-34.pyc98090644editdlrm
posixpath.cpython-34.pyo98090644editdlrm
pprint.cpython-34.pyc114600644editdlrm
pprint.cpython-34.pyo112950644editdlrm
profile.cpython-34.pyc151510644editdlrm
profile.cpython-34.pyo148980644editdlrm
pstats.cpython-34.pyc236750644editdlrm
pstats.cpython-34.pyo236750644editdlrm
pty.cpython-34.pyc42250644editdlrm
pty.cpython-34.pyo42250644editdlrm
pyclbr.cpython-34.pyc91920644editdlrm
pyclbr.cpython-34.pyo91920644editdlrm
pydoc.cpython-34.pyc909150644editdlrm
pydoc.cpython-34.pyo908540644editdlrm
py_compile.cpython-34.pyc68570644editdlrm
py_compile.cpython-34.pyo68570644editdlrm
queue.cpython-34.pyc92620644editdlrm
queue.cpython-34.pyo92620644editdlrm
quopri.cpython-34.pyc64460644editdlrm
quopri.cpython-34.pyo62360644editdlrm
random.cpython-34.pyc190590644editdlrm
random.cpython-34.pyo190590644editdlrm
re.cpython-34.pyc145500644editdlrm
re.cpython-34.pyo145500644editdlrm
reprlib.cpython-34.pyc58720644editdlrm
reprlib.cpython-34.pyo58720644editdlrm
rlcompleter.cpython-34.pyc56950644editdlrm
rlcompleter.cpython-34.pyo56950644editdlrm
runpy.cpython-34.pyc77530644editdlrm
runpy.cpython-34.pyo77530644editdlrm
sched.cpython-34.pyc65730644editdlrm
sched.cpython-34.pyo65730644editdlrm
selectors.cpython-34.pyc167440644editdlrm
selectors.cpython-34.pyo167440644editdlrm
shelve.cpython-34.pyc99550644editdlrm
shelve.cpython-34.pyo99550644editdlrm
shlex.cpython-34.pyc75180644editdlrm
shlex.cpython-34.pyo75180644editdlrm
shutil.cpython-34.pyc330150644editdlrm
shutil.cpython-34.pyo330150644editdlrm
site.cpython-34.pyc179710644editdlrm
site.cpython-34.pyo179710644editdlrm
smtpd.cpython-34.pyc256690644editdlrm
smtpd.cpython-34.pyo256690644editdlrm
smtplib.cpython-34.pyc331290644editdlrm
smtplib.cpython-34.pyo330550644editdlrm
sndhdr.cpython-34.pyc67690644editdlrm
sndhdr.cpython-34.pyo67690644editdlrm
socket.cpython-34.pyc181110644editdlrm
socket.cpython-34.pyo180610644editdlrm
socketserver.cpython-34.pyc232550644editdlrm
socketserver.cpython-34.pyo232550644editdlrm
sre_compile.cpython-34.pyc119350644editdlrm
sre_compile.cpython-34.pyo117780644editdlrm
sre_constants.cpython-34.pyc55810644editdlrm
sre_constants.cpython-34.pyo55810644editdlrm
sre_parse.cpython-34.pyc202380644editdlrm
sre_parse.cpython-34.pyo202380644editdlrm
ssl.cpython-34.pyc276080644editdlrm
ssl.cpython-34.pyo276080644editdlrm
stat.cpython-34.pyc35780644editdlrm
stat.cpython-34.pyo35780644editdlrm
statistics.cpython-34.pyc171580644editdlrm
statistics.cpython-34.pyo168560644editdlrm
string.cpython-34.pyc83760644editdlrm
string.cpython-34.pyo83760644editdlrm
stringprep.cpython-34.pyc136360644editdlrm
stringprep.cpython-34.pyo135730644editdlrm
struct.cpython-34.pyc3470644editdlrm
struct.cpython-34.pyo3470644editdlrm
subprocess.cpython-34.pyc433590644editdlrm
subprocess.cpython-34.pyo432460644editdlrm
sunau.cpython-34.pyc183090644editdlrm
sunau.cpython-34.pyo183090644editdlrm
symbol.cpython-34.pyc26620644editdlrm
symbol.cpython-34.pyo26620644editdlrm
symtable.cpython-34.pyc113050644editdlrm
symtable.cpython-34.pyo111830644editdlrm
sysconfig.cpython-34.pyc172870644editdlrm
sysconfig.cpython-34.pyo172870644editdlrm
tabnanny.cpython-34.pyc77490644editdlrm
tabnanny.cpython-34.pyo77490644editdlrm
tarfile.cpython-34.pyc680400644editdlrm
tarfile.cpython-34.pyo680400644editdlrm
telnetlib.cpython-34.pyc193940644editdlrm
telnetlib.cpython-34.pyo193940644editdlrm
tempfile.cpython-34.pyc215760644editdlrm
tempfile.cpython-34.pyo215760644editdlrm
textwrap.cpython-34.pyc138000644editdlrm
textwrap.cpython-34.pyo137140644editdlrm
this.cpython-34.pyc13160644editdlrm
this.cpython-34.pyo13160644editdlrm
threading.cpython-34.pyc389650644editdlrm
threading.cpython-34.pyo382520644editdlrm
timeit.cpython-34.pyc110620644editdlrm
timeit.cpython-34.pyo110620644editdlrm
token.cpython-34.pyc36150644editdlrm
token.cpython-34.pyo36150644editdlrm
tokenize.cpython-34.pyc199510644editdlrm
tokenize.cpython-34.pyo199010644editdlrm
trace.cpython-34.pyc241840644editdlrm
trace.cpython-34.pyo241270644editdlrm
traceback.cpython-34.pyc110910644editdlrm
traceback.cpython-34.pyo110910644editdlrm
tracemalloc.cpython-34.pyc171300644editdlrm
tracemalloc.cpython-34.pyo171300644editdlrm
tty.cpython-34.pyc11460644editdlrm
tty.cpython-34.pyo11460644editdlrm
types.cpython-34.pyc55600644editdlrm
types.cpython-34.pyo55600644editdlrm
uu.cpython-34.pyc40210644editdlrm
uu.cpython-34.pyo40210644editdlrm
uuid.cpython-34.pyc218640644editdlrm
uuid.cpython-34.pyo218020644editdlrm
warnings.cpython-34.pyc122680644editdlrm
warnings.cpython-34.pyo115360644editdlrm
wave.cpython-34.pyc191350644editdlrm
wave.cpython-34.pyo190740644editdlrm
weakref.cpython-34.pyc203450644editdlrm
weakref.cpython-34.pyo203080644editdlrm
webbrowser.cpython-34.pyc171320644editdlrm
webbrowser.cpython-34.pyo170930644editdlrm
xdrlib.cpython-34.pyc90020644editdlrm
xdrlib.cpython-34.pyo90020644editdlrm
zipfile.cpython-34.pyc458200644editdlrm
zipfile.cpython-34.pyo457710644editdlrm
_bootlocale.cpython-34.pyc10470644editdlrm
_bootlocale.cpython-34.pyo10160644editdlrm
_collections_abc.cpython-34.pyc239490644editdlrm
_collections_abc.cpython-34.pyo239490644editdlrm
_compat_pickle.cpython-34.pyc75010644editdlrm
_compat_pickle.cpython-34.pyo74270644editdlrm
_dummy_thread.cpython-34.pyc48250644editdlrm
_dummy_thread.cpython-34.pyo48250644editdlrm
_markupbase.cpython-34.pyc89320644editdlrm
_markupbase.cpython-34.pyo87450644editdlrm
_osx_support.cpython-34.pyc106300644editdlrm
_osx_support.cpython-34.pyo106300644editdlrm
_pyio.cpython-34.pyc649330644editdlrm
_pyio.cpython-34.pyo649070644editdlrm
_sitebuiltins.cpython-34.pyc36770644editdlrm
_sitebuiltins.cpython-34.pyo36770644editdlrm
_strptime.cpython-34.pyc157790644editdlrm
_strptime.cpython-34.pyo157790644editdlrm
_sysconfigdata.cpython-34.pyc227000644editdlrm
_sysconfigdata.cpython-34.pyo227000644editdlrm
_threading_local.cpython-34.pyc69460644editdlrm
_threading_local.cpython-34.pyo69460644editdlrm
_weakrefset.cpython-34.pyc84650644editdlrm
_weakrefset.cpython-34.pyo84650644editdlrm
__future__.cpython-34.pyc41680644editdlrm
__future__.cpython-34.pyo41680644editdlrm
__phello__.foo.cpython-34.pyc1340644editdlrm
__phello__.foo.cpython-34.pyo1340644editdlrm
Edit: /opt/alt/python34/lib64/python3.4/__pycache__/platform.cpython-34.pyc (31172B)
f@sdZdZdZddlZddlZddlZddlZddlZy ejZ Wn0e k rej dkrdZ nd Z YnXd Z ej d ejZejd d d ddZddZej dejZej dejZej dejZdZd$d%Zd d d ed&d'd(Zd d d ed)d*Zd+dd,d-Zd d.d/Zej d0Zd d d dd1d2Zi d3d6d5d6d6d6d8d6d9d6d;d6d<d6d=d6d?d6d@d6dBd6Zid6d6dCd6dDd6dEd6dFd6dGd6ZdHdIZ d d d d dJdKZ!dLdMZ"d dd dNdOZ#dPdQZ$d d dddRdSZ%dTdUZ&dVdWZ'd dXdYZ(dZd[Z)d d\d]Z*d d^d_Z+idd6dd6dd6Z,ejd d dcddZ-ej.dedfZ/da0dgdhZ1didjZ2dkdlZ3dmdnZ4dodpZ5dqdrZ6dsdtZ7ej duejZ8ej dvejZ9ej dwZ:ej dxZ;iZ<ddydzZ=d{d|Z>d}d~Z?ddZ@ddZAddZBddZCddZDiZEddddZ eFdkrdejGkphdejGkZHdejGkodejGkZIeJe eIeHejKdndS)a8 This module tries to retrieve as much platform-identifying data as possible. It makes this information available via function APIs. If called from the command line, it prints the platform information concatenated as single string to stdout. The output format is useable as part of a filename. a Copyright (c) 1999-2000, Marc-Andre Lemburg; mailto:mal@lemburg.com Copyright (c) 2000-2010, eGenix.com Software GmbH; mailto:info@egenix.com Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee or royalty is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation or portions thereof, including modifications, that you make. EGENIX.COM SOFTWARE GMBH DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE ! z1.0.7Ndoswin32win16ZNULz /dev/nullz/etcsC(__libc_init)|(GLIBC_([0-9.]+))|(libc(_\w+)?\.so(?:\.(\d[0-9.]*))?)i@cCsttjdr'tjj|}nt|d}|j|}d}xQd|ksfd|kr{tj||}nd}|s|j|}|sPnd}qNndd|jD\}} } } } } |r| rd }n| r&|d krd }| }q| |kr| }qni| r|d krd }| rY| |krY| }n| r|t |  d| kr|| }qqn|j }qNW|j ||fS) a Tries to determine the libc version that the file executable (which defaults to the Python interpreter) is linked against. Returns a tuple of strings (lib,version) which default to the given parameters in case the lookup fails. Note that the function has intimate knowledge of how different libc versions add symbols to the executable and thus is probably only useable for executables compiled using gcc. The file is read and scanned in chunks of chunksize bytes. realpathrbrslibcsGLIBCNcSs1g|]'}|dk r'|jdn|qS)Nlatin1)decode).0sr -/opt/alt/python34/lib64/python3.4/platform.py s zlibc_ver..Zlibcglibc) hasattrospathropenread _libc_searchsearchgroupslenendclose) executablelibversionZ chunksizefZbinaryposmZlibcinitrZ glibcversionZsoZthreadsZ soversionr r r libc_versF "        # r!c Cstjjdrd}xtdD]y}|j}t|dkr%|\}}nq%|dkrv|j}q%|dkr%|jd}|d}q%q%W|||fStjjdrxYtdD]H}|jd}t|dkr|dd krd |d |fSqWntjjd rtjd } xHt t| d ddD]*} | | d d dkr[| | =q[q[W| r| j d}| dd d }|||fSn|||fS)z Tries some special tricks to get the distribution information in case the default method fails. Currently supports older SuSE Linux, Caldera OpenLinux and Slackware Linux distributions. z/var/adm/inst-log/infoSuSEZMIN_DIST_VERSIONZ DIST_IDENT-z/etc/.installedrZ OpenLinuxz/usr/lib/setupNzslack-version- slackwarer(r() rrexistsrsplitrstripisdirlistdirrangesort) distnameridlineZtvtagvaluevaluesZpkgZverfilesnr r r _dist_try_harders:     "# r7z(\w+)[-_](release|version)z'(.+) release ([\d.]+)[^(]*(?:\((.+)\))?z1([^0-9]+)(?: release )?([\d.]+)[^(]*(?:\((.+)\))?r"debianfedoraredhatcentosmandrakemandrivarocksr' yellowdoggentoo UnitedLinux turbolinuxarchmageiacCsd}d}tj|}|dk r7t|jStj|}|dk rbt|jS|jj}|r|d}t|dkr|d}qnd||fS)Nrrr%)_lsb_release_versionmatchtupler_release_versionr+r*r) firstlinerr1r lr r r _parse_release_files   rKr%cCs:ytjt}Wntk r4|||fSYnX|jxd|D]L}tj|}|dk rF|j\}} ||kr|}PqqFqFWt|||St tj j t|ddddd} | j } WdQXt | \}} } |r|r|}n| r| }n| r-| }n|||fS)a Tries to determine the name of the Linux OS distribution name. The function first looks for a distribution release file in /etc and then reverts to _dist_try_harder() in case no suitable files are found. supported_dists may be given to define the set of Linux distributions to look for. It defaults to a list of currently supported Linux distributions identified by their release file name. If full_distribution_name is true (default), the full distribution read from the OS is returned. Otherwise the short name taken from supported_dists is used. Returns a tuple (distname, version, id) which default to the args given as parameters. Nrencodingzutf-8errorssurrogateescape)rr- _UNIXCONFDIROSErrorr/_release_filenamerFrr7rrjoinreadlinerK)r0rr1supported_distsfull_distribution_nameZetcfiler Z _distnameZdummyrrIZ_versionZ_idr r r linux_distribution+s0          rXcCst|||d|ddS)aS Tries to determine the name of the Linux OS distribution name. The function first looks for a distribution release file in /etc and then reverts to _dist_try_harder() in case no suitable files are found. Returns a tuple (distname, version, id) which default to the args given as parameters. rUrVr)rX)r0rr1rUr r r distcsrYrLcCs5ddl}|jdtddtj|||S)z! Portable popen() interface. rNzuse os.popen instead stacklevelr#)warningswarnDeprecationWarningrpopen)cmdmodebufsizer[r r r r^us r^c Cs|jd}|r%|j|nytt|}Wntk rR|}YnXttt|}dj|dd}|S)z Normalize the version and build strings and return a single version string using the format major.minor.build (or patchlevel). .N)r*appendmapint ValueErrorliststrrS)rbuildrJZintsZstringsr r r _norm_version}s  rkz'(?:([\w ]+) ([\w.]+) .*\[.* ([\d.]+)\])c Cs;tj|kr|||fSx~dD]i}y7t|}|j}|jr_tdnWn(tk r}zw#WYdd}~Xq#XPq#W|||fS|j}tj|}|dk r.|j \}}}|d dkr|dd }n|d dkr|dd }nt |}n|||fS) a+ Tries to figure out the OS version used and returns a tuple (system, release, version). It uses the "ver" shell command for this which is known to exists on Windows, DOS. XXX Others too ? In case this fails, the given parameters are used as defaults. vercommand /c ver cmd /c verzcommand failedNr%rb)rlrmrnr(r(r(r() sysplatformr^rrrQr+ _ver_outputrFrrk) systemreleaserZsupported_platformsr_pipeinfoZwhyr r r r _syscmd_vers,        rvZ2000ZXPZ 2003Serverr#Zpost2003Vista78z8.1rczpost8.1Z10 Zpost10Z 2008ServerZ 2008ServerR2Z 2012ServerZ 2012ServerR2Zpost2012ServerR2cs|dks$|dkr1|dkr1|||fSddlm}m}m}m}m}m}ddlmm } Gfddd|} |d} |d } d } }x]|| kr| d9} || }| j | | j |t |}|s|||fSqW| j |d}|s8|||fS||}| j|d|| sd| rq|||fS|| }| j|d |||s|||fS|jjd ?}|jjd @}|jjd ?}|||fS)Nryr#r)c_bufferPOINTERbyrefcreate_unicode_buffer StructureWinDLL)DWORDHANDLEcseZdZdfdfdfdfdfdfdfdfd fd fd fd fd fg ZdS)z*_get_real_winver..VS_FIXEDFILEINFOZ dwSignatureZdwStrucVersionZdwFileVersionMSZdwFileVersionLSdwProductVersionMSdwProductVersionLSZdwFileFlagsMaskZ dwFileFlagsZdwFileOSZ dwFileTypeZ dwFileSubtypeZ dwFileDateMSZ dwFileDateLSN)__name__ __module__ __qualname__Z_fields_r )rr r VS_FIXEDFILEINFOs             rkernel32rri)Zctypesr}r~rrrrZctypes.wintypesrrZGetModuleFileNameWZ_handlerZGetFileVersionInfoSizeWZGetFileVersionInfoWZVerQueryValueWcontentsrr)majminrjr}r~rrrrrrrrZname_lenZ actual_lennamesizeZ ver_blockZpvir )rr _get_real_winvers:$ .        ' rc(Cs'yddlm}Wn"tk r8||||fSYnXy&ddlm}m}m}m}Wn4tk rddlm}m}m}m}YnX|} t | dd\} } } dj | | | }t j | | fpt j | dfp|}| dd| | fkrzydj | j }Wqztk rv|ddd krrd |dd}nYqzXnt| d ddkrtj | | fptj | dfp|}nd} z5y&||d } || d d}WnYnXWd| r|| nX||||fS)Nr)getwindowsversion) OpenKeyEx QueryValueExCloseKeyHKEY_LOCAL_MACHINErcz {0}.{1}.{2}r#zSP{} z Service Pack ZSPZ product_typez,SOFTWARE\Microsoft\Windows NT\CurrentVersionZ CurrentType)ror ImportErrorwinregrrrr_winregrformat_WIN32_CLIENT_RELEASESgetZservice_pack_majorAttributeErrorgetattr_WIN32_SERVER_RELEASES)rsrcsdptyperrrrrZwinverrrrjkeyr r r win32_ver$sD & '     rcCsd}tjj|sdSyddl}Wntk rDdSYnXt|d}|j|}WdQX|d}d }tjj}|d krd}n|||fS) Nz0/System/Library/CoreServices/SystemVersion.plistrrZProductVersionrppcPower MacintoshZPowerPC)rrr)rr) rrr)plistlibrrloadunamemachine)fnrrZplrs versioninforr r r _mac_ver_xmlTs     rcCs&t}|dk r|S|||fS)a< Get MacOS version information and return it as tuple (release, versioninfo, machine) with versioninfo being a tuple (version, dev_stage, non_release_version). Entries which cannot be determined are set to the parameter values which default to ''. All tuple entries are strings. N)r)rsrrrur r r mac_verjs  rc CsTddlm}y'|j|}|dkr2|S|SWntk rO|SYnXdS)Nr)System) java.langrZ getPropertyr)rdefaultrr4r r r _java_getprop}s  rc Csyddl}Wn"tk r4||||fSYnXtd|}td|}|\}}}td|}td|}td|}|||f}|\}} } td| } td |}td | } || | f}||||fS) a] Version interface for Jython. Returns a tuple (release, vendor, vminfo, osinfo) with vminfo being a tuple (vm_name, vm_release, vm_vendor) and osinfo being a tuple (os_name, os_version, os_arch). Values which cannot be determined are set to the defaults given as parameters (which all default to ''). rNz java.vendorz java.versionz java.vm.namezjava.vm.vendorzjava.vm.versionz java.os.archz java.os.namezjava.os.version)rrr) rsvendorvminfoosinfojavaZvm_nameZ vm_releaseZ vm_vendoros_name os_versionos_archr r r java_vers"  rc Cs|dkrd|||fS|dkr|dkrB|||fS|jd}|ryt|d}Wntk rYqX|d}t||dsz_platform.. _/\:;"()unknownrz--r%Nr(r()rSfilterrreplace)argsrpZcleanedr r r _platforms$%  rcCsTyddl}Wntk r(|SYnXy|jSWntk rO|SYnXdS)z8 Helper to determine the node name of this machine. rN)socketrZ gethostnamerQ)rrr r r _nodes   rcCsetjj|}xLtjj|r`tjjtjjtjj|tj|}qW|S)zT In case filepath is a symlink, follow it until a real file is reached. )rrabspathislinknormpathrSdirnamereadlink)filepathr r r _follow_symlinkss  1rc Cstjdkr|Sytjd|tf}Wnttfk rN|SYnX|jj}|j }| sz|r~|S|SdS)z. Interface to the system's uname command. rrrzuname %s 2> %sN)rzwin32zwin16) rorprr^DEV_NULLrrQrr+r)Zoptionrroutputrcr r r _syscmd_unames   rc Cstjd kr|St|}y+tjd|gdtjdtj}Wnttfk rh|SYnX|j dj d}|j }| s|r|S|Sd S) z Interface to the system's file command. The function uses the -b option of the file command to have it omit the filename in its output. Follow the symlinks. It returns default in case the command should fail. rrrrWstdoutstderrrzlatin-1N)zdoszwin32zwin16) rorpr subprocessPopenPIPEZSTDOUTrrQZ communicater wait)targetrprocrrr r r _syscmd_file-s     r WindowsPErMSDOSc Cs|scddl}y|jd}Wn$|jk rK|jd}YnXt|dd}n|r{t|d}nd}| r|tjkrtjtkrttj\}}|r|}n|r|}qn||fSd|kr||fSd |krd }n*d |kr$d }nd |kr9d}nd|krNd}nTd|krxd|krod}qd}n*d|krd}nd|krd}n||fS)a Queries the given executable (defaults to the Python interpreter binary) for various architecture information. Returns a tuple (bits, linkage) which contains information about the bit architecture and the linkage format used for the executable. Both values are returned as strings. Values that cannot be determined are returned as given by the parameter presets. If bits is given as '', the sizeof(pointer) (or sizeof(long) on Python version < 1.5.2) is used as indicator for the supported pointer size. The function relies on the system's "file" command to do the actual work. This is available on most if not all Unix platforms. On some non-Unix platforms where the "file" command does not exist and the executable is set to the Python interpreter binary defaults from _default_architecture are used. rNPrJZbitrrz32-bit32bitZN32Zn32bitz64-bitrZELFZPErrZCOFFzMS-DOSr) structZcalcsizeerrorrirrorrp_default_architecture)rbitslinkagerrZfileoutbrJr r r architectureQsL                      r uname_resultz-system node release version machine processorcCsd}tdk rtSd}ytj\}}}}}Wntk rUd}YnX|sttd|||||f rW|rtj}d}d}t}d}nd}|dkrPt \}}}} |r|rd}n|s/dtj krtj j dd}q/tj j dd}n|sPtj j d|}qPn|rt |\}}}|d krd }q|d kr|d krd }d |dd krd}qd}qn|dkr|s|dkrd}qd}nd }qW|dddkrWt \}} } } d}dj| }|sT| }qTqWn|dkr| sv|dkr|}d}nyddl} Wntk rYqX| jdd\}}|dkrd}qd}n|stdd}n|dkr d}n|dkr"d}n|dkr7d}n|dkrLd}n|dkrad}n|dkrvd}n|d kr|d krd }d}nt||||||atS)an Fairly portable uname interface. Returns a tuple of strings (system, node, release, version, machine, processor) identifying the underlying platform. Note that unlike the os.uname function this also returns possible processor information as an additional tuple entry. Entries which cannot be determined are set to ''. rNrr%rZPROCESSOR_ARCHITEW6432ZPROCESSOR_ARCHITECTUREZPROCESSOR_IDENTIFIERzMicrosoft WindowsrZ Microsoftz6.0rcrxrrZ16bitrJavaz, ZOpenVMS0zSYI$_CPUZAlphaZVAXz-pr)zwin32zwin16) _uname_cacherrrrhrrorprrenvironrrvrrSvms_librZgetsyirr)Z no_os_uname processorrrnodersrrZuse_syscmd_verrrrrrrZcsidZ cpu_numberr r r rs    +                                   rcCs tjS)z Returns the system/OS name, e.g. 'Linux', 'Windows' or 'Java'. An empty string is returned if the value cannot be determined. )rrrr r r r rr4srrcCs tjS)z Returns the computer's network name (which may not be fully qualified) An empty string is returned if the value cannot be determined. )rrr r r r r=srcCs tjS)z Returns the system's release, e.g. '2.2.0' or 'NT' An empty string is returned if the value cannot be determined. )rrsr r r r rsGsrscCs tjS)z Returns the system's release version, e.g. '#3 on degas' An empty string is returned if the value cannot be determined. )rrr r r r rPsrcCs tjS)zt Returns the machine type, e.g. 'i386' An empty string is returned if the value cannot be determined. )rrr r r r rYsrcCs tjS)a Returns the (true) processor name, e.g. 'amdk6' An empty string is returned if the value cannot be determined. Note that many platforms do not provide this information or simply return the same value as for machine(), e.g. NetBSD does this. )rrr r r r rbs rzB([\w.+]+)\s*\(#?([^,]+),\s*([\w ]+),\s*([\w :]+)\)\s*\[([^\]]+)\]?z;IronPython\s*([\d\.]+)(?: \(([\d\.]+)\))? on (.NET [\d\.]+)zU([\d.]+)\s*\(IronPython\s*[\d.]+\s*\(([\d.]+)\) on ([\w.]+ [\d.]+(?: \(\d+-bit\))?)\)zE([\w.+]+)\s*\(#?([^,]+),\s*([\w ]+),\s*([\w :]+)\)\s*\[PyPy [^\]]+\]?cCs|dkrtj}ntj|d}|dk r:|Sd|krd}|jdrmtj|}ntj|}|dkrtdt |n|j \}}}d}d}n=tj jdr8d}t j|}|dkrtdt |n|j \}}}} } tj }nd|krd}t j|}|dkr~td t |n|j \}}}} d}nct j|}|dkrtd t |n|j \}}}} }d }|d | }ttd r&tj\} } } n0ttdrJtj\} } } n d} d} |jd} t| dkr| jddj| }n||| | |||f}|t|<|S)a Returns a parsed version of Python's sys.version as tuple (name, version, branch, revision, buildno, builddate, compiler) referring to the Python implementation name, version, branch, revision, build number, build date/time as string and the compiler identification string. Note that unlike the Python sys.version, the returned value for the Python version will always include the patchlevel (it defaults to '.0'). The function returns empty strings for tuple entries that cannot be determined. sys_version may be given to parse an alternative version string, e.g. if the version was read from a different Python interpreter. NZ IronPythonz*failed to parse IronPython sys.version: %srrZJythonz&failed to parse Jython sys.version: %sZPyPyz$failed to parse PyPy sys.version: %sz'failed to parse CPython sys.version: %sZCPythonr _mercurial subversionrbr#r)ror_sys_version_cacher startswith_ironpython_sys_version_parserrF _ironpython26_sys_version_parserrgreprrrp_sys_version_parser_pypy_sys_version_parserrrrr*rrdrS) sys_versionresultrrFrZ alt_versionZcompilerZbuildnoZ builddateZ buildtimerbranchZrevisionrJr r r _sys_versionsn              r cCs tdS)aR Returns a string identifying the Python implementation. Currently, the following implementations are identified: 'CPython' (C implementation of Python), 'IronPython' (.NET implementation of Python), 'Jython' (Java implementation of Python), 'PyPy' (Python implementation of Python). r)r r r r r python_implementations r cCs tdS)z Returns the Python version as string 'major.minor.patchlevel' Note that unlike the Python sys.version, the returned value will always include the patchlevel (it defaults to 0). r%)r r r r r python_versionsr cCsttdjdS)z Returns the Python version as tuple (major, minor, patchlevel) of strings. Note that unlike the Python sys.version, the returned value will always include the patchlevel (it defaults to 0). r%rb)rGr r*r r r r python_version_tuples rcCs tdS)z Returns a string identifying the Python implementation branch. For CPython this is the Subversion branch from which the Python binary was built. If not available, an empty string is returned. r#)r r r r r python_branchs rcCs tdS)z Returns a string identifying the Python implementation revision. For CPython this is the Subversion revision from which the Python binary was built. If not available, an empty string is returned. rc)r r r r r python_revisions rcCstddS)zh Returns a tuple (buildno, builddate) stating the Python build number and date as strings. rry)r r r r r python_build+srcCs tdS)zS Returns a string identifying the compiler used for compiling Python. ry)r r r r r python_compiler3src Cs[tj||fd}|dk r(|St\}}}}}}||krXd}n|r|t|||\}}}n|dkrt|\} } } } |rt||} qGt|||| } nw|d krYtd\}}}|r"| r"t||||d|||} qGttj \}}t||||d||} n|dkrt \}}}\}}}|s| rt|||} qGt|||d|||} n|dkr|rt||} qGt|||} nH|rt||} n0t tj \}}t||||||} | t||f<| S) a Returns a single string identifying the underlying platform with as much useful information as possible (but no more :). The output is intended to be human readable rather than machine parseable. It may look different on different platforms and this is intended. If "aliased" is true, the function will use aliases for various platforms that report system names which differ from their common names, e.g. SunOS will be reported as Solaris. The system_alias() function is used to implement this. Setting terse to true causes the function to return only the absolute minimum information needed to identify the platform. NrrLinuxwithrZonZMacOS)r) _platform_cacherrrrrrYr!rorrr)aliasedterser rrrrsrrrZrelZversrrrpr0Z distversionZdistidZlibcnameZ libcversionrLvrrrrrrr r r rp?sR           rp__main__rz--terseZ nonaliasedz --nonaliased)doswin32win16)zSuSEr8r9r:r;r<r=r>z slackwarer?r@rArBrCrDr()rrr)rwr)rwr%)rwr#)rwN)ryr)ryr%)ryr#)ryrc)ryN)r|r)r|N)rwr#)ryr)ryr%)ryr#)ryrc)ryN)rrr)rrr)rrr)rz WindowsPE)rzWindows)rzMSDOS)L__doc__Z __copyright__ __version__ collectionsrorrerdevnullrrrprPcompileASCIIrrr!r7rRrErHZ_supported_distsrKrXrYr^rkrqrvrrrrrrrrrrrrrrrr namedtuplerrrrrrrsrrrrrrrrr r r rrrrrrrargvrrprintexitr r r r  sf 0       8 0      5  /   ;0  # 6   T       d   S