from helium.bfs10063.path import bfs11402
from logging import FileHandler
from os.path import dirname, join, expanduser
class FileHandlerRelativeToPackageOrUserDir(FileHandler):
  def __init__(self, bfs11403, bfs11405, mode='a'):
    if (bfs11403 == '~'):
      bfs11404 = join(expanduser(bfs11403), *bfs11405)
      bfs11402(dirname(bfs11404))
      FileHandler.__init__(self, bfs11404, mode=mode)
    else:
      bfs11406 = dirname(__import__(bfs11403).__file__)
      FileHandler.__init__(self, join(bfs11406, *bfs11405), mode=mode)



