def splitvalue(attr):
 global _valueprog
 if (_valueprog is None):
  import re
  _valueprog = re.compile('^([^=]*)=(.*)$')
 match = _valueprog.match(attr)
 if match:
  return match.group(1, 2)
 return (attr, None)

def splitvalue ( attr ) : global _valueprog if ( _valueprog is None ) : import re _valueprog = re . compile ( '^([^=]*)=(.*)$' ) match = _valueprog . match ( attr ) if match : return match . group ( 1 , 2 ) return ( attr , None )
splitvalue --> attr .