Popular recipes tagged "oneliner"http://code.activestate.com/recipes/tags/oneliner/2012-10-01T17:16:27-07:00ActiveState Code RecipesGet MAC address of current interface in one line of code (Python) 2012-10-01T17:16:27-07:00Leonid Vasilyevhttp://code.activestate.com/recipes/users/4183776/http://code.activestate.com/recipes/578277-get-mac-address-of-current-interface-in-one-line-o/ <p style="color: grey"> Python recipe 578277 by <a href="/recipes/users/4183776/">Leonid Vasilyev</a> (<a href="/recipes/tags/networking/">networking</a>, <a href="/recipes/tags/oneliner/">oneliner</a>). Revision 2. </p> <p>uuid.getnode represents current mac address as an integer, this one-liner formats this number in a standard mac adress form (i.e. bytes splitted by :)</p> Pyliner - Script to run arbitrary Python code on the command line (Python) 2011-07-29T13:22:54-07:00Drew Gulinohttp://code.activestate.com/recipes/users/4119417/http://code.activestate.com/recipes/577075-pyliner-script-to-run-arbitrary-python-code-on-the/ <p style="color: grey"> Python recipe 577075 by <a href="/recipes/users/4119417/">Drew Gulino</a> (<a href="/recipes/tags/awk/">awk</a>, <a href="/recipes/tags/oneliner/">oneliner</a>, <a href="/recipes/tags/perl/">perl</a>, <a href="/recipes/tags/pipe/">pipe</a>, <a href="/recipes/tags/python/">python</a>, <a href="/recipes/tags/sed/">sed</a>, <a href="/recipes/tags/sysadmin/">sysadmin</a>). </p> <p>A Python script that runs arbitrary Python scripts in an input loop. This allows one-liner Python scripts similarly to how Perl runs them (-l,-a,-n,-F, BEGIN, END)</p> <p>It provides additional syntax that allows multiline Python scripts to be run on a single line</p>