#NEWLINE# @ classmethod #NEWLINE# def from_file( cls , filename ) : #NEWLINE# #INDENT# 'Reads a project from a project file.' #NEWLINE# inifile = IniFile ( filename ) #NEWLINE# if inifile . is_new : #NEWLINE# #INDENT# return None #NEWLINE# #UNINDENT# name = ( inifile . get ( 'project.name' ) or os . path . basename ( filename ) . rsplit ( '.' ) [ 0 ] . title ( ) ) #NEWLINE# path = os . path . join ( os . path . dirname ( filename ) , to_os_path ( ( inifile . get ( 'project.path' ) or '.' ) ) ) #NEWLINE# return cls ( name = name , project_file = filename , tree = name )