lundi 1 août 2016

how to open chrome in incognito mode from Python

This works, in powershell:

Start-Process chrome.exe -ArgumentList @( '-incognito', 'www.foo.com' )

How can this be achieved from Python?

EDIT: Like this!

import subprocess
subprocess.Popen(["C:Program Files (x86)GoogleChromeApplicationchrome.exe", "-incognito", "www.google.com"])

Aucun commentaire:

Enregistrer un commentaire