-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBot.py
More file actions
29 lines (23 loc) · 718 Bytes
/
Bot.py
File metadata and controls
29 lines (23 loc) · 718 Bytes
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
28
29
# encoding: utf-8
def main():
print 'Bot starting'
checkDependencies()
from Vikings import Sea
Sea.sail()
print 'Bot finished'
def checkDependencies():
from sys import modules
depends = ['cv2', 'numpy', 'win32api', 'win32con', 'win32gui', 'win32ui']
missing = [dep for dep in depends if dep not in modules]
if missing:
print 'Error, dependencies not found: {}'.format(', '.join(missing))
print 'Exiting program'
raise SystemExit
if __name__ == '__main__':
main()
# Profiling:
# T = cv.getTickCount()
# print (T - cv.getTickCount()) / cv.getTickFrequency()
#
# start_time = time.time()
# print("Sail -- %s seconds ---" % (time.time() - start_time))