Add requirements in README and future bitcoin detection
This commit is contained in:
parent
f2210c3d96
commit
7ddb93c988
2
README
2
README
@ -1,3 +1,5 @@
|
|||||||
|
Requirements: Python 2.x, with bsddb and twisted packages
|
||||||
|
|
||||||
Usage: pywallet.py [options]
|
Usage: pywallet.py [options]
|
||||||
|
|
||||||
Options:
|
Options:
|
||||||
|
|||||||
16
pywallet.py
16
pywallet.py
@ -25,6 +25,7 @@ from twisted.web.static import File
|
|||||||
from twisted.python import log
|
from twisted.python import log
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
|
|
||||||
|
from subprocess import *
|
||||||
|
|
||||||
max_version = 32500
|
max_version = 32500
|
||||||
addrtype = 0
|
addrtype = 0
|
||||||
@ -863,7 +864,7 @@ def keyinfo(sec, keyishex):
|
|||||||
class WIRoot(resource.Resource):
|
class WIRoot(resource.Resource):
|
||||||
|
|
||||||
def render_GET(self, request):
|
def render_GET(self, request):
|
||||||
header = '<h1>Pywallet Web Interface</h1><h3>CLOSE BITCOIN BEFORE USING!</h3><br /><br />'
|
header = '<h1>Pywallet Web Interface</h1><h3>CLOSE BITCOIN BEFORE USE!</h3><br /><br />'
|
||||||
|
|
||||||
DWForm = '<h3>Dump your wallet:</h3><form style="margin-left:15px;" action="DumpWallet" method=get>\
|
DWForm = '<h3>Dump your wallet:</h3><form style="margin-left:15px;" action="DumpWallet" method=get>\
|
||||||
Wallet Directory: <input type=text name="dir" id="dwf-dir" size=40 value="' + determine_db_dir() + '" /><br />\
|
Wallet Directory: <input type=text name="dir" id="dwf-dir" size=40 value="' + determine_db_dir() + '" /><br />\
|
||||||
@ -1204,6 +1205,10 @@ if __name__ == '__main__':
|
|||||||
parser.add_option("--port", dest="port",
|
parser.add_option("--port", dest="port",
|
||||||
help="port of web interface (defaults to 8989)")
|
help="port of web interface (defaults to 8989)")
|
||||||
|
|
||||||
|
# parser.add_option("--forcerun", dest="forcerun",
|
||||||
|
# action="store_true",
|
||||||
|
# help="run even if pywallet detects bitcoin is running")
|
||||||
|
|
||||||
(options, args) = parser.parse_args()
|
(options, args) = parser.parse_args()
|
||||||
|
|
||||||
VIEWS = {
|
VIEWS = {
|
||||||
@ -1213,6 +1218,15 @@ if __name__ == '__main__':
|
|||||||
'Balance': WIBalance()
|
'Balance': WIBalance()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# a=Popen("ps xa | grep ' bitcoin'", shell=True, bufsize=-1, stdout=PIPE).stdout
|
||||||
|
# aread=a.read()
|
||||||
|
# nl = aread.count("\n")
|
||||||
|
# a.close()
|
||||||
|
# if nl > 2:
|
||||||
|
# print('Bitcoin seems to be running: \n"%s"'%(aread))
|
||||||
|
# if options.forcerun is None:
|
||||||
|
# exit(0)
|
||||||
|
|
||||||
if options.web is not None:
|
if options.web is not None:
|
||||||
webport = 8989
|
webport = 8989
|
||||||
if options.port is not None:
|
if options.port is not None:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user