Using the tempfile module to get temporary files
Courtesy of Planet Python , I stumbledover Peter Bengtsson's puzzlement with Python's tempfile module ,especially the mkstemp() function. It's an understandablepuzzlement, because what's going on is fairly tied to Unix semantics(although Python supports mkstemp() on all platforms).
The tempfile module's mkstemp() is a relatively thin shim over theUnix mkstemp(3) library routine, which exists to securely createtemporary files. This is more difficult than it looks; there are all
睏(擬周私鐘)
有心有力做好事
The id attribute considered dangerous
I've been doing various overhauls of DWiki recently (a faster andbetter DWikiText to HTML renderer written by Daniel Martin (and hackedby me, so blame me for any problems) went in tonight, for example).As part of this, I've been looking at the HTML DWiki generates,running it past HTML Tidy and the W3C validator and so on. It's been a learningexperience.
One of the things I've learned is that almost everywhere DWiki codeand templates were
討厭石仔路
健 身
$PATH in Solaris
It's always the little things about new Unix systems that get to me.Take $PATH on Solaris.
On a modern Linux distribution with a stock install, a sysadmin's full$PATH needs only five directories:
/bin /usr/bin /sbin /usr/sbin /usr/X11R6/bin
(Sometimes /usr/bin/X11 is used instead of /usr/X11R6/bin .)
On Solaris 9, my $PATH is
暫休小記
儘管全片節奏明顯有點怪異,《情義我心知》一開始黎明由被兄嫂嫌棄的冷漠現實,轉入《天鵝湖》芭蕾舞台的美麗想像,那一段堪稱流麗。
2.孤草寫麥o麥,總是好看。
然後天上綻放煙花,春田花花幼稚