I am trying to build my own Voice Assistant and I dont want to see any console window when I am using it. To do that I created this batch file:
@echo off
C:\Users\koeje\AppData\Local\Programs\Python\Python37\pythonw.exe
C:\Users\koeje\Documents\Python\VoiceAssistant\main.py %*
pause
Because there is still a console window opening I created a vbs file witch gets opend by autostart:
Set WshShell = CreateObject("WScript.Shell" )
WshShell.Run chr(34) & "C:\Users\koeje\Documents\Python\VoiceAssistant\VoiceAssistant.bat" & Chr(34),0
Set WshShell = Nothing
Now its working fine and I cant see any console window. My only problem now is that I use the spotipy package and that I have to manually insert a url which the package is opening in my browser.
token = util.prompt_for_user_token(username, scope, client_id = client_id, client_secret = client_secret, redirect_uri = redirect_uri)
The package runs this code and then I have to insert the URL.
Is there any way that python can open the consol, accept my url and closes the console afterwards?