##// END OF EJS Templates
ipythonrc-PROF now take precedence over ipy_profile_PROF.py
vivainio -
Show More
@@ -1,7 +1,7 b''
1 # -*- coding: utf-8 -*-
1 # -*- coding: utf-8 -*-
2 """Magic functions for InteractiveShell.
2 """Magic functions for InteractiveShell.
3
3
4 $Id: Magic.py 2637 2007-08-17 16:18:05Z vivainio $"""
4 $Id: Magic.py 2649 2007-08-21 18:19:20Z vivainio $"""
5
5
6 #*****************************************************************************
6 #*****************************************************************************
7 # Copyright (C) 2001 Janko Hauser <jhauser@zscout.de> and
7 # Copyright (C) 2001 Janko Hauser <jhauser@zscout.de> and
@@ -2137,7 +2137,11 b' Currently the magic system has the following functions:\\n"""'
2137 if not new_scheme:
2137 if not new_scheme:
2138 print 'You must specify a color scheme.'
2138 print 'You must specify a color scheme.'
2139 return
2139 return
2140 # local shortcut
2141 shell = self.shell
2142
2140 import IPython.rlineimpl as readline
2143 import IPython.rlineimpl as readline
2144
2141 if not readline.have_readline and sys.platform == "win32":
2145 if not readline.have_readline and sys.platform == "win32":
2142 msg = """\
2146 msg = """\
2143 Proper color support under MS Windows requires the pyreadline library.
2147 Proper color support under MS Windows requires the pyreadline library.
@@ -2150,9 +2154,11 b' http://starship.python.net/crew/theller/ctypes'
2150 Defaulting color scheme to 'NoColor'"""
2154 Defaulting color scheme to 'NoColor'"""
2151 new_scheme = 'NoColor'
2155 new_scheme = 'NoColor'
2152 warn(msg)
2156 warn(msg)
2153 # local shortcut
2154 shell = self.shell
2155
2157
2158 # readline option is 0
2159 if not shell.has_readline:
2160 new_scheme = 'NoColor'
2161
2156 # Set prompt colors
2162 # Set prompt colors
2157 try:
2163 try:
2158 shell.outputcache.set_colors(new_scheme)
2164 shell.outputcache.set_colors(new_scheme)
@@ -1,7 +1,7 b''
1 # -*- coding: utf-8 -*-
1 # -*- coding: utf-8 -*-
2 """Release data for the IPython project.
2 """Release data for the IPython project.
3
3
4 $Id: Release.py 2607 2007-08-13 13:25:24Z fperez $"""
4 $Id: Release.py 2649 2007-08-21 18:19:20Z vivainio $"""
5
5
6 #*****************************************************************************
6 #*****************************************************************************
7 # Copyright (C) 2001-2006 Fernando Perez <fperez@colorado.edu>
7 # Copyright (C) 2001-2006 Fernando Perez <fperez@colorado.edu>
@@ -22,7 +22,7 b" name = 'ipython'"
22 # because bdist_rpm does not accept dashes (an RPM) convention, and
22 # because bdist_rpm does not accept dashes (an RPM) convention, and
23 # bdist_deb does not accept underscores (a Debian convention).
23 # bdist_deb does not accept underscores (a Debian convention).
24
24
25 revision = '2606'
25 revision = '2647M'
26
26
27 version = '0.8.2.svn.r' + revision.rstrip('M')
27 version = '0.8.2.svn.r' + revision.rstrip('M')
28
28
@@ -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 2587 2007-08-06 19:38:32Z vivainio $"""
9 $Id: ipmaker.py 2649 2007-08-21 18:19:20Z vivainio $"""
10
10
11 #*****************************************************************************
11 #*****************************************************************************
12 # Copyright (C) 2001-2006 Fernando Perez. <fperez@colorado.edu>
12 # Copyright (C) 2001-2006 Fernando Perez. <fperez@colorado.edu>
@@ -424,12 +424,14 b" object? -> Details about 'object'. ?object also works, ?? prints more."
424 % (opts_all.rcfile) )
424 % (opts_all.rcfile) )
425
425
426 # 'profiles' are a shorthand notation for config filenames
426 # 'profiles' are a shorthand notation for config filenames
427 profile_handled_by_legacy = False
427 if opts_all.profile:
428 if opts_all.profile:
428
429
429 try:
430 try:
430 opts_all.rcfile = filefind('ipythonrc-' + opts_all.profile
431 opts_all.rcfile = filefind('ipythonrc-' + opts_all.profile
431 + rc_suffix,
432 + rc_suffix,
432 opts_all.ipythondir)
433 opts_all.ipythondir)
434 profile_handled_by_legacy = True
433 except IOError:
435 except IOError:
434 if opts_all.debug: IP.InteractiveTB()
436 if opts_all.debug: IP.InteractiveTB()
435 opts.profile = '' # remove profile from options if invalid
437 opts.profile = '' # remove profile from options if invalid
@@ -624,7 +626,8 b" object? -> Details about 'object'. ?object also works, ?? prints more."
624 IP.InteractiveTB()
626 IP.InteractiveTB()
625 import_fail_info('ipy_system_conf')
627 import_fail_info('ipy_system_conf')
626
628
627 if opts_all.profile:
629 # only import prof module if ipythonrc-PROF was not found
630 if opts_all.profile and not profile_handled_by_legacy:
628 profmodname = 'ipy_profile_' + opts_all.profile
631 profmodname = 'ipy_profile_' + opts_all.profile
629 try:
632 try:
630 __import__(profmodname)
633 __import__(profmodname)
General Comments 0
You need to be logged in to leave comments. Login now