[plug] [OT] python and spaces in path strings
Russell Steicke
r.steicke at bom.gov.au
Wed Dec 22 11:00:22 WST 2004
On Wed, Dec 22, 2004 at 10:53:55AM +0800, rpowersau at gmail.com wrote:
...
> If I enter a path on the command line, and the path has spaces, when
> that path gets sent to the remote site I get a 404 error. But if I
> type in %20 instead of spaces it works. Not that bad except I'm using
> that path to create a local directory. If I type in %20 then the local
> directory becomes "firstname%20lastname" instead of "firstname
> lastname".
You want urllib.pathname2url(path) and urllib.url2pathname(path).
--
Russell Steicke
-- Fortune says:
This is an unauthorized cybernetic announcement.
More information about the plug
mailing list