A Python String Replace Problem - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32) +--- Forum: Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=26) +--- Thread: A Python String Replace Problem (/showthread.php?tid=65220) |
A Python String Replace Problem - Googler - 2009-12-28 I use Python urllib.urlopen, and get the following web page code: Code: http:\u002F\u002Fm.wsj.net\u002Fvideo\u002F20091222\u002F122209ghosnturn\u00 I tried Code: str.replace("\u002F", "/")#Failed Thanks a lot! - Dan Dare - 2009-12-28 Try: PHP Code: str = u"http:\u002F\u002Fm.wsj.net\u002Fvideo\u002F20091222\u002F122209ghosnturn\u002F122209ghosnturn_512x288.jpg" |