-#!/usr/bin/env python
import urllib
outf.close()
return 0
-
-
-def main():
- import optparse, re
- parser = optparse.OptionParser()
- parser.add_option("-u", "--nodeurl", dest="nodeurl")
- parser.add_option("-r", "--dir-cap", dest="rooturi")
-
- (options, args) = parser.parse_args()
-
- NODEURL_RE=re.compile("http://([^:]*)(:([1-9][0-9]*))?")
- if not isinstance(options.nodeurl, basestring) or not NODEURL_RE.match(options.nodeurl):
- raise ValueError("--node-url is required to be a string and look like \"http://HOSTNAMEORADDR:PORT\", not: %r" % (options.nodeurl,))
-
- if not options.rooturi:
- raise ValueError("must provide --dir-cap")
-
- vdrive_fname = args[0]
- local_file = None
- if len(args) > 1:
- local_file = args[1]
-
- get(options.nodeurl, options.rooturi, vdrive_fname, local_file)
-
-if __name__ == '__main__':
- main()
-#! /usr/bin/python
import urllib
import simplejson
print >>stdout, "%10s %s" % (size, name)
elif nodetype == "filenode":
print >>stdout, "%10s %s" % (d['size'], vdrive_pathname)
-
-
-
-def main():
- import optparse, re
- parser = optparse.OptionParser()
- parser.add_option("-u", "--node-url", dest="nodeurl")
- parser.add_option("-r", "--dir-cap", dest="rooturi")
-
- (options, args) = parser.parse_args()
-
- NODEURL_RE=re.compile("http://([^:]*)(:([1-9][0-9]*))?")
- if not isinstance(options.nodeurl, basestring) or not NODEURL_RE.match(options.nodeurl):
- raise ValueError("--node-url is required to be a string and look like \"http://HOSTNAMEORADDR:PORT\", not: %r" % (options.nodeurl,))
-
- if not options.rooturi:
- raise ValueError("must provide --dir-cap")
-
- vdrive_pathname = ""
- if args:
- vdrive_pathname = args[0]
-
- list(options.nodeurl, options.rooturi, vdrive_pathname)
-
-if __name__ == '__main__':
- main()
-#! /usr/bin/python
import re
import urllib
-#!/usr/bin/env python
import urllib
from allmydata.scripts.common_http import do_http
print >>stderr, "error, got %s %s" % (resp.status, resp.reason)
print >>stderr, resp.read()
return 1
-
-def main():
- import optparse, re
- parser = optparse.OptionParser()
- parser.add_option("-u", "--node-url", dest="nodeurl")
- parser.add_option("-r", "--dir-cap", dest="rooturi")
-
- (options, args) = parser.parse_args()
-
- NODEURL_RE=re.compile("http://([^:]*)(:([1-9][0-9]*))?")
- if not isinstance(options.nodeurl, basestring) or not NODEURL_RE.match(options.nodeurl):
- raise ValueError("--node-url is required to be a string and look like \"http://HOSTNAMEORADDR:PORT\", not: %r" % (options.nodeurl,))
-
- if not options.rooturi:
- raise ValueError("must provide --dir-cap")
-
- local_file = args[0]
- vdrive_fname = None
- if len(args) > 1:
- vdrive_fname = args[1]
-
- return put(options.nodeurl, options.rooturi, vdrive_fname, local_file)
-
-if __name__ == '__main__':
- main()
-#!/usr/bin/env python
import urllib
from allmydata.scripts.common_http import do_http
print >>stderr, "error, got %s %s" % (resp.status, resp.reason)
print >>stderr, resp.read()
return 1
-
-def main():
- import optparse, re
- parser = optparse.OptionParser()
- parser.add_option("-u", "--node-url", dest="nodeurl")
- parser.add_option("-r", "--dir-cap", dest="rooturi")
-
- (options, args) = parser.parse_args()
-
- NODEURL_RE=re.compile("http://([^:]*)(:([1-9][0-9]*))?")
- if not isinstance(options.nodeurl, basestring) or not NODEURL_RE.match(options.nodeurl):
- raise ValueError("--node-url is required to be a string and look like \"http://HOSTNAMEORADDR:PORT\", not: %r" % (options.nodeurl,))
-
- if not options.rooturi:
- raise ValueError("must provide --dir-cap")
-
- vdrive_pathname = args[0]
-
- return rm(options.nodeurl, options.rooturi, vdrive_pathname, 0)
-
-if __name__ == '__main__':
- main()