#NEWLINE# def new( projname ) : #NEWLINE# #INDENT# ' create new project from default files ' #NEWLINE# if ( find_project ( ) != False ) : #NEWLINE# #INDENT# raise PyscaleError ( 'Inside another project. Aborting...' ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if osp . isdir ( projname ) : #NEWLINE# #INDENT# raise PyscaleError ( 'Folder already exists. Aborting...' ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# project = osp . join ( pyscale . __path__ [ 0 ] , 'files' , 'project' ) #NEWLINE# #UNINDENT# #UNINDENT# def ignore( dirname , names ) : #NEWLINE# #INDENT# common = osp . commonprefix ( [ project , dirname ] ) #NEWLINE# puts ( ( fore . green ( '   init ' ) + osp . join ( projname , dirname [ ( len ( common ) + 1 ) : ] ) ) ) #NEWLINE# return [ ] #NEWLINE# #UNINDENT# shutil . copytree ( project , projname , ignore = ignore )