/usr/local/lib/python3.6/site-packages/fsspec/__pycache__
NameSizeModeActions
archive.cpython-36.pyc26790644editdlrm
asyn.cpython-36.pyc232500644editdlrm
caching.cpython-36.pyc133250644editdlrm
callbacks.cpython-36.pyc59270644editdlrm
compression.cpython-36.pyc46450644editdlrm
config.cpython-36.pyc27400644editdlrm
conftest.cpython-36.pyc13610644editdlrm
core.cpython-36.pyc202340644editdlrm
dircache.cpython-36.pyc32920644editdlrm
exceptions.cpython-36.pyc7330644editdlrm
fuse.cpython-36.pyc101100644editdlrm
gui.cpython-36.pyc142140644editdlrm
mapping.cpython-36.pyc82080644editdlrm
parquet.cpython-36.pyc111810644editdlrm
registry.cpython-36.pyc76210644editdlrm
spec.cpython-36.pyc522480644editdlrm
transaction.cpython-36.pyc31780644editdlrm
utils.cpython-36.pyc144030644editdlrm
_version.cpython-36.pyc4640644editdlrm
__init__.cpython-36.pyc13940644editdlrm
Edit: /usr/local/lib/python3.6/site-packages/fsspec/__pycache__/gui.cpython-36.pyc (14214B)
3 8%Eg5@sddlZddlZddlZddlZddlZddlZddlmZm Z m Z ddl m Z ej ejdZGdddeZGdd d eZGd d d eZdS) N)OpenFileget_filesystem_classsplit_protocol)known_implementationsz fsspec.guic@steZdZdZgZgZddZddZdej dfdd Z d d Z d d Z ddZ ejddZdddZdddZdS)SigSlotaSignal-slot mixin, for Panel event passing Include this class in a widget manager's superclasses to be able to register events and callbacks on Panel widgets managed by that class. The method ``_register`` should be called as widgets are added, and external code should call ``connect`` to associate callbacks. By default, all signals emit a DEBUG logging statement. cCsd|_i|_i|_|jdS)NF)_ignoring_events_sigs_map_setup)selfr 4/usr/local/lib/python3.6/site-packages/fsspec/gui.py__init__"szSigSlot.__init__cCstjj|_dS)z(Create GUI elements and register signalsN)pnZpaneZPaneBasepanel)r r r rr (szSigSlot._setupvalueFcCs||jkrtd||g||d|j|<dj|dk rFt|dt|nd|g}||j|<|dk rv|jj|j |dd|rt ||r|j |t||dS) aWatch the given attribute of a widget and assign it a named event This is normally called at the time a widget is instantiated, in the class which owns it. Parameters ---------- widget : pn.layout.Panel or None Widget to watch. If None, an anonymous signal not associated with any widget. name : str Name of this event thing : str Attribute of the given widget to watch log_level : int When the signal is triggered, a logging event of the given level will be fired in the dfviz logger. auto : bool If True, automatically connects with a method in this class of the same name. z*Attempt to assign an undeclared signal: %s)widget callbacksthinglog-NnamenoneT)Z onlychanged) signals ValueErrorr joingetattrstrr paramZwatch_signalhasattrconnect)r rrr log_levelautownr r r _register-s   zSigSlot._registerc Os4y|jj||Sttfk r.tdYnXdS)z!Display in a notebook or a serverz)Panel does not seem to be set up properlyN)r_repr_mimebundle_rAttributeErrorNotImplementedError)r argskwargsr r rr'YszSigSlot._repr_mimebundle_cCs|j|dj|dS)aAssociate call back with given event The callback must be a function which takes the "new" value of the watched attribute as the only parameter. If the callback return False, this cancels any further processing of the given event. Alternatively, the callback can be a string, in which case it means emitting the correspondingly-named event (i.e., connect to self) rN)r append)r signalslotr r rr"`s zSigSlot.connectcCsL|jsHdj|jj|jg}||jkrH|j||jkrH|j|j||jdS)zThis is called by a an action on a widget Within an self.ignore_events context, nothing happens. Tests can execute this method by directly changing the values of widget components. rN)rrobjrr r _emitnew)r eventr%r r rr lszSigSlot._signalc csd|_z dVWdd|_XdS)zjTemporarily turn off events processing in this instance (does not propagate to children) TNF)r)r r r r ignore_eventsys zSigSlot.ignore_eventsNcCstj|j|ddj||xx|j|dD]f}t|trH|j|q.y||}|dkr\PWq.tk r}ztjd||fWYdd}~Xq.Xq.WdS)zAn event happened, call its callbacks This method can be used in tests to simulate message passing without directly changing visual elements. Calling of callbacks will halt whenever one returns False. rz{}: {}rFz6Exception (%s) while executing callback for signal: %sN) loggerrr format isinstancerr0 Exception exception)r sigrcallbackreter r rr0s  z SigSlot._emitcCs|jj|dd|S)z