##// END OF EJS Templates
- applied Nicolas Pernetty's patch to improve support for (X)Emacs under Win32....
fperez -
Show More

The requested changes are too big and content was truncated. Show full diff

@@ -1,7 +1,7 b''
1 # -*- coding: utf-8 -*-
1 # -*- coding: utf-8 -*-
2 """Tools for coloring text in ANSI terminals.
2 """Tools for coloring text in ANSI terminals.
3
3
4 $Id: ColorANSI.py 1005 2006-01-12 08:39:26Z fperez $"""
4 $Id: ColorANSI.py 2152 2007-03-18 20:13:35Z fperez $"""
5
5
6 #*****************************************************************************
6 #*****************************************************************************
7 # Copyright (C) 2002-2006 Fernando Perez. <fperez@colorado.edu>
7 # Copyright (C) 2002-2006 Fernando Perez. <fperez@colorado.edu>
@@ -79,8 +79,14 b' class InputTermColors:'
79 This class should be used as a mixin for building color schemes."""
79 This class should be used as a mixin for building color schemes."""
80
80
81 NoColor = '' # for color schemes in color-less terminals.
81 NoColor = '' # for color schemes in color-less terminals.
82 Normal = '\001\033[0m\002' # Reset normal coloring
82
83 _base = '\001\033[%sm\002' # Template for all other colors
83 if os.name == 'nt' and os.environ.get('TERM','dumb') != 'emacs':
84 # (X)emacs on W32 gets confused with \001 and \002 so we remove them
85 Normal = '\033[0m' # Reset normal coloring
86 _base = '\033[%sm' # Template for all other colors
87 else:
88 Normal = '\001\033[0m\002' # Reset normal coloring
89 _base = '\001\033[%sm\002' # Template for all other colors
84
90
85 # Build the actual color table as a set of class attributes:
91 # Build the actual color table as a set of class attributes:
86 make_color_table(InputTermColors)
92 make_color_table(InputTermColors)
@@ -5,7 +5,7 b' General purpose utilities.'
5 This is a grab-bag of stuff I find useful in most programs I write. Some of
5 This is a grab-bag of stuff I find useful in most programs I write. Some of
6 these things are also convenient when working at the command line.
6 these things are also convenient when working at the command line.
7
7
8 $Id: genutils.py 2108 2007-02-23 00:31:17Z fperez $"""
8 $Id: genutils.py 2152 2007-03-18 20:13:35Z fperez $"""
9
9
10 #*****************************************************************************
10 #*****************************************************************************
11 # Copyright (C) 2001-2006 Fernando Perez. <fperez@colorado.edu>
11 # Copyright (C) 2001-2006 Fernando Perez. <fperez@colorado.edu>
@@ -1247,7 +1247,8 b' def get_pager_start(pager,start):'
1247 return start_string
1247 return start_string
1248
1248
1249 #----------------------------------------------------------------------------
1249 #----------------------------------------------------------------------------
1250 if os.name == "nt":
1250 # (X)emacs on W32 doesn't like to be bypassed with msvcrt.getch()
1251 if os.name == 'nt' and os.environ.get('TERM','dumb') != 'emacs':
1251 import msvcrt
1252 import msvcrt
1252 def page_more():
1253 def page_more():
1253 """ Smart pausing between pages
1254 """ Smart pausing between pages
@@ -6,7 +6,7 b''
6 # the file COPYING, distributed as part of this software.
6 # the file COPYING, distributed as part of this software.
7 #*****************************************************************************
7 #*****************************************************************************
8
8
9 # $Id: usage.py 2010 2006-12-20 15:29:17Z vivainio $
9 # $Id: usage.py 2152 2007-03-18 20:13:35Z fperez $
10
10
11 from IPython import Release
11 from IPython import Release
12 __author__ = '%s <%s>' % Release.authors['Fernando']
12 __author__ = '%s <%s>' % Release.authors['Fernando']
@@ -53,19 +53,19 b' SPECIAL THREADING OPTIONS'
53 ization of ipython itself, before the normal option-handling mechanism
53 ization of ipython itself, before the normal option-handling mechanism
54 is active.
54 is active.
55
55
56 -gthread, -qthread, -wthread, -pylab
56 -gthread, -qthread, -q4thread, -wthread, -pylab
57
57
58 Only ONE of these can be given, and it can only be given as the
58 Only ONE of these can be given, and it can only be given as the
59 first option passed to IPython (it will have no effect in any
59 first option passed to IPython (it will have no effect in any
60 other position). They provide threading support for the GTK, QT
60 other position). They provide threading support for the GTK, QT
61 and WXWidgets toolkits, and for the matplotlib library.
61 and WXWidgets toolkits, and for the matplotlib library.
62
62
63 With any of the first three options, IPython starts running a
63 With any of the first four options, IPython starts running a
64 separate thread for the graphical toolkit's operation, so that
64 separate thread for the graphical toolkit's operation, so that
65 you can open and control graphical elements from within an
65 you can open and control graphical elements from within an
66 IPython command line, without blocking. All three provide
66 IPython command line, without blocking. All four provide
67 essentially the same functionality, respectively for GTK, QT and
67 essentially the same functionality, respectively for GTK, QT3,
68 WXWidgets (via their Python interfaces).
68 QT4 and WXWidgets (via their Python interfaces).
69
69
70 Note that with -wthread, you can additionally use the -wxversion
70 Note that with -wthread, you can additionally use the -wxversion
71 option to request a specific version of wx to be used. This
71 option to request a specific version of wx to be used. This
@@ -81,14 +81,14 b' SPECIAL THREADING OPTIONS'
81 execute (without blocking) any matplotlib-based script which
81 execute (without blocking) any matplotlib-based script which
82 calls show() at the end.
82 calls show() at the end.
83
83
84 -tk The -g/q/wthread options, and -pylab (if matplotlib is
84 -tk The -g/q/q4/wthread options, and -pylab (if matplotlib is
85 configured to use GTK, QT or WX), will normally block Tk
85 configured to use GTK, QT or WX), will normally block Tk
86 graphical interfaces. This means that when GTK, QT or WX
86 graphical interfaces. This means that when GTK, QT or WX
87 threading is active, any attempt to open a Tk GUI will result in
87 threading is active, any attempt to open a Tk GUI will result in
88 a dead window, and possibly cause the Python interpreter to
88 a dead window, and possibly cause the Python interpreter to
89 crash. An extra option, -tk, is available to address this
89 crash. An extra option, -tk, is available to address this
90 issue. It can ONLY be given as a SECOND option after any of the
90 issue. It can ONLY be given as a SECOND option after any of the
91 above (-gthread, -qthread, -wthread or -pylab).
91 above (-gthread, -qthread, q4thread, -wthread or -pylab).
92
92
93 If -tk is given, IPython will try to coordinate Tk threading
93 If -tk is given, IPython will try to coordinate Tk threading
94 with GTK, QT or WX. This is however potentially unreliable, and
94 with GTK, QT or WX. This is however potentially unreliable, and
@@ -1,3 +1,8 b''
1 2007-03-18 Fernando Perez <Fernando.Perez@colorado.edu>
2
3 * IPython/ColorANSI.py (InputTermColors.Normal): applied Nicolas
4 Pernetty's patch to improve support for (X)Emacs under Win32.
5
1 2007-03-17 Fernando Perez <Fernando.Perez@colorado.edu>
6 2007-03-17 Fernando Perez <Fernando.Perez@colorado.edu>
2
7
3 * IPython/Shell.py (hijack_wx): ipmort WX with current semantics
8 * IPython/Shell.py (hijack_wx): ipmort WX with current semantics
@@ -36,18 +36,18 b' The following special options are ONLY valid at the beginning of the command'
36 line, and not later. This is because they control the initialization of
36 line, and not later. This is because they control the initialization of
37 ipython itself, before the normal option-handling mechanism is active.
37 ipython itself, before the normal option-handling mechanism is active.
38 .TP
38 .TP
39 .B \-gthread, \-qthread, \-wthread, \-pylab
39 .B \-gthread, \-qthread, \-q4thread, \-wthread, \-pylab
40 Only ONE of these can be given, and it can only be given as the first option
40 Only ONE of these can be given, and it can only be given as the first option
41 passed to IPython (it will have no effect in any other position). They
41 passed to IPython (it will have no effect in any other position). They provide
42 provide threading support for the GTK, QT and WXWidgets toolkits, and for the
42 threading support for the GTK, QT3, QT4 and WXWidgets toolkits, and for the
43 matplotlib library.
43 matplotlib library.
44 .br
44 .br
45 .sp 1
45 .sp 1
46 With any of the first three options, IPython starts running a separate thread
46 With any of the first four options, IPython starts running a separate thread
47 for the graphical toolkit's operation, so that you can open and control
47 for the graphical toolkit's operation, so that you can open and control
48 graphical elements from within an IPython command line, without blocking. All
48 graphical elements from within an IPython command line, without blocking. All
49 three provide essentially the same functionality, respectively for GTK, QT and
49 four provide essentially the same functionality, respectively for GTK, QT3, QT4
50 WXWidgets (via their Python interfaces).
50 and WXWidgets (via their Python interfaces).
51 .br
51 .br
52 .sp 1
52 .sp 1
53 Note that with \-wthread, you can additionally use the \-wxversion option to
53 Note that with \-wthread, you can additionally use the \-wxversion option to
@@ -64,7 +64,7 b' backend requires it. It also modifies the %run command to correctly execute'
64 (without blocking) any matplotlib-based script which calls show() at the end.
64 (without blocking) any matplotlib-based script which calls show() at the end.
65 .TP
65 .TP
66 .B \-tk
66 .B \-tk
67 The \-g/q/wthread options, and \-pylab (if matplotlib is configured to use
67 The \-g/q/q4/wthread options, and \-pylab (if matplotlib is configured to use
68 GTK, QT or WX), will normally block Tk graphical interfaces. This means that
68 GTK, QT or WX), will normally block Tk graphical interfaces. This means that
69 when GTK, QT or WX threading is active, any attempt to open a Tk GUI will
69 when GTK, QT or WX threading is active, any attempt to open a Tk GUI will
70 result in a dead window, and possibly cause the Python interpreter to crash.
70 result in a dead window, and possibly cause the Python interpreter to crash.
1 NO CONTENT: modified file
NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
@@ -88,6 +88,11 b' def run(wait=0):'
88 # make shortcuts for IPython, html and pdf docs.
88 # make shortcuts for IPython, html and pdf docs.
89 print 'Making entries for IPython in Start Menu...',
89 print 'Making entries for IPython in Start Menu...',
90
90
91 # Create .bat file in \\Scripts
92 fic = open(sys.prefix + '\\Scripts\\ipython.bat','w')
93 fic.write('"' + sys.prefix + '\\python.exe' + '" -i ' + '"' + sys.prefix + '\\Scripts\ipython" %*')
94 fic.close()
95
91 # Create shortcuts in Programs\IPython:
96 # Create shortcuts in Programs\IPython:
92 if not os.path.isdir(ip_prog_dir):
97 if not os.path.isdir(ip_prog_dir):
93 os.mkdir(ip_prog_dir)
98 os.mkdir(ip_prog_dir)
General Comments 0
You need to be logged in to leave comments. Login now