#NEWLINE# def getfiletypeunit( nf , filetype ) : #NEWLINE# #INDENT# '\n    Method to return unit number of a package from a NamData instance\n\n    Parameters\n    ----------\n    nf : NamData instance\n    filetype : string, name of package seeking information for\n\n    Returns\n    -------\n    cunit : int, unit number corresponding to the package type\n\n    ' #NEWLINE# for ( cunit , cvals ) in nf . items ( ) : #NEWLINE# #INDENT# if ( cvals . filetype . lower ( ) == filetype . lower ( ) ) : #NEWLINE# #INDENT# return cunit #NEWLINE# #UNINDENT# #UNINDENT# print ( 'Name file does not contain file of type "{0}"' . format ( nf ) ) #NEWLINE# return None