Adds start.py script to start the server and launch a new browser tab #17
This commit is contained in:
parent
6cedaa8e8f
commit
d1e2cb1a6d
2 changed files with 20 additions and 7 deletions
9
start.py
Normal file
9
start.py
Normal file
|
@ -0,0 +1,9 @@
|
|||
#!/usr/bin/env python
|
||||
from multiprocessing import Process
|
||||
import webbrowser
|
||||
import zeronet
|
||||
|
||||
server = Process(target=zeronet.main)
|
||||
server.start()
|
||||
url = webbrowser.open("http://127.0.0.1:43110", new=2)
|
||||
server.join()
|
|
@ -1,5 +1,6 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
def main():
|
||||
try:
|
||||
from src import main
|
||||
main.start()
|
||||
|
@ -7,3 +8,6 @@ except Exception, err: # Prevent closing
|
|||
import traceback
|
||||
traceback.print_exc()
|
||||
raw_input("-- Error happened, press enter to close --")
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
|
Loading…
Reference in a new issue