##// END OF EJS Templates
simpler ls -F command for less cool ls.exe
vivainio -
Show More
@@ -1,30 +1,31 b''
1
1
2 import os,sys
2 import os,sys
3
3
4 def selflaunch(line):
4 def selflaunch(line):
5 """ Launch python script with 'this' interpreter
5 """ Launch python script with 'this' interpreter
6
6
7 e.g. d:\foo\ipython.exe a.py
7 e.g. d:\foo\ipython.exe a.py
8
8
9 """
9 """
10 cmd = sys.executable + ' ' + line.split(None,1)[1]
10 cmd = sys.executable + ' ' + line.split(None,1)[1]
11 print ">",cmd
11 print ">",cmd
12 os.system(cmd)
12 os.system(cmd)
13
13
14 def main():
14 def main():
15 import IPython.ipapi
15 import IPython.ipapi
16 ip = IPython.ipapi.get()
16 ip = IPython.ipapi.get()
17
17
18 root = os.environ.get('IPYKITROOT', None)
18 root = os.environ.get('IPYKITROOT', None)
19 if not root:
19 if not root:
20 print "Can't configure ipykit, IPYKITROOT should be set."
20 print "Can't configure ipykit, IPYKITROOT should be set."
21 return
21 return
22
22
23 os.environ["PATH"] = os.environ["PATH"] + ";" + root + "\\bin;"
23 os.environ["PATH"] = os.environ["PATH"] + ";" + root + "\\bin;"
24
24
25 ip.defalias('py',selflaunch)
25 ip.defalias('py',selflaunch)
26
26
27 ip.defalias('ls','ls -F')
27
28
28 main()
29 main()
29
30
30
31
General Comments 0
You need to be logged in to leave comments. Login now