# -*- coding: utf-8 -*- # vim: et sw=4 fenc=utf-8: # This file is part of App. # Copyright (C) 2009 by Homin Lee <ff4500@gmail.com> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version.
>>> import random >>> (lambda a:random.shuffle(a) or a[:6])(range(1, 46))
socket.gethostbyname(socket.getfqdn()) socket.gethostbyname_ex(socket.gethostname())[2]
sudo apt-get install python-netifaces