Many of the methods on
http://docs.python.org/lib/module-os.path.html
don't work on win.  like samefile()

I found:

39      def samefile(path1, path2):
40          return getLongPathName(path1) == getLongPathName(path2)
41      
42      def getLongPathName(path):
43          buf = ctypes.create_unicode_buffer(260)
44          GetLongPathName = ctypes.windll.kernel32.GetLongPathNameW
45          rv = GetLongPathName(path, buf, 260)
46          if rv == 0 or rv > 260:
47              return path
48          else:
49              return buf.value

https://develop.participatoryculture.org/trac/democracy/browser/trunk/tv/platform/windows-xul/platformutils.py#L39

Would it make sense to add code like this to the standard module?

Carl K
_______________________________________________
python-win32 mailing list
python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32

Reply via email to