My mistake, not knowing python's variable interpoltion well, I thought that the $0 was expanded by it, not the shell. Which, if it were the case, would indeed be vulnerable.
Isn't it a bit harsh to downvote to -1 a comment which links to two completly on-topic libraries?
Re:Shelling Out Sucks
by NinetyNine on Monday March 12, 2012 @04:11AM
(#3692701)
Your comment would be correct if it were PHP.
Not true.
If you were right, there would be no reasonable way to write shell scripts.