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



