6 ms·
At least you didn't try to do that in bash! ;) One suggestion though: If there are no command line parameters, then read a line from stdin, so you don't have t
by SimHacker 13y ago
At least you didn't try to do that in bash! ;)
One suggestion though: If there are no command line parameters, then read a line from stdin, so you don't have to play the game of trying to properly escape all of your punctuation in the command line to get it into sys.argv[1:] without any corruption, and can just copy and paste it into stdin.
Hmm, that raises the question of what should happen if you pipe an entire shell script into it, like "./configure"? That might be considered a denial of service attack on explainshell.com.
- tlrobinson 13y agoI've definitely written a URL escaping routine in bash before :)