On Wed, Mar 25, 2009 at 5:19 PM, Noufal Ibrahim <[email protected]> wrote: > I found this via. hacker news. > http://commandlinefu.com/ > > It's a repository of command line tricks. > > I found a python one > python -m SimpleHTTPServer > > which serves the current directory on port 8000 > > I've not really seen many python one liners. The language culture and > the indentation requirement discourage that kind of thing I imagine.
Really ? FYI, Python is full of one-liners both of the command-line variety and the code variety. Here is one which works as a miniature wget using urllib. $ python -m urllib <url> > <file> For example, to save http://www.python.org to a local file, python -m urllib http://www.python.org > python.html > > > -- > ~noufal > _______________________________________________ > BangPypers mailing list > [email protected] > http://mail.python.org/mailman/listinfo/bangpypers > -- -Anand _______________________________________________ BangPypers mailing list [email protected] http://mail.python.org/mailman/listinfo/bangpypers
