-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.py
40 lines (29 loc) · 1016 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
28
29
30
31
32
33
34
35
36
37
38
39
40
# import os
# import webbrowser
# import threading
# import http.server
# import socketserver
# from src.steer_direction import track_hand
# # Define the directory and port
# dir = "sim/"
# port = 8000
# # Create a simple server
# Handler = http.server.SimpleHTTPRequestHandler
# # Change the working directory to 'sim/'
# os.chdir(dir)
# # Start the server in a new thread
# server_thread = threading.Thread(target=lambda: socketserver.TCPServer(("", port), Handler).serve_forever())
# server_thread.start()
# # Open the web server in the default web browser
# webbrowser.open(f"http://localhost:{port}")
# # Launch the hand tracking
# track_hand()
# # When done, shutdown the server
# socketserver.TCPServer(("", port), Handler).shutdown()
# #######################################################################3
import webbrowser
from src.steer_direction import track_hand
# Open the web page in the default web browser
# webbrowser.open("http://slowroads.io")
# Launch the hand tracking
track_hand()