can be used to locate the share files that are holding the encoded+encrypted
data for this file.
-"tahoe repl" will launch an interactive python interpreter in which the Tahoe
-packages and modules are available on sys.path (e.g. by using 'import
+"tahoe debug repl" will launch an interactive python interpreter in which the
+Tahoe packages and modules are available on sys.path (e.g. by using 'import
allmydata'). This is most useful from a source tree: it simply sets the
PYTHONPATH correctly and runs the 'python' executable.
longdesc = """Opens a webbrowser to the contents of some portion of the virtual drive."""
-class ReplOptions(usage.Options):
- pass
-
subCommands = [
["mkdir", None, MakeDirectoryOptions, "Create a new directory"],
["add-alias", None, AddAliasOptions, "Add a new alias cap"],
["mv", None, MvOptions, "Move a file within the virtual drive."],
["ln", None, LnOptions, "Make an additional link to an existing file."],
["webopen", None, WebopenOptions, "Open a webbrowser to the root_dir"],
- ["repl", None, ReplOptions, "Open a python interpreter"],
]
def mkdir(options):
opener(url)
return 0
-def repl(options):
- import code
- return code.interact()
-
dispatch = {
"mkdir": mkdir,
"add-alias": add_alias,
"mv": mv,
"ln": ln,
"webopen": webopen,
- "repl": repl,
}
return 0
+class ReplOptions(usage.Options):
+ pass
+
+def repl(options, out=sys.stdout, err=sys.stderr):
+ import code
+ return code.interact()
+
+
class DebugCommand(usage.Options):
subCommands = [
["dump-share", None, DumpOptions,
["dump-cap", None, DumpCapOptions, "Unpack a read-cap or write-cap"],
["find-shares", None, FindSharesOptions, "Locate sharefiles in node dirs"],
["catalog-shares", None, CatalogSharesOptions, "Describe shares in node dirs"],
+ ["repl", None, ReplOptions, "Open a python interpreter"],
]
def postOptions(self):
if not hasattr(self, 'subOptions'):
"dump-cap": dump_cap,
"find-shares": find_shares,
"catalog-shares": catalog_shares,
+ "repl": repl,
}