mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2024-12-30 01:38:55 +00:00
added a 'repl' command to tahoe.exe
this is probably not of very high utility in the unix case of bin/tahoe but is useful when working with native builds, e.g. py2exe's tahoe.exe, to examine and debug the runtime environment, linking problems etc.
This commit is contained in:
parent
33715f3ba3
commit
08f445a562
@ -120,6 +120,9 @@ class WebopenOptions(VDriveOptions):
|
||||
|
||||
longdesc = """Opens a webbrowser to the contents of some portion of the virtual drive."""
|
||||
|
||||
class ReplOptions(usage.Options):
|
||||
pass
|
||||
|
||||
subCommands = [
|
||||
["ls", None, ListOptions, "List a directory"],
|
||||
["get", None, GetOptions, "Retrieve a file from the virtual drive."],
|
||||
@ -127,6 +130,7 @@ subCommands = [
|
||||
["rm", None, RmOptions, "Unlink a file or directory in the virtual drive."],
|
||||
["mv", None, MvOptions, "Move a file within the virtual drive."],
|
||||
["webopen", None, WebopenOptions, "Open a webbrowser to the root_dir"],
|
||||
["repl", None, ReplOptions, "Open a python interpreter"],
|
||||
]
|
||||
|
||||
def list(config, stdout, stderr):
|
||||
@ -209,6 +213,10 @@ def webopen(config, stdout, stderr):
|
||||
webbrowser.open(url)
|
||||
return 0
|
||||
|
||||
def repl(config, stdout, stderr):
|
||||
import code
|
||||
return code.interact()
|
||||
|
||||
dispatch = {
|
||||
"ls": list,
|
||||
"get": get,
|
||||
@ -216,5 +224,6 @@ dispatch = {
|
||||
"rm": rm,
|
||||
"mv": mv,
|
||||
"webopen": webopen,
|
||||
"repl": repl,
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user