When I try to use mailto:
with the webbrowser
Python module
webbrowser.open_new("mailto:")
a new browser window is opened with one tab but "mailto" is not run if the default browser for webbrowser
is Chrome.
(Alternative code with the same result:
wb_controller_gc = webbrowser.get("google-chrome")
wb_controller_gc.open_new("mailto:")
)
If I try to do the same thing with Firefox
wb_controller_ff = webbrowser.get("firefox")
wb_controller_ff.open_new("mailto:")
there is no problem: A new Firefox window is opened with two tabs and the default mail client is started.
Other things that I've tried:
- Simply entering "mailto:" into the address bar in Chrome: No problem
open
(with and withoutnew=1
),open_new
,open_new_tab
: Doesn't help
My setup:
- OS: Lubuntu 16.04 (64 bit)
- Python version: 3.5.2
(I tried to test this for Windows 7 as well but unfortunately webbrowser.get
could not find the Chrome browser on the computer that I borrowed, even though I tried both "chrome" and "google-chrome" from this table)
Could this problem have something to do with the OS? Is there a workaround that you can recommend? Grateful for help!