0

Let’s say I have two versions of Firefox installed. What is the way to get the default version of firefox printed? I am running the script in python. Is there way to get the output into python?

0

Assuming that the "default version" is whatever is executed when you enter firefox in a terminal:

version=subprocess.check_output(['firefox','--version'])
1
  • This could be improved by indicating that python will run firefox with (some) $PATH, which dictates which Firefox will start. – Jeff Schaller Nov 27 '17 at 12:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.