def grab_from_import(module, as_from=False):
    """ Used to import a object, class, etc. from a Python module. 
    
        Should be used when you want to do the equivilent of
         
            from mymodule import someclass
        
        So you would pass in as the "module" variable:
        
            grab_from_import('mymodule.someclass', as_from=True)
        
        If you simply wanted to do the following:
        
            import mymodule.someclass
        
        You just pass in:
        
            grab_from_import('mymodule.someclass')
        
        The 'default_module' variable will be returned if the 
    """
    if not as_from:
        return __import__(module, globals(), locals(), [], -1)
    else:
        _pieces = module.split('.')
        _module = '.'.join(_pieces[:-1])
        _obj = _pieces[-1]
        _temp = __import__(_module, globals(), locals(), [_obj], -1)
        return getattr(_temp, _obj)
