#NEWLINE# def _make_ctf_name( directory , extra , raise_error = True ) : #NEWLINE# #INDENT# 'Helper to make a CTF name' #NEWLINE# fname = op . join ( directory , ( ( op . basename ( directory ) [ : ( - 3 ) ] + '.' ) + extra ) ) #NEWLINE# if ( not op . isfile ( fname ) ) : #NEWLINE# #INDENT# if raise_error : #NEWLINE# #INDENT# raise IOError ( ( 'Standard file %s not found' % fname ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return None #NEWLINE# #UNINDENT# #UNINDENT# return fname