the general development using Python

Joshua Landau joshua at landau.ws
Tue Jul 9 20:14:44 EDT 2013


On 10 July 2013 00:35, CM <cmpython at gmail.com> wrote:
> On Tuesday, July 9, 2013 5:13:17 PM UTC-4, Joshua Landau wrote:
>> On 9 July 2013 03:08, Adam Evanovich <ajetrumpet at gmail.com> wrote:
>> > Can you wrap source code/libs/apps into an EXE and just
>> > send that to the end user?  Or is it more complicated for them?
>
>> Urm.. yes. But don't. That's the "nuclear" option and isn't a good
>> one. If you have a *really genuinely good reason* (you probably don't)
>> to do this, there are ways.
>
> I still think you are overstating it somewhat.  Have a website on which you distribute your software to end users (and maybe even--gasp--charge them for it)?  *That's* a good reason.

Not really. It'd be a good reason if it disqualifies the other
options, but it doesn't. Just give them an archive.

If you're worried about keeping your code "safe" then:

1) You're going about it the wrong way. Like, seriously wrongly.
2) It's not going to be totally secure even if you do it the right way.

The most safeyest way you can do with Python AFAIK¹² is a long winded
process to basically just "compile it with Cython". Note that it still
requires CPython (the normal python interpreter) to be installed --
you get lots of .so files instead of a .exe. There are other silly
things you can do as well.

> And that's one of the top ways that users get software.

Pah, I much prefer it over here on Linux :P.

> Also, many programs rely on 2-3 dependencies, and sometimes that is asking a lot of the end user to install.  (I know, I know, it shouldn't be...and with things like pip it really shouldn't be, but you know how it goes).

But why do they need to install it at all? If you're not installing
the .py file, then just include those dependencies in the archive --
.py files are tiny. If you are installing the .py with a setup.py
(like with the link I included), then just install them at the same
time.

> I completely agree with you in Ideal World thinking, but in the gnarly one we actually have, .exe files *often* have their place.

Yeah, but not for Python :P. For Python .exe files are a rarity and
should be kept that way.

¹ I'm not even sure that Cython doesn't keep a copy of the original
code for crash reports and other debugging stuff...
² Theres also Nuitka, which I found right now, so I'm not sure if it's
any good for this or not. I haven't tried, really.



More information about the Python-list mailing list