Current Path : /usr/lib/python2.7/dist-packages/twisted/python/ |
Current File : //usr/lib/python2.7/dist-packages/twisted/python/zippath.pyc |
~Mc @ s d Z e Z d d l Z d d l Z d d l Z d d l Z e j d d k rh e Z d d l m Z n e Z d d l m Z d d l m Z m Z d Z d e f d YZ d e f d YZ d d g Z d S( s This module contains partial re-implementations of FilePath, pending some specification of formal interfaces it is a duck-typing attempt to emulate them for certain restricted uses. See the constructor for ZipArchive for use. iNi i ( t ZipFile( t ChunkingZipFile( t FilePatht _PathHelpert /t ZipPathc B s e Z d Z d Z d Z d Z d Z d Z d Z d Z d Z d Z d Z d Z d Z d Z d Z d Z d Z d Z d Z d Z RS( sF I represent a file or directory contained within a zip file. c C s@ | | _ | | _ t j j | j j | j j t | _ d S( s Don't construct me directly. Use ZipArchive.child(). @param archive: a ZipArchive instance. @param pathInArchive: a ZIP_PATH_SEP-separated string. N( t archivet pathInArchivet ost patht joint zipfilet filenamet splitt ZIP_PATH_SEP( t selfR R ( ( s: /usr/lib/python2.7/dist-packages/twisted/python/zippath.pyt __init__+ s c C s8 t | t s t St | j | j f | j | j f S( N( t isinstanceR t NotImplementedt cmpR R ( R t other( ( s: /usr/lib/python2.7/dist-packages/twisted/python/zippath.pyt __cmp__: s c C sZ t j j | j j g } | j | j j t t j j | } d | j d f S( Ns ZipPath('%s')s string-escape( R R t abspathR t extendR R R t sepR t encode( R t partsR ( ( s: /usr/lib/python2.7/dist-packages/twisted/python/zippath.pyt __repr__A s c C sH | j j t } t | d k r+ | j St | j t j | d S( Ni i( R R R t lenR R R ( R t splitup( ( s: /usr/lib/python2.7/dist-packages/twisted/python/zippath.pyt parentH s c C s"