Show More
The requested changes are too big and content was truncated. Show full diff
@@ -1,7 +1,7 b'' | |||
|
1 | 1 | # -*- coding: utf-8 -*- |
|
2 | 2 | """Tools for coloring text in ANSI terminals. |
|
3 | 3 | |
|
4 |
$Id: ColorANSI.py |
|
|
4 | $Id: ColorANSI.py 2152 2007-03-18 20:13:35Z fperez $""" | |
|
5 | 5 | |
|
6 | 6 | #***************************************************************************** |
|
7 | 7 | # Copyright (C) 2002-2006 Fernando Perez. <fperez@colorado.edu> |
@@ -79,6 +79,12 b' class InputTermColors:' | |||
|
79 | 79 | This class should be used as a mixin for building color schemes.""" |
|
80 | 80 | |
|
81 | 81 | NoColor = '' # for color schemes in color-less terminals. |
|
82 | ||
|
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: | |
|
82 | 88 | Normal = '\001\033[0m\002' # Reset normal coloring |
|
83 | 89 | _base = '\001\033[%sm\002' # Template for all other colors |
|
84 | 90 |
@@ -5,7 +5,7 b' General purpose utilities.' | |||
|
5 | 5 | This is a grab-bag of stuff I find useful in most programs I write. Some of |
|
6 | 6 | these things are also convenient when working at the command line. |
|
7 | 7 | |
|
8 |
$Id: genutils.py 21 |
|
|
8 | $Id: genutils.py 2152 2007-03-18 20:13:35Z fperez $""" | |
|
9 | 9 | |
|
10 | 10 | #***************************************************************************** |
|
11 | 11 | # Copyright (C) 2001-2006 Fernando Perez. <fperez@colorado.edu> |
@@ -1247,7 +1247,8 b' def get_pager_start(pager,start):' | |||
|
1247 | 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 | 1252 | import msvcrt |
|
1252 | 1253 | def page_more(): |
|
1253 | 1254 | """ Smart pausing between pages |
@@ -6,7 +6,7 b'' | |||
|
6 | 6 | # the file COPYING, distributed as part of this software. |
|
7 | 7 | #***************************************************************************** |
|
8 | 8 | |
|
9 |
# $Id: usage.py 2 |
|
|
9 | # $Id: usage.py 2152 2007-03-18 20:13:35Z fperez $ | |
|
10 | 10 | |
|
11 | 11 | from IPython import Release |
|
12 | 12 | __author__ = '%s <%s>' % Release.authors['Fernando'] |
@@ -53,19 +53,19 b' SPECIAL THREADING OPTIONS' | |||
|
53 | 53 | ization of ipython itself, before the normal option-handling mechanism |
|
54 | 54 | is active. |
|
55 | 55 | |
|
56 | -gthread, -qthread, -wthread, -pylab | |
|
56 | -gthread, -qthread, -q4thread, -wthread, -pylab | |
|
57 | 57 | |
|
58 | 58 | Only ONE of these can be given, and it can only be given as the |
|
59 | 59 | first option passed to IPython (it will have no effect in any |
|
60 | 60 | other position). They provide threading support for the GTK, QT |
|
61 | 61 | and WXWidgets toolkits, and for the matplotlib library. |
|
62 | 62 | |
|
63 |
With any of the first |
|
|
63 | With any of the first four options, IPython starts running a | |
|
64 | 64 | separate thread for the graphical toolkit's operation, so that |
|
65 | 65 | you can open and control graphical elements from within an |
|
66 |
IPython command line, without blocking. All |
|
|
67 |
essentially the same functionality, respectively for GTK, QT |
|
|
68 | WXWidgets (via their Python interfaces). | |
|
66 | IPython command line, without blocking. All four provide | |
|
67 | essentially the same functionality, respectively for GTK, QT3, | |
|
68 | QT4 and WXWidgets (via their Python interfaces). | |
|
69 | 69 | |
|
70 | 70 | Note that with -wthread, you can additionally use the -wxversion |
|
71 | 71 | option to request a specific version of wx to be used. This |
@@ -81,14 +81,14 b' SPECIAL THREADING OPTIONS' | |||
|
81 | 81 | execute (without blocking) any matplotlib-based script which |
|
82 | 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 | 85 | configured to use GTK, QT or WX), will normally block Tk |
|
86 | 86 | graphical interfaces. This means that when GTK, QT or WX |
|
87 | 87 | threading is active, any attempt to open a Tk GUI will result in |
|
88 | 88 | a dead window, and possibly cause the Python interpreter to |
|
89 | 89 | crash. An extra option, -tk, is available to address this |
|
90 | 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 | 93 | If -tk is given, IPython will try to coordinate Tk threading |
|
94 | 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 | 6 | 2007-03-17 Fernando Perez <Fernando.Perez@colorado.edu> |
|
2 | 7 | |
|
3 | 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 | 36 | line, and not later. This is because they control the initialization of |
|
37 | 37 | ipython itself, before the normal option-handling mechanism is active. |
|
38 | 38 | .TP |
|
39 | .B \-gthread, \-qthread, \-wthread, \-pylab | |
|
39 | .B \-gthread, \-qthread, \-q4thread, \-wthread, \-pylab | |
|
40 | 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 | |
|
42 |
|
|
|
41 | passed to IPython (it will have no effect in any other position). They provide | |
|
42 | threading support for the GTK, QT3, QT4 and WXWidgets toolkits, and for the | |
|
43 | 43 | matplotlib library. |
|
44 | 44 | .br |
|
45 | 45 | .sp 1 |
|
46 |
With any of the first |
|
|
46 | With any of the first four options, IPython starts running a separate thread | |
|
47 | 47 | for the graphical toolkit's operation, so that you can open and control |
|
48 | 48 | graphical elements from within an IPython command line, without blocking. All |
|
49 |
|
|
|
50 | WXWidgets (via their Python interfaces). | |
|
49 | four provide essentially the same functionality, respectively for GTK, QT3, QT4 | |
|
50 | and WXWidgets (via their Python interfaces). | |
|
51 | 51 | .br |
|
52 | 52 | .sp 1 |
|
53 | 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 | 64 | (without blocking) any matplotlib-based script which calls show() at the end. |
|
65 | 65 | .TP |
|
66 | 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 | 68 | GTK, QT or WX), will normally block Tk graphical interfaces. This means that |
|
69 | 69 | when GTK, QT or WX threading is active, any attempt to open a Tk GUI will |
|
70 | 70 | result in a dead window, and possibly cause the Python interpreter to crash. |
|
1 | 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 | 88 | # make shortcuts for IPython, html and pdf docs. |
|
89 | 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 | 96 | # Create shortcuts in Programs\IPython: |
|
92 | 97 | if not os.path.isdir(ip_prog_dir): |
|
93 | 98 | os.mkdir(ip_prog_dir) |
General Comments 0
You need to be logged in to leave comments.
Login now