From mboxrd@z Thu Jan 1 00:00:00 1970 Subject: Re: [9fans] webfs from Python Content-Type: text/plain; charset=US-ASCII; format=flowed Mime-Version: 1.0 (Apple Message framework v482) From: Moroo Jun To: 9fans@cse.psu.edu Content-Transfer-Encoding: 7bit In-Reply-To: <4b948f68f42f405da66ebecd9116d2b2@plan9.bell-labs.com> Message-Id: Date: Tue, 18 Feb 2003 00:08:48 +0900 Topicbox-Message-UUID: 65093a24-eacb-11e9-9e20-41e7f4b1d025 On 2003.02.17, at 06:20, Russ Cox wrote: > perhaps you have to ctlfd.flush() Thank you for advice. This script get web page fine. webfs looks nice. import os web = open("/mnt/web/clone","rw") t=web.readlines() id=int(t[0]) base=os.path.join("/mnt/web/%d" % id) ctlfd=open(os.path.join(base,"ctl"),"w") ctlfd.write("url http://www.moroo.com/index.html") ctlfd.flush() bodyfd=open(os.path.join(base,"body"),"r") t=bodyfd.read(), print t web.close()