mirror of
https://github.com/w-okada/voice-changer.git
synced 2025-02-02 16:23:58 +03:00
default to http, open chrome automatically2
This commit is contained in:
parent
ed246b65d2
commit
9b4a67ac66
@ -190,13 +190,18 @@ if __name__ == '__main__':
|
|||||||
if args.openWindow:
|
if args.openWindow:
|
||||||
printMessage(f"ブラウザ(Chroem)の起動を試みています。", level=2)
|
printMessage(f"ブラウザ(Chroem)の起動を試みています。", level=2)
|
||||||
try:
|
try:
|
||||||
webbrowser.get('chrome')
|
webbrowser.get('google-chrome')
|
||||||
webbrowser.get('chrome').open(f"http://localhost:{PORT}/{path}", new=1, autoraise=True)
|
webbrowser.get('google-chrome').open(f"http://localhost:{PORT}/{path}", new=1, autoraise=True)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
printMessage(f"{e}", level=1)
|
printMessage(f"!!! {e}", level=2)
|
||||||
printMessage(f"ブラウザの起動に失敗しました。", level=2)
|
try:
|
||||||
printMessage(f"手動でブラウザを立ち上げて表示されたURLにアクセスしてください。", level=2)
|
webbrowser.get("C:\Program Files\Google\Chrome\Application\chrome.exe")
|
||||||
print()
|
webbrowser.get("C:\Program Files\Google\Chrome\Application\chrome.exe").open(f"http://localhost:{PORT}/{path}", new=1, autoraise=True)
|
||||||
|
except Exception as e:
|
||||||
|
printMessage(f"{e}", level=1)
|
||||||
|
printMessage(f"ブラウザの起動に失敗しました。", level=2)
|
||||||
|
printMessage(f"手動でブラウザを立ち上げて表示されたURLにアクセスしてください。", level=2)
|
||||||
|
print()
|
||||||
# printMessage(f"http://{hostname}:{PORT}/{path}", level=1)
|
# printMessage(f"http://{hostname}:{PORT}/{path}", level=1)
|
||||||
|
|
||||||
# サーバ起動
|
# サーバ起動
|
||||||
|
Loading…
Reference in New Issue
Block a user