(self, filename)
return layer
extract the code from the filename
extract the code from the filename
extract the code from the filename
def get_sobject_by_filename(self, filename):
        '''extract the code from the filename'''
        index = filename.rfind("_")
        if index == -1:
            return None
        ext_index = filename.find(".")

        shot_code = filename[0:index]
        layer_code = filename[index+1:ext_index]
        from pyasm.flash.biz import FlashLayer
        layer = FlashLayer.get(shot_code, layer_code)
        return layer
def get_sobject_by_filename ( self , filename ) : index = filename . rfind ( "_" ) if index == - 1 : return None ext_index = filename . find ( "." ) shot_code = filename [ 0 : index ] layer_code = filename [ index + 1 : ext_index ] from pyasm . flash . biz import FlashLayer layer = FlashLayer . get ( shot_code , layer_code ) return layer