예제 #1
0
파일: ui.py 프로젝트: gkliska/razvoj
 def get_ui_db ( self, mode = 'r' ):
     """ Returns a reference to the Traits UI preference database.
     """
     try:
         return shelve.open( os.path.join( traits_home(), 'traits_ui' ),
                             flag = mode, protocol = -1 )
     except:
         return None
예제 #2
0
def ui_db_name():
    """ Returns the name of the traits UI database.
    """
    return os.path.join(traits_home(), 'traits_ui')
예제 #3
0
def ui_db_name():
    """ Returns the name of the traits UI database.
    """
    return os.path.join(traits_home(), "traits_ui")
예제 #4
0
from enthought.pyface.resource_manager \
    import resource_manager

from enthought.resource.resource_reference \
    import ImageReference, ResourceReference

#-------------------------------------------------------------------------------
#  Constants:
#-------------------------------------------------------------------------------

# Standard image file extensions:
ImageFileExts = ( '.png', '.gif', '.jpg', 'jpeg' )

# The image_cache root directory:
image_cache_path = join( traits_home(), 'image_cache' )

# Names of files that should not be copied when ceating a new library copy:
dont_copy_list = ( 'image_volume.py', 'image_info.py', 'license.txt' )

#-- Code Generation Templates --------------------------------------------------

# Template for creating an ImageVolumeInfo object:
ImageVolumeInfoCodeTemplate = \
"""        ImageVolumeInfo(
            description = %(description)s,
            copyright   = %(copyright)s,
            license     = %(license)s,
            image_names = %(image_names)s
        )"""