#5525 NORM Never A: importing ipython slows activity startup too much
Zarro Boogs per Child
bugtracker at laptop.org
Mon Dec 17 05:30:58 EST 2007
#5525: importing ipython slows activity startup too much
-------------------------------+--------------------------------------------
Reporter: tomeu | Owner: tomeu
Type: defect | Status: new
Priority: normal | Milestone: Never Assigned
Component: sugar | Version:
Keywords: Update.1? review? | Verified: 0
-------------------------------+--------------------------------------------
See #5228 for more details.
This patch enables ipython only when we run in the debug level:
{{{
diff --git a/src/sugar/logger.py b/src/sugar/logger.py
index 2ad31d7..7730a94 100644
--- a/src/sugar/logger.py
+++ b/src/sugar/logger.py
@@ -51,9 +51,11 @@ def start(log_filename=None):
os.dup2(log_file.fileno(), sys.stdout.fileno())
os.dup2(log_file.fileno(), sys.stderr.fileno())
- # Attempt to provide verbose IPython tracebacks.
- try:
- from IPython.ultraTB import AutoFormattedTB
- sys.excepthook = AutoFormattedTB(mode='Verbose',
color_scheme='NoColor')
- except ImportError:
- pass
+ if os.environ.get('SUGAR_LOGGER_LEVEL', None) == 'debug':
+ # Attempt to provide verbose IPython tracebacks.
+ try:
+ from IPython.ultraTB import AutoFormattedTB
+ sys.excepthook = AutoFormattedTB(mode='Verbose',
color_scheme='NoColor')
+ except ImportError:
+ pass
+
}}}
--
Ticket URL: <http://dev.laptop.org/ticket/5525>
One Laptop Per Child <http://dev.laptop.org>
OLPC bug tracking system
More information about the Bugs
mailing list