s/python2/python3/

This commit is contained in:
Julien Palard 2017-04-21 14:36:05 +02:00
parent 64b37f3324
commit 790435b0d3
1 changed files with 2 additions and 2 deletions

View File

@ -169,13 +169,13 @@ jsonpp()
urldecode()
{
input="$([ $# -gt 0 ] && printf "%s\n" "$*" || cat -)"
python -c "import urllib2, sys; print urllib2.unquote(sys.argv[1])" "$input"
python3 -c "import urllib.parse, sys; print(urllib.parse.unquote(sys.argv[1]))" "$input"
}
urlencode()
{
input="$([ $# -gt 0 ] && printf "%s\n" "$*" || cat -)"
python -c "import urllib2, sys; print urllib2.quote(sys.argv[1])" "$input"
python3 -c "import urllib.parse, sys; print(urllib.parse.quote(sys.argv[1]))" "$input"
}
# Removes *~ and #*# files in curent folder, for a depth limited to 3 folders.