environment/lib/python2.7/site-packages/IPython/core/completerlib.py
def magic_run_completer(self, event):
    """Complete files that end in .py or .ipy for the %run command.
    """
    comps = arg_split(event.line, strict=False)
    relpath = (len(comps) > 1 and comps[-1] or '').strip("'\"")

    #print("\nev=", event)  # dbg
    #print("rp=", relpath)  # dbg
    #print('comps=', comps)  # dbg

    lglob = glob.glob
    isdir = os.path.isdir
    relpath, tilde_expand, tilde_val = expand_user(relpath)

    dirs = [f.replace('\\','/') + "/" for f in lglob(relpath+'*') if isdir(f)]

    # Find if the user has already typed the first filename, after which we
    # should complete on all files, since after the first one other files may
    # be arguments to the input script.

    if filter(magic_run_re.match, comps):
        pys =  [f.replace('\\','/') for f in lglob('*')]
    else:
        pys =  [f.replace('\\','/')
                for f in lglob(relpath+'*.py') + lglob(relpath+'*.ipy') +
                lglob(relpath + '*.pyw')]
    #print('run comp:', dirs+pys) # dbg
    return [compress_user(p, tilde_expand, tilde_val) for p in dirs+pys]
def magic_run_completer(self, event):
    comps = arg_split(event.line, strict=False)
    relpath = (len(comps) > 1 and comps[-1] or '').strip("'\"")

    #print("\nev=", event)  # dbg
    #print("rp=", relpath)  # dbg
    #print('comps=', comps)  # dbg

    lglob = glob.glob
    isdir = os.path.isdir
    relpath, tilde_expand, tilde_val = expand_user(relpath)

    dirs = [f.replace('\\','/') + "/" for f in lglob(relpath+'*') if isdir(f)]

    # Find if the user has already typed the first filename, after which we
    # should complete on all files, since after the first one other files may
    # be arguments to the input script.

    if filter(magic_run_re.match, comps):
        pys =  [f.replace('\\','/') for f in lglob('*')]
    else:
        pys =  [f.replace('\\','/')
                for f in lglob(relpath+'*.py') + lglob(relpath+'*.ipy') +
                lglob(relpath + '*.pyw')]
    #print('run comp:', dirs+pys) # dbg
    return [compress_user(p, tilde_expand, tilde_val) for p in dirs+pys]
def magic_run_completer ( self , event ) : comps = arg_split ( event . line , strict = False ) relpath = ( len ( comps ) > 1 and comps [ - 1 ] or '' ) . strip ( "'\"" ) #print("\nev=", event)  # dbg #print("rp=", relpath)  # dbg #print('comps=', comps)  # dbg lglob = glob . glob isdir = os . path . isdir relpath , tilde_expand , tilde_val = expand_user ( relpath ) dirs = [ f . replace ( '\\' , '/' ) + "/" for f in lglob ( relpath + '*' ) if isdir ( f ) ] # Find if the user has already typed the first filename, after which we # should complete on all files, since after the first one other files may # be arguments to the input script. if filter ( magic_run_re . match , comps ) : pys = [ f . replace ( '\\' , '/' ) for f in lglob ( '*' ) ] else : pys = [ f . replace ( '\\' , '/' ) for f in lglob ( relpath + '*.py' ) + lglob ( relpath + '*.ipy' ) + lglob ( relpath + '*.pyw' ) ] #print('run comp:', dirs+pys) # dbg return [ compress_user ( p , tilde_expand , tilde_val ) for p in dirs + pys ]
Complete files that end in .py or .ipy for the %run command.
Complete files that end in . py or . ipy for the %run command .