def is_file_into_dir(filename, dirname):
 try:
  res = (not os.path.relpath(filename, dirname).startswith(u'.'))
 except ValueError:
  res = False
 return res

def is_file_into_dir ( filename , dirname ) : try : res = ( not os . path . relpath ( filename , dirname ) . startswith ( u'.' ) ) except ValueError : res = False return res
check if a file is in directory .