Show More
@@ -4,7 +4,7 b'' | |||||
4 | All the matplotlib support code was co-developed with John Hunter, |
|
4 | All the matplotlib support code was co-developed with John Hunter, | |
5 | matplotlib's author. |
|
5 | matplotlib's author. | |
6 |
|
6 | |||
7 |
$Id: Shell.py |
|
7 | $Id: Shell.py 802 2005-09-06 03:49:12Z fperez $""" | |
8 |
|
8 | |||
9 | #***************************************************************************** |
|
9 | #***************************************************************************** | |
10 | # Copyright (C) 2001-2004 Fernando Perez <fperez@colorado.edu> |
|
10 | # Copyright (C) 2001-2004 Fernando Perez <fperez@colorado.edu> | |
@@ -561,9 +561,6 b' def hijack_gtk():' | |||||
561 | """Modifies pyGTK's mainloop with a dummy so user code does not |
|
561 | """Modifies pyGTK's mainloop with a dummy so user code does not | |
562 | block IPython. This function returns the original `gtk.mainloop` |
|
562 | block IPython. This function returns the original `gtk.mainloop` | |
563 | function that has been hijacked. |
|
563 | function that has been hijacked. | |
564 |
|
||||
565 | NOTE: Make sure you import this *AFTER* you call |
|
|||
566 | pygtk.require(...). |
|
|||
567 | """ |
|
564 | """ | |
568 | def dummy_mainloop(*args, **kw): |
|
565 | def dummy_mainloop(*args, **kw): | |
569 | pass |
|
566 | pass | |
@@ -592,8 +589,6 b' class IPShellGTK(threading.Thread):' | |||||
592 | def __init__(self,argv=None,user_ns=None,debug=1, |
|
589 | def __init__(self,argv=None,user_ns=None,debug=1, | |
593 | shell_class=MTInteractiveShell): |
|
590 | shell_class=MTInteractiveShell): | |
594 |
|
591 | |||
595 | import pygtk |
|
|||
596 | pygtk.require("2.0") |
|
|||
597 | import gtk |
|
592 | import gtk | |
598 |
|
593 | |||
599 | self.gtk = gtk |
|
594 | self.gtk = gtk |
@@ -6,7 +6,7 b' Requires Python 2.1 or newer.' | |||||
6 |
|
6 | |||
7 | This file contains all the classes and helper functions specific to IPython. |
|
7 | This file contains all the classes and helper functions specific to IPython. | |
8 |
|
8 | |||
9 |
$Id: iplib.py |
|
9 | $Id: iplib.py 802 2005-09-06 03:49:12Z fperez $ | |
10 | """ |
|
10 | """ | |
11 |
|
11 | |||
12 | #***************************************************************************** |
|
12 | #***************************************************************************** | |
@@ -590,7 +590,10 b' class InteractiveShell(code.InteractiveConsole, Logger, Magic):' | |||||
590 | self.input_hist = InputList(['\n']) |
|
590 | self.input_hist = InputList(['\n']) | |
591 |
|
591 | |||
592 | # list of visited directories |
|
592 | # list of visited directories | |
593 | self.dir_hist = [os.getcwd()] |
|
593 | try: | |
|
594 | self.dir_hist = [os.getcwd()] | |||
|
595 | except IOError, e: | |||
|
596 | self.dir_hist = [] | |||
594 |
|
597 | |||
595 | # dict of output history |
|
598 | # dict of output history | |
596 | self.output_hist = {} |
|
599 | self.output_hist = {} | |
@@ -600,11 +603,14 b' class InteractiveShell(code.InteractiveConsole, Logger, Magic):' | |||||
600 | # number of positional arguments of the alias. |
|
603 | # number of positional arguments of the alias. | |
601 | self.alias_table = {} |
|
604 | self.alias_table = {} | |
602 |
|
605 | |||
603 |
# dict of things NOT to alias (keywords |
|
606 | # dict of things NOT to alias (keywords, builtins and some special magics) | |
604 |
|
|
607 | no_alias = {} | |
605 | for key in keyword.kwlist: |
|
608 | no_alias_magics = ['cd','popd','pushd','dhist','alias','unalias'] | |
606 | self.no_alias[key] = 1 |
|
609 | for key in keyword.kwlist + no_alias_magics: | |
607 | self.no_alias.update(__builtin__.__dict__) |
|
610 | no_alias[key] = 1 | |
|
611 | no_alias.update(__builtin__.__dict__) | |||
|
612 | self.no_alias = no_alias | |||
|
613 | ||||
608 |
|
614 | |||
609 | # make global variables for user access to these |
|
615 | # make global variables for user access to these | |
610 | self.user_ns['_ih'] = self.input_hist |
|
616 | self.user_ns['_ih'] = self.input_hist | |
@@ -953,7 +959,7 b' class InteractiveShell(code.InteractiveConsole, Logger, Magic):' | |||||
953 | In particular, make sure no Python keywords/builtins are in it.""" |
|
959 | In particular, make sure no Python keywords/builtins are in it.""" | |
954 |
|
960 | |||
955 | no_alias = self.no_alias |
|
961 | no_alias = self.no_alias | |
956 |
for k in self.alias_table |
|
962 | for k in self.alias_table: | |
957 | if k in no_alias: |
|
963 | if k in no_alias: | |
958 | del self.alias_table[k] |
|
964 | del self.alias_table[k] | |
959 | if verbose: |
|
965 | if verbose: |
@@ -6,7 +6,7 b' Requires Python 2.1 or better.' | |||||
6 |
|
6 | |||
7 | This file contains the main make_IPython() starter function. |
|
7 | This file contains the main make_IPython() starter function. | |
8 |
|
8 | |||
9 |
$Id: ipmaker.py |
|
9 | $Id: ipmaker.py 802 2005-09-06 03:49:12Z fperez $""" | |
10 |
|
10 | |||
11 | #***************************************************************************** |
|
11 | #***************************************************************************** | |
12 | # Copyright (C) 2001-2004 Fernando Perez. <fperez@colorado.edu> |
|
12 | # Copyright (C) 2001-2004 Fernando Perez. <fperez@colorado.edu> | |
@@ -194,9 +194,9 b" object? -> Details about 'object'. ?object also works, ?? prints more." | |||||
194 | pdb = 0, |
|
194 | pdb = 0, | |
195 | pprint = 0, |
|
195 | pprint = 0, | |
196 | profile = '', |
|
196 | profile = '', | |
197 | prompt_in1 = 'In [\\#]:', |
|
197 | prompt_in1 = 'In [\\#]: ', | |
198 | prompt_in2 = ' .\\D.:', |
|
198 | prompt_in2 = ' .\\D.: ', | |
199 | prompt_out = 'Out[\\#]:', |
|
199 | prompt_out = 'Out[\\#]: ', | |
200 | prompts_pad_left = 1, |
|
200 | prompts_pad_left = 1, | |
201 | quick = 0, |
|
201 | quick = 0, | |
202 | readline = 1, |
|
202 | readline = 1, |
@@ -1,3 +1,16 b'' | |||||
|
1 | 2005-09-05 Fernando Perez <Fernando.Perez@colorado.edu> | |||
|
2 | ||||
|
3 | * IPython/Shell.py (hijack_gtk): remove pygtk.require("2.0") | |||
|
4 | calls. These were a leftover from the GTK 1.x days, and can cause | |||
|
5 | problems in certain cases (after a report by John Hunter). | |||
|
6 | ||||
|
7 | * IPython/iplib.py (InteractiveShell.__init__): Trap exception if | |||
|
8 | os.getcwd() fails at init time. Thanks to patch from David Remahl | |||
|
9 | <chmod007 AT mac.com>. | |||
|
10 | (InteractiveShell.__init__): prevent certain special magics from | |||
|
11 | being shadowed by aliases. Closes | |||
|
12 | http://www.scipy.net/roundup/ipython/issue41. | |||
|
13 | ||||
1 | 2005-08-31 Fernando Perez <Fernando.Perez@colorado.edu> |
|
14 | 2005-08-31 Fernando Perez <Fernando.Perez@colorado.edu> | |
2 |
|
15 | |||
3 | * IPython/iplib.py (InteractiveShell.complete): Added new |
|
16 | * IPython/iplib.py (InteractiveShell.complete): Added new |
General Comments 0
You need to be logged in to leave comments.
Login now