<s> import os <EOL> from glue . exceptions import NoSpritesFoldersFoundError <EOL> from . base import BaseManager <EOL> from glue . core import ConfigurableFromFile <EOL> class ProjectManager ( BaseManager , ConfigurableFromFile ) : <EOL> """<STR_LIT>""" <EOL> def __init__ ( self , * args , ** kwargs ) : <EOL> super ( ProjectManager , self ) . __init__ ( * args , ** kwargs ) <EOL> self . config_path = self . config [ '<STR_LIT:source>' ] <EOL> self . config . update ( self . _get_config_from_file ( '<STR_LIT>' , '<STR_LIT>' ) ) <EOL> def find_sprites ( self ) : <EOL> for filename in sorted ( os . listdir ( self . config [ '<STR_LIT:source>' ] ) ) : <EOL> path = os . path . join ( self . config [ '<STR_LIT:source>' ] , filename ) <EOL> if filename . startswith ( '<STR_LIT:.>' ) : <EOL> continue <EOL> if not os . path . isdir ( path ) and not ( os . path . islink ( path ) and self . config [ '<STR_LIT>' ] ) : <EOL> continue <EOL> self . add_sprite ( path = path ) <EOL> if not self . sprites : <EOL> raise NoSpritesFoldersFoundError ( self . config [ '<STR_LIT:source>' ] ) </s>
