[wellylug] If you are stuck for ideas for a lightning talk session
Pedro Worcel
pedro at worcel.com
Thu Feb 13 10:48:33 NZDT 2014
THAT IS HUGE! http://apt.alioth.debian.org/python-apt-doc/library/
never knew
2014-02-13 9:30 GMT+12:00 Douglas Bagnall <douglas at halo.gen.nz>:
> And if you don't like pipes:
>
> python -c'import random,apt;print random.choice(apt.cache.Cache().keys())'
>
> It even ends up shorter than the original perl:
>
> > dpkg --get-selections | perl -E '@p = map { s/\s.*//r } <>; say
> $p[rand(+ at p)]'
>
> Douglas
>
>
> --
> Wellington Linux Users Group Mailing List: wellylug at lists.wellylug.org.nz
> To Leave: http://lists.wellylug.org.nz/mailman/listinfo/wellylug
>
--
GPG: http://is.gd/droope <http://is.gd/signature_>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wellylug.org.nz/pipermail/wellylug/attachments/20140213/151c1bad/attachment.html>
More information about the wellylug
mailing list