def smart_path(string):
 if os.path.supports_unicode_filenames:
  return smart_unicode(string)
 return smart_str(string)

def smart_path ( string ) : if os . path . supports_unicode_filenames : return smart_unicode ( string ) return smart_str ( string )
returns a string you can pass to path .