<s> import abc <EOL> import os <EOL> import qisys . error <EOL> import qisys . sh <EOL> class LinguistProject ( object ) : <EOL> """<STR_LIT>""" <EOL> __metaclass__ = abc . ABCMeta <EOL> def __init__ ( self , name , path , domain = None , linguas = None ) : <EOL> self . path = path <EOL> self . domain = domain <EOL> self . name = name <EOL> self . linguas = linguas <EOL> @ property <EOL> def po_path ( self ) : <EOL> res = os . path . join ( self . path , "<STR_LIT>" ) <EOL> qisys . sh . mkdir ( res ) <EOL> return res <EOL> @ property <EOL> def potfiles_in ( self ) : <EOL> res = os . path . join ( self . po_path , "<STR_LIT>" ) <EOL> if not os . path . exists ( res ) : <EOL> mess = "<STR_LIT>" <EOL> raise qisys . error . Error ( mess . format ( self . name , self . path ) ) <EOL> return res <EOL> def get_sources ( self ) : <EOL> """<STR_LIT>""" <EOL> res = list ( ) <EOL> with open ( self . potfiles_in , "<STR_LIT:r>" ) as fp : <EOL> for line in fp : <EOL> if line . startswith ( "<STR_LIT:#>" ) : <EOL> continue <EOL> res . append ( line . strip ( ) ) <EOL> return res <EOL> @ abc . abstractmethod <EOL> def update ( self ) : <EOL> pass <EOL> @ abc . abstractmethod <EOL> def release ( self , raises = True ) : <EOL> pass </s>
