def splituser(host):
 global _userprog
 if (_userprog is None):
  import re
  _userprog = re.compile('^(.*)@(.*)$')
 match = _userprog.match(host)
 if match:
  return match.group(1, 2)
 return (None, host)

def splituser ( host ) : global _userprog if ( _userprog is None ) : import re _userprog = re . compile ( '^(.*)@(.*)$' ) match = _userprog . match ( host ) if match : return match . group ( 1 , 2 ) return ( None , host )
splituser --> user[:passwd] .