def _split(p):
 dash = (_allowMOSFSNames and (p[:1] == '-'))
 if dash:
  q = (string.find(p, '-', 1) + 1)
 elif (p[:1] == ':'):
  q = 0
 else:
  q = (string.find(p, ':') + 1)
 s = string.find(p, '#')
 if ((s == (-1)) or (s > q)):
  s = q
 else:
  for c in p[dash:s]:
   if (c not in string.ascii_letters):
    q = 0
    break
 r = q
 if (p[q:(q + 1)] == ':'):
  r = (string.find(p, '.', (q + 1)) + 1)
  if (r == 0):
   r = len(p)
 return (p[:q], p[q:r], p[r:])

def _split ( p ) : dash = ( _allowMOSFSNames and ( p [ : 1 ] == '-' ) ) if dash : q = ( string . find ( p , '-' , 1 ) + 1 ) elif ( p [ : 1 ] == ':' ) : q = 0 else : q = ( string . find ( p , ':' ) + 1 ) s = string . find ( p , '#' ) if ( ( s == ( - 1 ) ) or ( s > q ) ) : s = q else : for c in p [ dash : s ] : if ( c not in string . ascii_letters ) : q = 0 break r = q if ( p [ q : ( q + 1 ) ] == ':' ) : r = ( string . find ( p , '.' , ( q + 1 ) ) + 1 ) if ( r == 0 ) : r = len ( p ) return ( p [ : q ] , p [ q : r ] , p [ r : ] )
split filing system name and drive specifier from rest of path .