##// END OF EJS Templates
Fix local variable error.
fptest -
Show More
@@ -96,13 +96,13 b' def runlistpy(self, event):'
96 relpath = (len(comps) > 1 and comps[-1] or '')
96 relpath = (len(comps) > 1 and comps[-1] or '')
97
97
98 #print "rp",relpath # dbg
98 #print "rp",relpath # dbg
99 glob = glob.glob
99 lglob = glob.glob
100 isdir = os.path.isdir
100 isdir = os.path.isdir
101 if relpath.startswith('~'):
101 if relpath.startswith('~'):
102 relpath = os.path.expanduser(relpath)
102 relpath = os.path.expanduser(relpath)
103 dirs = [f.replace('\\','/') + "/" for f in glob(relpath+'*')
103 dirs = [f.replace('\\','/') + "/" for f in lglob(relpath+'*')
104 if isdir(f)]
104 if isdir(f)]
105 pys = [f.replace('\\','/') for f in glob(relpath+'*.py')]
105 pys = [f.replace('\\','/') for f in lglob(relpath+'*.py')]
106 return dirs + pys
106 return dirs + pys
107
107
108 ip.set_hook('complete_command', runlistpy, str_key = '%run')
108 ip.set_hook('complete_command', runlistpy, str_key = '%run')
General Comments 0
You need to be logged in to leave comments. Login now