traitlets.pyc
1 o 2 ��c�� � @ s� d Z ddlZddlZddlZddlZddlZddlZddlZddlZ ddl 3 mZ ddlm Z mZ ddlmZ ddlmZmZmZmZ ddlmZ dd lmZ dd 4 lmZ eeeefZ e!fZ"g d�Z#edd d�Z$edd d�Z%e$Z&G dd� de'�Z(e�)d�Z*dd� Z+e� Z,dd� Z-dd� Z.dd� Z/dd� Z0dd� Z1G d d!� d!�Z2d�d"d#�Z3d$d%� Z4G d&d'� d'�Z5G d(d)� d)�Z6e6Z7G d*d+� d+�Z8G d,d-� d-e8�Z9G d.d/� d/�Z:d0d1� Z;G d2d3� d3e!�Z<G d4d5� d5e<�Z=d6d7�d8e j>ee?f d9e?d:d;fd<d=�Z@d>d?� ZAd8e j>ee?f d:d@fdAdB�ZBdCe?d:dDfdEdF�ZCG dGdH� dHe8�ZDG dId;� d;eD�ZEG dJd@� d@eD�ZFG dKdD� dDeD�ZGG dLdM� dMe<dN�ZHG dOdP� dPeHe=dN�ZIG dQdR� dRe9�ZJG dSdT� dTeJ�ZKG dUdV� dVeJ�ZLG dWdX� dX�ZMG dYdZ� dZeMeK�ZNG d[d\� d\eMeL�ZOG d]d^� d^eJ�ZPG d_d`� d`e9�Z>G dadb� dbe9�ZQdcdd� ZRG dedf� dfe9�ZSG dgdh� dheS�ZTeSeTZUZVeSZWG didj� dje9�ZXG dkdl� dleX�ZYG dmdn� dne9�ZZG dodp� dpeZ�Z[G dqdr� dre9�Z\G dsdt� dte\�Z]G dudv� dve9�Z^G dwdx� dxe^�Z_G dydz� dze9�Z`G d{d|� d|e`�ZaG d}d~� d~e9�ZbG dd�� d�eb�ZcG d�d�� d�e9�ZdG d�d�� d�ed�ZeG d�d�� d�ed�ZfG d�d�� d�eL�ZgG d�d�� d�eg�ZhG d�d�� d�eh�ZiG d�d�� d�eg�ZjG d�d�� d�eL�ZkG d�d�� d�e9�ZlG d�d�� d�e9�ZmG d�d�� d�e9�ZnG d�d�� d�e9�ZodS )�a� 5 A lightweight Traits like module. 6 7 This is designed to provide a lightweight, simple, pure Python version of 8 many of the capabilities of enthought.traits. This includes: 9 10 * Validation 11 * Type specification with defaults 12 * Static and dynamic notification 13 * Basic predefined types 14 * An API that is similar to enthought.traits 15 16 We don't support: 17 18 * Delegation 19 * Automatic GUI generation 20 * A full set of trait types. Most importantly, we don't provide container 21 traits (list, dict, tuple) that can trigger notifications if their 22 contents change. 23 * API compatibility with enthought.traits 24 25 There are also some important difference in our design: 26 27 * enthought.traits does not validate default values. We do. 28 29 We choose to create this module because we need these capabilities, but 30 we need them to be pure Python so they work in all Python implementations, 31 including Jython and IronPython. 32 33 Inheritance diagram: 34 35 .. inheritance-diagram:: traitlets.traitlets 36 :parts: 3 37 � N)�literal_eval)�warn� warn_explicit� )�Bunch)�add_article�class_of�describe� repr_type)� 38 getargspec��import_item)�Sentinel);�All�Any�BaseDescriptor�Bool�Bytes�CBool�CBytes�CComplex�CFloat�CInt�CLong�CRegExp�CUnicode�Callable�CaselessStrEnum�ClassBasedTraitType�Complex� Container�DefaultHandler�Dict�DottedObjectName�Enum�EventHandler�Float�ForwardDeclaredInstance�ForwardDeclaredMixin�ForwardDeclaredType� FuzzyEnum�HasDescriptors� HasTraits�Instance�Int�Integer�List�Long�MetaHasDescriptors� MetaHasTraits� 39 ObjectName�ObserveHandler�Set� 40 TCPAddress�This� 41 TraitError� TraitType�Tuple�Type�Unicode� Undefined�Union�UseEnum�ValidateHandler�default�directional_link�dlink�link�observe�observe_compat�parse_notifier_name�validater>