from helium.bfs10063.path import bfs11373
from logging import FileHandler
from os.path import dirname, join, expanduser
class FileHandlerRelativeToPackageOrUserDir(FileHandler):
  def __init__(self, bfs11375, bfs11376, mode='a'):
    if (bfs11375 == '~'):
      bfs11377 = join(expanduser(bfs11375), *bfs11376)
      bfs11373(dirname(bfs11377))
      FileHandler.__init__(self, bfs11377, mode=mode)
    else:
      bfs11401 = dirname(__import__(bfs11375).__file__)
      FileHandler.__init__(self, join(bfs11401, *bfs11376), mode=mode)



