util/paths.py
branchpython3
changeset 3752 9f6f46dbe3ae
parent 3750 f62625418bff
child 3760 7270e7e092f8
equal deleted inserted replaced
3751:a80a66ba52d6 3752:9f6f46dbe3ae
    21 # You should have received a copy of the GNU General Public License
    21 # You should have received a copy of the GNU General Public License
    22 # along with this program; if not, write to the Free Software
    22 # along with this program; if not, write to the Free Software
    23 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
    23 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
    24 
    24 
    25 
    25 
    26 
       
    27 import os
    26 import os
    28 import sys
    27 import sys
    29 from builtins import str as text
       
    30 
    28 
    31 def AbsFile(file):
    29 def AbsFile(file):
    32     if isinstance(file, str):
    30     if isinstance(file, str):
    33         file = text(file, sys.getfilesystemencoding())
    31         file = str(file, sys.getfilesystemencoding())
    34     return file
    32     return file
    35 
    33 
    36 
    34 
    37 def AbsDir(file):
    35 def AbsDir(file):
    38     file = AbsFile(file)
    36     file = AbsFile(file)