0
How to Make a Python Command Sending You to a link?
I need a statement sending you to a link, "if the q key is pressed" Thanks!
2 Answers
+ 3
You can use python keyboard module to interact with your keyboard and add hotkeys to your computer for example write a code which when "q" is pressed call a function and that function run the code on system shell with os or subprocess python standard library module which run the browser and pass the link to that as a argument for example in linux(i'm not familiar with cmd):
firefox youtube.com
If you enter this on linux terminal it will open youtube.com
This is the keyboard module link:
https://github.com/boppreh/keyboard
You can find tutorial about keyboard module in internet
also this command install the keyboard on your python:
pip install keyboard
0
Thank you!