mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2024-12-30 17:56:58 +00:00
4b4f5bbcba
Note that using "whatever version of python the name 'python' maps to in the current shell environment" is more error-prone that specifying which python you mean, such as by executing "/usr/bin/python setup.py" instead of executing "./setup.py". When you build tahoe (by running "make") it will make a copy of bin/allmydata-tahoe in instdir/bin/allmydata-tahoe with the shebang line rewritten to execute the specific version of python that was used when building instead of to execute "/usr/bin/env python". However, it seems better that the default for lazy people be "whatever 'python' means currently" instead of "whatever 'python' meant to the manufacturer of your operating system".
19 lines
381 B
Python
19 lines
381 B
Python
#! /usr/bin/env python
|
|
|
|
from foolscap import Tub
|
|
from foolscap.eventual import eventually
|
|
import sys
|
|
from twisted.internet import reactor
|
|
|
|
def go():
|
|
t = Tub()
|
|
d = t.getReference(sys.argv[1])
|
|
d.addCallback(lambda rref: rref.callRemote("get_memory_usage"))
|
|
def _got(res):
|
|
print res
|
|
reactor.stop()
|
|
d.addCallback(_got)
|
|
|
|
eventually(go)
|
|
reactor.run()
|