Answer the question
In order to leave comments, you need to log in
Python how to remove message when opening browser via webbrowser module?
Hello, there was a small problem with opening a new tab in the browser using python, there is the following code:
webbrowser.open_new(self.url)
self.code = raw_input("Code: ")
Answer the question
In order to leave comments, you need to log in
If input from the console was requested, then the console will wait for input until Enter is pressed, and it does not matter what is being poured into the console from other threads at that moment. This is confusing, of course, but it doesn't affect input. You can safely continue typing, not paying attention to all this dirt, only what is entered from the keyboard will get into the input. But if you want to do it somehow more aesthetically, then you can wait for the output, pause, translate the line and read raw_input:
import time
webbrowser.open_new(self.url)
time.sleep(2) # можете сами подобрать это значение
print("\n")
self.code = raw_input("Code: ")
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question