File: api.py

package info (click to toggle)
matplotlib 0.98.1-1%2Blenny4
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 18,624 kB
  • ctags: 22,599
  • sloc: python: 76,915; cpp: 63,459; ansic: 5,353; makefile: 111; sh: 12
file content (159 lines) | stat: -rw-r--r-- 5,012 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
#------------------------------------------------------------------------------
#
#  Copyright (c) 2005, Enthought, Inc.
#  All rights reserved.
#
#  Written by: David C. Morrill
#
#  Date: 12/06/2005
#
#------------------------------------------------------------------------------


""" Pseudo-package for all of the core symbols from Traits and TraitsUI.
Use this module for importing Traits names into your namespace. For example::

    from enthought.traits.api import HasTraits

"""

from enthought.traits.version import version, version as __version__


from info_traits \
    import __doc__

from trait_base \
    import Undefined, Missing, Self

from trait_errors \
    import TraitError, TraitNotificationError, DelegationError

from trait_notifiers \
   import push_exception_handler, pop_exception_handler, \
          TraitChangeNotifyWrapper

from category \
    import Category

from trait_db \
    import tdb

from traits \
    import Event, List, Dict, Tuple, Range, Constant, CTrait, Trait, Delegate, \
           Property, Expression, Button, ToolbarButton, PythonValue, Any, Int, \
           Long, Float, Str, Unicode, Complex, Bool, CInt, CLong, CFloat, \
           CStr, CUnicode, WeakRef

from traits \
    import CComplex, CBool, false, true, Regex, String, Password, File, \
           Directory, Function, Method, Class, Instance, Module, Type, This, \
           self, Either, Python, Disallow, ReadOnly, undefined, missing, ListInt

from traits \
    import ListFloat, ListStr, ListUnicode, ListComplex, ListBool, \
           ListFunction, ListMethod, ListClass, ListInstance, ListThis, \
           DictStrAny, DictStrStr, DictStrInt, DictStrLong, DictStrFloat

from traits \
    import DictStrBool, DictStrList, TraitFactory, Callable, Array, CArray, \
           Enum, Code, HTML, Default, Color, RGBColor, Font

from has_traits \
    import method, HasTraits, HasStrictTraits, HasPrivateTraits, \
           SingletonHasTraits, SingletonHasStrictTraits, \
           SingletonHasPrivateTraits, MetaHasTraits, Vetoable, VetoableEvent, \
           traits_super

from trait_handlers \
    import TraitHandler, TraitRange, TraitString, TraitType, TraitCastType, \
           TraitInstance, ThisClass, TraitClass, TraitFunction, TraitEnum, \
           TraitPrefixList, TraitMap, TraitPrefixMap, TraitCompound, \
           TraitList, TraitListEvent, TraitDict, TraitDictEvent, TraitTuple

from traits \
    import UIDebugger

###################
# ui imports
if False:

    from ui.handler \
        import Handler, ViewHandler, default_handler

    from ui.view \
        import View

    from ui.group \
        import Group, HGroup, VGroup, VGrid, HFlow, VFlow, HSplit, VSplit, Tabbed

    from ui.ui \
        import UI

    from ui.ui_info \
        import UIInfo

    from ui.help \
        import on_help_call

    from ui.include \
        import Include

    from ui.item \
        import Item, Label, Heading, Spring, spring

    from ui.editor_factory \
        import EditorFactory

    from ui.editor \
        import Editor

    from ui.toolkit \
        import toolkit

    from ui.undo \
        import UndoHistory, AbstractUndoItem, UndoItem, ListUndoItem, \
               UndoHistoryUndoItem

    from ui.view_element \
        import ViewElement, ViewSubElement

    from ui.help_template \
        import help_template

    from ui.message \
        import message, error

    from ui.tree_node \
        import TreeNode, ObjectTreeNode, TreeNodeObject, MultiTreeNode

    from ui.editors \
        import ArrayEditor, BooleanEditor, ButtonEditor, CheckListEditor, \
               CodeEditor, ColorEditor, RGBColorEditor, \
               CompoundEditor, DirectoryEditor, EnumEditor, FileEditor, \
               FontEditor, ImageEnumEditor, InstanceEditor, \
               ListEditor, RangeEditor, TextEditor, TreeEditor, \
               TableEditor, TupleEditor, DropEditor, DNDEditor, CustomEditor

    from ui.editors \
        import ColorTrait, RGBColorTrait, \
               FontTrait, SetEditor, HTMLEditor, KeyBindingEditor, \
               ShellEditor, TitleEditor, ValueEditor, NullEditor


import ui.view_elements

#-------------------------------------------------------------------------------
#  Patch the main traits module with the correct definition for the ViewElements
#  class:
#-------------------------------------------------------------------------------

import has_traits as has_traits
has_traits.ViewElements = ui.view_elements.ViewElements

#-------------------------------------------------------------------------------
#  Patch the main traits module with the correct definition for the ViewElement
#  and ViewSubElement class:
#-------------------------------------------------------------------------------

has_traits.ViewElement = ui.view_element.ViewElement