User Tools

Site Tools


python

문서화

# -*- 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

references

python.txt · Last modified: 2013/08/03 05:04 (external edit)