##// END OF EJS Templates
.py is always executable for purposes of %rehashx and %rehashdir
vivainio -
Show More
@@ -66,7 +66,9 b' def rehashdir_f(self,arg):'
66 winext = os.environ['pathext'].replace(';','|').replace('.','')
66 winext = os.environ['pathext'].replace(';','|').replace('.','')
67 except KeyError:
67 except KeyError:
68 winext = 'exe|com|bat|py'
68 winext = 'exe|com|bat|py'
69
69 if 'py' not in winext:
70 winext += '|py'
71
70 execre = re.compile(r'(.*)\.(%s)$' % winext,re.IGNORECASE)
72 execre = re.compile(r'(.*)\.(%s)$' % winext,re.IGNORECASE)
71 isexec = lambda fname:os.path.isfile(fname) and execre.match(fname)
73 isexec = lambda fname:os.path.isfile(fname) and execre.match(fname)
72 savedir = os.getcwd()
74 savedir = os.getcwd()
@@ -1,7 +1,7 b''
1 # -*- coding: utf-8 -*-
1 # -*- coding: utf-8 -*-
2 """Magic functions for InteractiveShell.
2 """Magic functions for InteractiveShell.
3
3
4 $Id: Magic.py 1824 2006-10-13 21:07:59Z vivainio $"""
4 $Id: Magic.py 1825 2006-10-13 21:29:33Z vivainio $"""
5
5
6 #*****************************************************************************
6 #*****************************************************************************
7 # Copyright (C) 2001 Janko Hauser <jhauser@zscout.de> and
7 # Copyright (C) 2001 Janko Hauser <jhauser@zscout.de> and
@@ -2460,8 +2460,9 b' Defaulting color scheme to \'NoColor\'"""'
2460 try:
2460 try:
2461 winext = os.environ['pathext'].replace(';','|').replace('.','')
2461 winext = os.environ['pathext'].replace(';','|').replace('.','')
2462 except KeyError:
2462 except KeyError:
2463 winext = 'exe|com|bat'
2463 winext = 'exe|com|bat|py'
2464
2464 if 'py' not in winext:
2465 winext += '|py'
2465 execre = re.compile(r'(.*)\.(%s)$' % winext,re.IGNORECASE)
2466 execre = re.compile(r'(.*)\.(%s)$' % winext,re.IGNORECASE)
2466 isexec = lambda fname:os.path.isfile(fname) and execre.match(fname)
2467 isexec = lambda fname:os.path.isfile(fname) and execre.match(fname)
2467 savedir = os.getcwd()
2468 savedir = os.getcwd()
General Comments 0
You need to be logged in to leave comments. Login now