Open JoshuaRM opened 5 years ago
Updated the browser parameter to a safer state. The parameter has been created to work with chrome, firefox, internet explorer, and safari, and has been tested on both Mac OS and Windows.
The parameter uses regular expression and accepts any of the following terms, all case insensitive: To open in chrome google, chrome, google chrome, google-chrome To open in firefox firefox, mozilla-firefox, mozilla, mozilla firefox To open in internet explorer ie, internet-explorer, internet explorer, iexplore, iexplorer To open in safari safari
The script currently works assuming web browsers are registered as their executable file name (chrome, firefox, safari, iexplore)
I think we can add a disclaimer for the -b
command line argument stating that it requires the browser path to be in the user's PATH
to work properly on Windows.
Could you add the command line argument to the README and add a statement or warning regarding Windows functionality?
Hello @JoshuaRM! Thanks for updating the PR.
In the file pySearch.py
, following are the PEP8 issues :
Line 11:28: W503 line break before binary operator
There are no PEP8 issues in the file search.py
!
In this commit I changed the flake8 ignore list to add the flake8 error it gives now. The binary operator needs to be on separate lines, and flake8 does not like that.
Solves #14 Added a -b parameter that allows the user to specify which browser to open in. If an invalid or unregistered browser is entered, an error is shown and the available list of browsers is displayed