<s> from zope . interface import Attribute <EOL> from zope . interface import Interface <EOL> from zope . interface import implements <EOL> class IIndexEvent ( Interface ) : <EOL> """<STR_LIT>""" <EOL> class IIndexUpdate ( Interface ) : <EOL> """<STR_LIT>""" <EOL> class IPackageEvent ( IIndexEvent ) : <EOL> """<STR_LIT>""" <EOL> path = Attribute ( '<STR_LIT>' ) <EOL> class IPackageAdded ( IPackageEvent ) : <EOL> """<STR_LIT>""" <EOL> class IPackageRemoved ( IPackageEvent ) : <EOL> """<STR_LIT>""" <EOL> class IndexEvent ( object ) : <EOL> implements ( IIndexEvent ) <EOL> def __init__ ( self , datafile , index ) : <EOL> self . index = index <EOL> self . datafile = datafile <EOL> class IndexUpdate ( IndexEvent ) : <EOL> implements ( IIndexUpdate ) <EOL> class PackageEvent ( object ) : <EOL> """<STR_LIT>""" <EOL> implements ( IPackageEvent ) <EOL> def __init__ ( self , index_manager , path = None , name = None , version = None ) : <EOL> self . name = name <EOL> self . version = version <EOL> self . im = index_manager <EOL> self . path = path <EOL> if self . name is None and self . path : <EOL> info = self . im . pkginfo_from_file ( path , self . im . move_on_error ) <EOL> self . name = info . name <EOL> self . version = info . version <EOL> class PackageAdded ( PackageEvent ) : <EOL> implements ( IPackageAdded ) <EOL> class PackageRemoved ( PackageEvent ) : <EOL> implements ( IPackageRemoved ) </s>
