Skip to content

Commit

Permalink
Adds start.py script to start the server and launch a new browser tab H…
Browse files Browse the repository at this point in the history
  • Loading branch information
volker48 committed Jan 26, 2015
1 parent 6cedaa8 commit d1e2cb1
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 7 deletions.
9 changes: 9 additions & 0 deletions start.py
Original file line number Diff line number Diff line change
@@ -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()
18 changes: 11 additions & 7 deletions zeronet.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
#!/usr/bin/env python

try:
from src import main
main.start()
except Exception, err: # Prevent closing
import traceback
traceback.print_exc()
raw_input("-- Error happened, press enter to close --")
def main():
try:
from src import main
main.start()
except Exception, err: # Prevent closing
import traceback
traceback.print_exc()
raw_input("-- Error happened, press enter to close --")

if __name__ == '__main__':
main()

0 comments on commit d1e2cb1

Please sign in to comment.