dabo Commit
Revision 2492
Date: 2006-11-24 13:54:01 -0800 (Fri, 24 Nov 2006)
Author: ed

Changed:
U   branches/stable/dabo/ui/uiwx/__init__.py

Log:
Enhanced the getImagePath() function to work better with Windows pathing.

Diff:
Modified: branches/stable/dabo/ui/uiwx/__init__.py
===================================================================
--- branches/stable/dabo/ui/uiwx/__init__.py    2006-11-24 21:30:24 UTC (rev 
2491)
+++ branches/stable/dabo/ui/uiwx/__init__.py    2006-11-24 21:54:01 UTC (rev 
2492)
@@ -1,6 +1,8 @@
 import sys
 import os
+import re
 import glob
+import urllib
 import datetime
 import time
 import cStringIO
@@ -1118,7 +1120,11 @@
                        except IndexError:
                                pass
        if ret and url:
-               ret = "file://%s" % ret
+               if wx.Platform == "__WXMSW__":
+                       ret = "file:%s" % urllib.pathname2url(ret).replace("|", 
":")
+                       ret = re.sub(r"([A-Z])\|/", r"\1/", ret, re.I)
+               else:
+                       ret = "file://%s" % ret
        return ret
                
 




_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev

Reply via email to