About

By m0j0, January 17, 2006 2:31 am

I am a random anonymous geek whose opinion about any given thing at any given time probably doesn’t mean a whole heckuva lot to anyone in particular. That said, occasionally I can’t help myself and need to spew unassorted thoughts out into the ether. I’m sorry if you came across any of them.

2 Responses to “About”

  1. Vince says:

    Hello,
    You commented that you were putting a class of python one liners in the page:
    http://www.protocolostomy.com/2008/07/16/show-me-your-python-sysadmin-one-liners/comment-page-1/#comment-21721

    Is there any chance to see what you have found.

    Regards, Vince

  2. m0j0 says:

    Hi,

    What I found is that one-liners are not the way to go with Python. I did find one or two examples that people showed me, but they weren’t anything I would ever recommend doing. Just because you can do it doesn’t mean you shouldn’t. The only good purpose served by this article is that it apparently disproved something someone wrote in some python book. I got some feedback saying that “this book said you can’t do one-liners in Python”. That’s provably false:

    python -c “from sys import platform; print platform”

    That said, I did find doing one-liners in Python to be not only cumbersome, but unpythonic anyway.

Leave a Reply

Panorama Theme by Themocracy