-import types, re, os
+import types
+import re
+import os
import sys
import locale
import codecs
+try:
+ StringTypes = types.StringTypes
+except AttributeError:
+ StringTypes = [str]
+
def encoder(text, _encoding_):
return codecs.encode(text, _encoding_, 'replace')
'''
pathname = ''
- if type(path_elements) in types.StringTypes:
+ if type(path_elements) in StringTypes:
path_elements = [path_elements]
# Concatenate elements and seperate with /