Modified get_phantomjs_cmd to use from distutils import spawn followed by spawn.find_executable().
I believe it is more pythonic and also more general as it works without hardcoded folders.
It is cross-platform (tested on linux with python 2.7.9 and on windows with python 2.7.6).
Tested with non-existend executable - returns None.
Tested with executable in current directory and it works as expected - return ['phantomjs', '--ignore-ssl-errors=yes', '--web-security=false', '--ssl-protocol=any', '--debug=false'].
Tested with executable in /usr/local/bin and returns ['/usr/local/bin/phantomjs', '--ignore-ssl-errors=yes', '--web-security=false', '--ssl-protocol=any', '--debug=false'].
Modified get_phantomjs_cmd to use from distutils import spawn followed by spawn.find_executable(). I believe it is more pythonic and also more general as it works without hardcoded folders. It is cross-platform (tested on linux with python 2.7.9 and on windows with python 2.7.6). Tested with non-existend executable - returns None. Tested with executable in current directory and it works as expected - return ['phantomjs', '--ignore-ssl-errors=yes', '--web-security=false', '--ssl-protocol=any', '--debug=false']. Tested with executable in /usr/local/bin and returns ['/usr/local/bin/phantomjs', '--ignore-ssl-errors=yes', '--web-security=false', '--ssl-protocol=any', '--debug=false'].