2017-09-15 at 3:57 PM UTC
Just a quick question for today, say i have a python program that i wrote for Windows and within that Python program i use Selenium to have Mozilla Geckodriver do some stuff. I take it i will have to ship the Geckodriver with the compiled binary if i'd want to distribute my program right? I can't pack it all into one exe, except maybe as an MSI installer?
2017-09-17 at 1:48 AM UTC
it should be doable to package geckodriver in the generated executable. You might need to copy it to some tempdir so you can point selenium to it. Are you using pyinstaller or py2exe?
2017-09-17 at 3:12 AM UTC
Ok, add the path to geckodriver in the `binaries` option to Analysis in your specfile. Then it will be in the directory structure under the path in `sys._MEIPASS`. You'll want to read this:
https://pythonhosted.org/PyInstaller/runtime-information.html#run-time-informationfor more info on accessing bundled files at runtime, it will work differently during dev (when you're not packaging) vs. in distribution so you'll need to use the check mentioned at the top of that page.
Post last edited by Lanny at 2017-09-17T04:00:31.329672+00:00
The following users say it would be alright if the author of this
post didn't die in a fire!