def complete_python(prefix, line, start, end, ctx):
 rtn = _complete_python(prefix, line, start, end, ctx)
 if (not rtn):
  prefix = (re.split('\\(|=|{|\\[|,', prefix)[(-1)] if (not prefix.startswith(',')) else prefix)
  start = line.find(prefix)
  rtn = _complete_python(prefix, line, start, end, ctx)
  return (rtn, len(prefix))
 return rtn

def complete_python ( prefix , line , start , end , ctx ) : rtn = _complete_python ( prefix , line , start , end , ctx ) if ( not rtn ) : prefix = ( re . split ( '\\(|=|{|\\[|,' , prefix ) [ ( - 1 ) ] if ( not prefix . startswith ( ',' ) ) else prefix ) start = line . find ( prefix ) rtn = _complete_python ( prefix , line , start , end , ctx ) return ( rtn , len ( prefix ) ) return rtn
completes based on the contents of the current python environment .