def analyse_par2(name):
 head = None
 vol = block = 0
 if (name and (not REJECT_PAR2_RE.search(name))):
  m = PROBABLY_PAR2_RE.search(name)
  if m:
   head = m.group(1)
   vol = m.group(2)
   block = m.group(3)
  elif (name.lower().find('.par2') > 0):
   head = os.path.splitext(name)[0].strip()
  else:
   head = None
 return (head, vol, block)

def analyse_par2 ( name ) : head = None vol = block = 0 if ( name and ( not REJECT_PAR2_RE . search ( name ) ) ) : m = PROBABLY_PAR2_RE . search ( name ) if m : head = m . group ( 1 ) vol = m . group ( 2 ) block = m . group ( 3 ) elif ( name . lower ( ) . find ( '.par2' ) > 0 ) : head = os . path . splitext ( name ) [ 0 ] . strip ( ) else : head = None return ( head , vol , block )
check if file is a par2-file and determine vol/block return head .