import os

import IPython.ipapi
ip = IPython.ipapi.get()

# some config helper functions you can use 
def import_mod(modules):
	""" Usage: import_mod("os sys") """ 
	for m in modules.split():
		ip.ex("import %s" % m)
		
def import_all(modules):
	""" Usage: import_all("os sys") """ 
	for m in modules.split():
		ip.ex("from %s import *" % m)
		
def import_some(module,things):
	'''Usage: import_some('path','makepath path')'''
	for thing in things.split():
		ip.ex('from %s import %s' % (module,thing))

def execf(fname):
	""" Execute a file in user namespace """
	ip.ex('execfile("%s")' % os.path.expanduser(fname))


"""Some config helper functions you can use"""
import os

import IPython.ipapi
ip = IPython.ipapi.get()

def import_mod(modules):
	""" Usage: import_mod("os sys") """ 
	for m in modules.split():
		ip.ex("import %s" % m)
		
def import_all(modules):
	""" Usage: import_all("os sys") """ 
	for m in modules.split():
		ip.ex("from %s import *" % m)
		
def import_some(module,things):
	"""Usage: import_some('path','path')"""
	for thing in things.split():
		ip.ex('from %s import %s' % (module,thing))

def execf(fname):
	""" Execute a file in user namespace """
	ip.ex('execfile("%s")' % os.path.expanduser(fname))


Use triple quotes for docstrings
Use triple quotes for docstrings

git-svn-id: 71e07130022bd36facd9e5e4cff6aac120a9d616@756 f6a8b572-8bf8-43d5-8295-329fc01c5294
