def _complete_python(prefix, line, start, end, ctx):
 if (line != ''):
  first = line.split()[0]
  if ((first in builtins.__xonsh_commands_cache__) and (first not in ctx)):
   return set()
 filt = get_filter_function()
 rtn = {s for s in XONSH_TOKENS if filt(s, prefix)}
 if (ctx is not None):
  if ('.' in prefix):
   rtn |= attr_complete(prefix, ctx, filt)
  rtn |= {s for s in ctx if filt(s, prefix)}
 rtn |= {s for s in dir(builtins) if filt(s, prefix)}
 return rtn

def _complete_python ( prefix , line , start , end , ctx ) : if ( line != '' ) : first = line . split ( ) [ 0 ] if ( ( first in builtins . __xonsh_commands_cache__ ) and ( first not in ctx ) ) : return set ( ) filt = get_filter_function ( ) rtn = { s for s in XONSH_TOKENS if filt ( s , prefix ) } if ( ctx is not None ) : if ( '.' in prefix ) : rtn |= attr_complete ( prefix , ctx , filt ) rtn |= { s for s in ctx if filt ( s , prefix ) } rtn |= { s for s in dir ( builtins ) if filt ( s , prefix ) } return rtn
completes based on the contents of the current python environment .