[LUGOS] URL encode

Jure Koren idiots at gmail.com
Fri Jul 2 15:06:47 CEST 2004


On Fri, 2 Jul 2004 14:36:19 +0200, Stojan Rancic <stojan at aufbix.org> wrote:
> Zadeva je pretezno trivialna v kakem perlu ali PHP-ju: http://www.cs.wcupa.edu/~rkline/perl2php/#urlenc

no, se python...

#!/usr/bin/env python
import urllib, sys
print urllib.quote(' '.join(sys.argv[1:]))

in potem to lahko uporabis v shell skripti

echo original: $f, escaped: `escape.py "$f"`



More information about the lugos-list mailing list