[Tahoe-dev] tahoe-cat.py

Zooko O'Whielacronx zooko at zooko.com
Tue Jul 10 00:52:52 UTC 2007

Dear People of tahoe-dev:

Now that Brian has nailed ticket #48 (API), we're working on ticket  
#53 (CLI).  (By the way, Amber and I flew to San Francisco yesterday  
and we're working at Allmydata HQ.)

The API is defined in docs/webapi.txt [1].

Here is the first command-line tool for tahoe, "tahoe-cat.py".  When  
you run you pass a file name as its only argument, and it reads that  
file from a tahoe grid and writes the file contents to stdout.   
(Which grid it uses is currently hardcoded.)

------- begin included file "tahoe-cat.py"
#!/usr/bin/env python

import sys, urllib

def GET(url):
     f = urllib.urlopen(url)

vfname = sys.argv[1]

base = "http://tahoebs1.allmydata.com:8011/"
base += "vdrive/global/"
url = base + vfname

------- end included file "tahoe-cat.py"



[1] http://allmydata.org/trac/tahoe/browser/docs/webapi.txt

tickets mentioned in this letter:


More information about the tahoe-dev mailing list