##// END OF EJS Templates
drop some 2.6 hacks
Matthias Bussonnier -
Show More
@@ -64,13 +64,8 b' def start_console():'
64 "Start `ipython console` using pexpect"
64 "Start `ipython console` using pexpect"
65 from IPython.external import pexpect
65 from IPython.external import pexpect
66
66
67 args = ['console', '--colors=NoColor']
67 args = ['-m', 'IPython', 'console', '--colors=NoColor']
68 # FIXME: remove workaround for 2.6 support
69 if sys.version_info[:2] > (2,6):
70 args = ['-m', 'IPython'] + args
71 cmd = sys.executable
68 cmd = sys.executable
72 else:
73 cmd = 'ipython'
74
69
75 try:
70 try:
76 p = pexpect.spawn(cmd, args=args)
71 p = pexpect.spawn(cmd, args=args)
@@ -187,10 +187,7 b' else:'
187 if sys.platform == 'win32':
187 if sys.platform == 'win32':
188 def execfile(fname, glob=None, loc=None):
188 def execfile(fname, glob=None, loc=None):
189 loc = loc if (loc is not None) else glob
189 loc = loc if (loc is not None) else glob
190 # The rstrip() is necessary b/c trailing whitespace in files will
190 scripttext = builtin_mod.open(fname).read()+ '\n'
191 # cause an IndentationError in Python 2.6 (this was fixed in 2.7,
192 # but we still support 2.6). See issue 1027.
193 scripttext = builtin_mod.open(fname).read().rstrip() + '\n'
194 # compile converts unicode filename to str assuming
191 # compile converts unicode filename to str assuming
195 # ascii. Let's do the conversion before calling compile
192 # ascii. Let's do the conversion before calling compile
196 if isinstance(fname, unicode):
193 if isinstance(fname, unicode):
General Comments 0
You need to be logged in to leave comments. Login now