Allows specifying the browser name to launch
This commit is contained in:
parent
d1e2cb1a6d
commit
0601d7bf9e
1 changed files with 11 additions and 4 deletions
15
start.py
15
start.py
|
@ -1,9 +1,16 @@
|
|||
#!/usr/bin/env python
|
||||
from multiprocessing import Process
|
||||
import sys
|
||||
import webbrowser
|
||||
import zeronet
|
||||
|
||||
server = Process(target=zeronet.main)
|
||||
server.start()
|
||||
url = webbrowser.open("http://127.0.0.1:43110", new=2)
|
||||
server.join()
|
||||
def main():
|
||||
browser_name = sys.argv.pop() if len(sys.argv) >= 2 else None
|
||||
server = Process(target=zeronet.main)
|
||||
server.start()
|
||||
browser = webbrowser.get(browser_name)
|
||||
url = browser.open("http://127.0.0.1:43110", new=2)
|
||||
server.join()
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
|
Loading…
Reference in a new issue