Live data from Hacker News

Show HN: Pythonpy – the swiss army knife of the command line

github.com

1–10 of 45 posts

Re: Show HN: Pythonpy – the swiss army knife of the command line

#4
ls | py -x '"mv %s %s.txt" % (x,x)' | sh has me worried, I can't find the escape code directly. Also you might wish to offer the following api ls | py -X '["mv","%s","%s.txt"] and run those using processes or sub-process. This would ensure the right argument in the right place. Just an idea.

Re: Show HN: Pythonpy – the swiss army knife of the command line

#7
You should put up a donation link. If more people do that and it becomes common practice to donate to useful open source tools / projects then imagine what more awesome stuff could be created. Many people desire to build tools but don't have the financial support to do so.

Re: Show HN: Pythonpy – the swiss army knife of the command line

#10

ls | py -x '"mv %s %s.txt" % (x,x)' | sh has me worried, I can't find the escape code directly. Also you might wish to offer the following api ls | py -X '["mv","%s","%s.txt"] and run those using processes or sub-process. This would ensure the right argument in the right place. Just an idea.

Of course for this case, using shutil (or something similar) would be preferable. Eg ls | py -x "shutil.move(x, "%s.txt" % x)"
Post reply on HN