]> arthur.barton.de Git - bup.git/blob - lib/bup/path.py
Use absolute_import from the __future__ everywhere
[bup.git] / lib / bup / path.py
1 """This is a separate module so we can cleanly getcwd() before anyone
2    does chdir().
3 """
4
5 from __future__ import absolute_import
6 import sys, os
7
8 startdir = os.getcwd()
9
10 def exe():
11     return (os.environ.get('BUP_MAIN_EXE') or
12             os.path.join(startdir, sys.argv[0]))
13
14 def exedir():
15     return os.path.split(exe())[0]
16
17 def exefile():
18     return os.path.split(exe())[1]