##// END OF EJS Templates
Merging Fernando's fixes from his trunk-dev and fixing testing things....
Merging Fernando's fixes from his trunk-dev and fixing testing things. I have merged his changes with a few modifications. I have also removed IPython.kernel from the list of packages that nose will test.

File last commit:

r1608:387274eb
r1973:5d4c3105 merge
Show More
cutils.py
34 lines | 1.1 KiB | text/x-python | PythonLexer
# encoding: utf-8
"""Configuration-related utilities for all IPython."""
__docformat__ = "restructuredtext en"
#-------------------------------------------------------------------------------
# Copyright (C) 2008 The IPython Development Team
#
# Distributed under the terms of the BSD License. The full license is in
# the file COPYING, distributed as part of this software.
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
# Imports
#-------------------------------------------------------------------------------
import os
import sys
#---------------------------------------------------------------------------
# Normal code begins
#---------------------------------------------------------------------------
def import_item(key):
"""
Import and return bar given the string foo.bar.
"""
package = '.'.join(key.split('.')[0:-1])
obj = key.split('.')[-1]
execString = 'from %s import %s' % (package, obj)
exec execString
exec 'temp = %s' % obj
return temp