2013-08-01から1ヶ月間の記事一覧

FizzBuzzその3

[b==c=='' and a or b+c for a, b, c in reduce(lambda x, i: x+zip(range(1+15*i, 16+15*i), (['']*2+['Fizz'])*5, (['']*4+['Buzz'])*3), range(999), [])][:100]

PythonからWindows Spoolerをctypesで叩く

#!/usr/bin/env python # -*- coding:utf-8 -*- """\ Utility class for wrapping Winspool.drv with ctypes. GetPrinter function http://msdn.microsoft.com/en-us/library/windows/desktop/dd144911(v=vs.85).aspx PRINTER_INFO_1 structure http://msdn.…