On Mon, Dec 16, 2013 at 1:43 PM, Igor Korot <ikoro...@gmail.com> wrote: > So, how do I convert my string to one of those? > I realized I can just do replace '/' to '\', but is there a better > alternative?
The path is exactly the same, whether you use forward slashes or backslashes, on Windows. Most of the world uses backslashes for Windows paths, but forward slashes do work fine (and that's not a Python thing - the underlying APIs work with / just fine too). So you don't have to actually replace anything. >>> len(open("c:/Festival2013.txt").read()) 79137 ChrisA -- https://mail.python.org/mailman/listinfo/python-list