snipy/packageutil.py
def append_this_package_path(depth=1):
    """
    this_package.py 에서 사용
    import snipy.this_package
    """
    from .caller import caller

    logg.debug('caller module %s', caller.modulename(depth + 1))
    c = caller.abspath(depth + 1)
    logg.debug('caller path %s', c)

    p = guess_package_path(dirname(c))
    if p:
        logg.debug('appending sys path %s', p)
        append_sys_path(p)
    else:
        # do some logging
        logg.debug('failed to guess package path for: %s', c)
def append_this_package_path(depth=1):
    """
    this_package.py 에서 사용
    import snipy.this_package
    """
    from .caller import caller

    logg.debug('caller module %s', caller.modulename(depth + 1))
    c = caller.abspath(depth + 1)
    logg.debug('caller path %s', c)

    p = guess_package_path(dirname(c))
    if p:
        logg.debug('appending sys path %s', p)
        append_sys_path(p)
    else:
        # do some logging
        logg.debug('failed to guess package path for: %s', c)
this_package.py 에서 사용
    import snipy.this_package