From mboxrd@z Thu Jan 1 00:00:00 1970 Mime-Version: 1.0 (Apple Message framework v482) Content-Type: text/plain; charset=US-ASCII; format=flowed From: Moroo Jun To: 9fans@cse.psu.edu Content-Transfer-Encoding: 7bit Message-Id: <10BD2481-41F5-11D7-9B7A-0050E4504768@nifty.com> Subject: [9fans] webfs from Python Date: Mon, 17 Feb 2003 06:24:43 +0900 Topicbox-Message-UUID: 63ac1dea-eacb-11e9-9e20-41e7f4b1d025 I tried to use webfs from Python. I wrote a little test script and try to get web page, but fail. Any suggestions? cpu% cat web.py 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"),"rw") ctlfd.write("url http://www.example.com/index.html") bodyfd=open(os.path.join(base,"body"),"r") t=bodyfd.read(), print t web.close() cpu% python web.py Traceback (most recent call last): File w.py:9, in ? bodyfd=open(os.path.join(base,"body"),"r") IOError: [Errno 0] url is not yet set: '/mnt/web/0/body'