Re:Drawbacks of Python
by dec0dedab0de on Thursday September 12, 2019 @10:25AM
(#20951793)
if you just want to make a self contained executable for windows users I've used py2exe a few times and it always works well. It's basically one command and it gives you an exe of your .py file
Re:Drawbacks of Python
by metroholografix on Friday September 13, 2019 @05:12PM
(#20966630)
py2exe and anything else that uses Joachim Bauch's memory loader is loading DLLs in a broken fashion that is bound to bite you sooner or later, assuming it works in the first place.
Reimplementing - in a buggy incompatible way - the Windows loader (which is what that code is doing) from scratch, is a gross hack and should not be used to build anything that's meant to be reliable.
Note that pyinstaller and cx_freeze do not suffer from these issues. Do not use py2exe.
I used to be type of of developer who would always make executables and installers in years gone by.
I find now in all cases I whip up what I want to do as a script and then embed it in Flask as a webapp. The only thing I don't do this is with compiler tools that I can bring in with cmake etc. If the app needs data I just add an upload button or have it point at S3. YMMV.
Re:Drawbacks of Python
by noobiemcfoob on Thursday September 12, 2019 @10:31AM
(#20951866)
I believe fbs might have massaged some of your GUI packaging problems. I haven't used it myself, but a coworker who builds a Windows GUI application swears by it. From him, "It's the package manager python doesn't deserve"
Re:Drawbacks of Python
by wlesieutre on Thursday September 12, 2019 @10:39AM
(#20951959)
Looks interesting, though the license situation seems less than ideal.
If it's for an internal only tool, does that fit under all the GPL / LGPL requirements?
Re:Drawbacks of Python
by CogitoCogito on Thursday September 12, 2019 @11:17AM
(#20952416)
> If it's for an internal only tool, does that fit under all the GPL / LGPL requirements?
Yes.
Re:Drawbacks of Python
by metalliqaz on Thursday September 12, 2019 @10:21AM
(#20951744)
I've found that the built-in tkinter lib is good enough for basic GUIs that you might use on a utility.
Re:Drawbacks of Python
by wlesieutre on Thursday September 12, 2019 @10:29AM
(#20951844)
That's the one I've tried a bit before, but haven't spent enough time to be comfortable with it. The crux of it for this project is that if I were making a UI I'd like to move the data validation in to that (and add some more sanity checking) with visual indications if there's a bad row or something looks off. Currently it just it yells at you and terminates if there's invalid data.
So a UI rewrite would make it much friendlier to other users, but it'd be a time investment I can't justify over the "just don't give it bad data" strategy.
The inputs and outputs are all handled manually so reliability isn't a huge focus as long as someone can poke around for a bit and make it work. Only user is me for now, so ¯\_(ツ)_/¯
# TODO: make it less shitty
It’d be better if it were a self contained executable with a GUI but not worth the time to figure that out.
I messed around with TkInter a while back, not sure if anything's new since then. For executables there was py2exe, cx_freeze, and PyInstaller, but the situation with packaging DLLs into an executable that would actually work on someone else's computer was iffy last I checked.