forked from bitxbay/BitXBay
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
27 lines (21 loc) · 885 Bytes
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/usr/bin/env python
import sys, os
import helper, config
def main(argv=sys.argv):
if len(sys.argv) < 2:
data_dir = config.path#os.path.join(os.getenv('APPDATA'),'Bitcoin', 'blocks')
if not os.path.exists(data_dir):
print('ERROR: Database %s was not found!' % os.path.join(data_dir))
else:
print ('Selected Database: %s' % os.path.join(data_dir))
w = helper.worker(data_dir, config.addresses, config.days)
w.start()
else:
if not os.path.exists(sys.argv[1]):
print('ERROR: Database %s was not found!' % sys.argv[1])
else:
print ('Selected Database: %s' % sys.argv[1])
w = helper.worker(os.path.join(sys.argv[1]), config.addresses, config.days)
w.start()
if __name__ == '__main__':
sys.exit(main())