def open_pathname(pathname, verbose=0):
 try:
  refno = Res.FSpOpenResFile(pathname, 1)
 except Res.Error as arg:
  if (arg[0] in ((-37), (-39))):
   try:
    refno = Res.FSOpenResourceFile(pathname, u'', 1)
   except Res.Error as arg:
    if (arg[0] != (-199)):
     raise
   else:
    return refno
   pathname = _decode(pathname, verbose=verbose)
   refno = Res.FSOpenResourceFile(pathname, u'', 1)
  else:
   raise
 return refno

def open_pathname ( pathname , verbose = 0 ) : try : refno = Res . FSpOpenResFile ( pathname , 1 ) except Res . Error as arg : if ( arg [ 0 ] in ( ( - 37 ) , ( - 39 ) ) ) : try : refno = Res . FSOpenResourceFile ( pathname , u'' , 1 ) except Res . Error as arg : if ( arg [ 0 ] != ( - 199 ) ) : raise else : return refno pathname = _decode ( pathname , verbose = verbose ) refno = Res . FSOpenResourceFile ( pathname , u'' , 1 ) else : raise return refno
open a resource file given by pathname .