/usr/lib64/python2.6/site-packages/numpy/numarray
NameSizeModeActions
numpy/-0755rm
alter_code1.py93900644editdlrm
alter_code1.pyc105260644editdlrm
alter_code1.pyo105260644editdlrm
alter_code2.py15720644editdlrm
alter_code2.pyc28120644editdlrm
alter_code2.pyo28120644editdlrm
compat.py960644editdlrm
compat.pyc2840644editdlrm
compat.pyo2840644editdlrm
convolve.py4080644editdlrm
convolve.pyc5610644editdlrm
convolve.pyo5610644editdlrm
fft.py1030644editdlrm
fft.pyc2730644editdlrm
fft.pyo2730644editdlrm
functions.py161280644editdlrm
functions.pyc186280644editdlrm
functions.pyo185770644editdlrm
image.py3980644editdlrm
image.pyc5480644editdlrm
image.pyo5480644editdlrm
linear_algebra.py3180644editdlrm
linear_algebra.pyc6670644editdlrm
linear_algebra.pyo6670644editdlrm
ma.py350644editdlrm
ma.pyc1920644editdlrm
ma.pyo1920644editdlrm
matrix.py1600644editdlrm
matrix.pyc4900644editdlrm
matrix.pyo4900644editdlrm
mlab.py1050644editdlrm
mlab.pyc2760644editdlrm
mlab.pyo2760644editdlrm
nd_image.py3950644editdlrm
nd_image.pyc5480644editdlrm
nd_image.pyo5480644editdlrm
numerictypes.py153180644editdlrm
numerictypes.pyc137190644editdlrm
numerictypes.pyo137190644editdlrm
random_array.py4180644editdlrm
random_array.pyc6360644editdlrm
random_array.pyo6360644editdlrm
session.py107910644editdlrm
session.pyc133260644editdlrm
session.pyo133260644editdlrm
setup.py4720644editdlrm
setup.pyc7910644editdlrm
setup.pyo7910644editdlrm
setupscons.py4310644editdlrm
setupscons.pyc8090644editdlrm
setupscons.pyo8090644editdlrm
ufuncs.py13580644editdlrm
ufuncs.pyc20040644editdlrm
ufuncs.pyo20040644editdlrm
util.py15310644editdlrm
util.pyc21780644editdlrm
util.pyo21780644editdlrm
_capi.so746640755editdlrm
__init__.py5540644editdlrm
__init__.pyc6420644editdlrm
__init__.pyo6420644editdlrm
Edit: /usr/lib64/python2.6/site-packages/numpy/numarray/session.pyc (13326B)
Ñò \ÐKc@sSdZddgZddkZddkZdZead„ZeeƒeeƒedƒfZ d„Z d„Z d „Z d „Zd „Zd „Zd „Zddd„ƒYZdefd„ƒYZd„Zdefd„ƒYZdefd„ƒYZdefd„ƒYZd„Zdeded„Zdeded„Zd„ZdS(sÓ This module contains a "session saver" which saves the state of a NumPy session to a file. At a later time, a different Python process can be started and the saved session can be restored using load(). The session saver relies on the Python pickle protocol to save and restore objects. Objects which are not themselves picklable (e.g. modules) can sometimes be saved by "proxy", particularly when they are global constants of some kind. If it's not known that proxying will work, a warning is issued at save time. If a proxy fails to reload properly (e.g. because it's not a global constant), a warning is issued at reload time and that name is bound to a _ProxyFailure instance which tries to identify what should have been restored. First, some unfortunate (probably unnecessary) concessions to doctest to keep the test run free of warnings. >>> del _PROXY_ALLOWED >>> del __builtins__ By default, save() stores every variable in the caller's namespace: >>> import numpy as na >>> a = na.arange(10) >>> save() Alternately, save() can be passed a comma seperated string of variables: >>> save("a,na") Alternately, save() can be passed a dictionary, typically one you already have lying around somewhere rather than created inline as shown here: >>> save(dictionary={"a":a,"na":na}) If both variables and a dictionary are specified, the variables to be saved are taken from the dictionary. >>> save(variables="a,na",dictionary={"a":a,"na":na}) Remove names from the session namespace >>> del a, na By default, load() restores every variable/object in the session file to the caller's namespace. >>> load() load() can be passed a comma seperated string of variables to be restored from the session file to the caller's namespace: >>> load("a,na") load() can also be passed a dictionary to *restore to*: >>> d = {} >>> load(dictionary=d) load can be passed both a list variables of variables to restore and a dictionary to restore to: >>> load(variables="a,na", dictionary=d) >>> na.all(a == na.arange(10)) 1 >>> na.__name__ 'numpy' NOTE: session saving is faked for modules using module proxy objects. Saved modules are re-imported at load time but any "state" in the module which is not restored by a simple import is lost. tloadtsaveiÿÿÿÿNs session.datcCsdS(N((((s</usr/lib64/python2.6/site-packages/numpy/numarray/session.pyt_fooTscCsdS(s?Suppress warnings for known un-picklables with working proxies.N((((s</usr/lib64/python2.6/site-packages/numpy/numarray/session.pyt_update_proxy_typesZscCs|dj o |tjS(s1returns True iff _type isn't known as OK to proxyN(tNonet_PROXY_ALLOWED(t_type((s</usr/lib64/python2.6/site-packages/numpy/numarray/session.pyt_unknown^scCs*y ddWntiiiiiSXdS(s;caller() returns the frame object of the function's caller.itN(tsyst exc_tracebackttb_frametf_back(((s</usr/lib64/python2.6/site-packages/numpy/numarray/session.pyt_callerhs cCstƒ}|iS(s>callers_globals() returns the global dictionary of the caller.(R t f_globals(tframe((s</usr/lib64/python2.6/site-packages/numpy/numarray/session.pyt_callers_globalsos cCsctƒ}g}xM|iƒD]?\}}t|ƒttƒjo|it|dƒƒqqW|S(s\returns a list containing the names of all the modules in the caller's global namespace.t__name__(RtitemsttypeR tappendtgetattr(tgtmodstktv((s</usr/lib64/python2.6/site-packages/numpy/numarray/session.pyt_callers_modulests  cGs)x|D]}ti|IqWtiJdS(N(R tstderr(targsta((s</usr/lib64/python2.6/site-packages/numpy/numarray/session.pyt_errout~scGstot|ŒndS(N(tVERBOSER(R((s</usr/lib64/python2.6/site-packages/numpy/numarray/session.pyt_verboseƒst_ProxyingFailurecBs#eZdZdd„Zd„ZRS(sMObject which is bound to a variable for a proxy pickle which failed to reloadcCs||_||_||_dS(N(tmoduletnameR(tselfR"R#R((s</usr/lib64/python2.6/site-packages/numpy/numarray/session.pyt__init__‰s  cCsd|i|i|ifS(NsProxyingFailure('%s','%s','%s')(R"R#R(R$((s</usr/lib64/python2.6/site-packages/numpy/numarray/session.pyt__repr__sN(Rt __module__t__doc__RR%R&(((s</usr/lib64/python2.6/site-packages/numpy/numarray/session.pyR!‡s t _ModuleProxycBs,eZdZed„Zd„Zd„ZRS(s*Proxy object which fakes pickling a modulecCsw|o)td|ƒti|ƒ}||_nDtd|ƒyt|ƒ}Wn#tj otd|dƒnX|S(Nsproxying modulesloading module proxyswarning: modulesimport failed.(R tobjectt__new__R#t _loadmodulet ImportErrorR(RR#RR$((s</usr/lib64/python2.6/site-packages/numpy/numarray/session.pyR+’s   cCs |ifS(N(R#(R$((s</usr/lib64/python2.6/site-packages/numpy/numarray/session.pyt__getnewargs__ŸscCstS(N(tFalse(R$((s</usr/lib64/python2.6/site-packages/numpy/numarray/session.pyt __getstate__¢s(RR'R(R/R+R.R0(((s</usr/lib64/python2.6/site-packages/numpy/numarray/session.pyR)s cBst|eijoY|idƒ}d}xAee|ƒƒD])}di||d ƒ}d|dUq8Wnei|S(Nt.Risimport (R tmodulestsplittrangetlentjoin(R"R2tsti((s</usr/lib64/python2.6/site-packages/numpy/numarray/session.pyR,¥st _ObjectProxycBs,eZdZed„Zd„Zd„ZRS(shProxy object which fakes pickling an arbitrary object. Only global constants can really be proxied.c Cs5|oxt|ƒo%td|d|d|ddƒntd||ƒti|ƒ}||t|ƒ|_|_|_n³td||ƒyt |ƒ}Wn>t t fj o,td|d|d ƒt |||ƒSXyt ||ƒ}Wn;tj o/td |d|d |ƒt |||ƒSX|S( Nswarning: proxying objectR1sof typesbecause it wouldn't pickle...sit may not reload later.sproxying objectsloading object proxyswarning: loading object proxysmodule import failed.swarning: object proxyswouldn't reload from(RRR R*R+tstrR"R#RR,R-tKeyErrorR!RtAttributeError(RR"R#t_type2RR$tm((s</usr/lib64/python2.6/site-packages/numpy/numarray/session.pyR+±s,   ' cCs|i|i|ifS(N(R"R#R(R$((s</usr/lib64/python2.6/site-packages/numpy/numarray/session.pyR.ËscCstS(N(R/(R$((s</usr/lib64/python2.6/site-packages/numpy/numarray/session.pyR0Îs(RR'R(R/R+R.R0(((s</usr/lib64/python2.6/site-packages/numpy/numarray/session.pyR9®s  t _SaveSessioncBs,eZdZed„Zd„Zd„ZRS(s¢Tag object which marks the end of a save session and holds the saved session variable names as a list of strings in the same order as the session pickles.cCsA|otd|ƒntd|ƒti|ƒ}||_|S(Nssaving sessionsloading session(R R*R+tkeys(RR@RR$((s</usr/lib64/python2.6/site-packages/numpy/numarray/session.pyR+Ös   cCs |ifS(N(R@(R$((s</usr/lib64/python2.6/site-packages/numpy/numarray/session.pyR.ßscCstS(N(R/(R$((s</usr/lib64/python2.6/site-packages/numpy/numarray/session.pyR0âs(RR'R(R/R+R.R0(((s</usr/lib64/python2.6/site-packages/numpy/numarray/session.pyR?Òs tObjectNotFoundcBseZRS((RR'(((s</usr/lib64/python2.6/site-packages/numpy/numarray/session.pyRAåscCstxm|D]Y}ti|}|o?x<|iiƒD]'\}}||jo|i|fSq1WqqWt|ƒ‚dS(N(R R2t__dict__RRRA(R2R*tmnameR>RR((s</usr/lib64/python2.6/site-packages/numpy/numarray/session.pyt_locateès   c Csè|atƒt|tƒot|dƒ}n|d jo tƒ}n|d jo|iƒ}n|idƒ}t ƒt i iƒ}t i |ddƒ}td|ƒx |D]}||}td|t|ƒƒy|i|ƒtd|ƒWqµt ittfj o£t|tt ƒƒot|idtƒ} nayt||ƒ\} } Wn&tj otd |d ƒqµn Xt| | t|ƒdtƒ} |i| ƒqµXqµWt|dtƒ} |i| ƒ|iƒd S( súsaves variables from a numpy session to a file. Variables which won't pickle are "proxied" if possible. 'variables' a string of comma seperated variables: e.g. "a,b,c" Defaults to dictionary.keys(). 'file' a filename or file object for the session file. 'dictionary' the dictionary in which to look up the variables. Defaults to the caller's globals() 'verbose' print additional debug output when True. twbt,tprotocolis variables:tsavingtpickledRswarning: couldn't find objectsin any module... skipping.N(RRt isinstanceR:topenRRR@R3RR R2tpickletPicklerR Rtdumpt PicklingErrort TypeErrort SystemErrorR)RtTrueRDRARR9R?tclose( t variablestfilet dictionarytverboseR@tsource_modulestpRRtproxyR"R#to((s</usr/lib64/python2.6/site-packages/numpy/numarray/session.pyRòsB        c Cs|at|tƒot|dƒ}n|djo tƒ}ng}ti|ƒ}x±|iƒ}t|t ƒort t |i |ƒƒ}t dƒ|djo|i ƒ}n|idƒ}x|D]} || || Js4             $ =)