<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Thu, May 28, 2015 at 10:32 AM, Ryan Gonzalez <span dir="ltr"><<a href="mailto:rymg19@gmail.com" target="_blank">rymg19@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>py2exe tends to invoke DLL hell if you have various versions of VS or Office or both installed. Because Windows.<br></div></blockquote><div><br></div><div>uh, yes -- Windows applications invoke dll hell......nothign to be done about that!</div><div><br></div><div>-Chris</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><br><div class="gmail_quote"><div><div class="h5">On May 28, 2015 11:23:57 AM CDT, Chris Barker <<a href="mailto:chris.barker@noaa.gov" target="_blank">chris.barker@noaa.gov</a>> wrote:</div></div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div class="h5">
<div dir="ltr">I'm confused:<div><br></div><div>Doesn't py2exe (optionally) create a single file executable?</div><div><br></div><div>And py2app on the Mac creates an application bundle, but that is more-or-less the equivalent on OS-X (you may not even be able to have a single file executable that can access the Window Manager, for instance)</div><div><br></div><div>Depending on what extra packages you need, py2exe's single file doesn't always work, but last I tried, it worked for a fair bit (I think all of the stdlib).</div><div><br></div><div>I don't know what PyInstaller or others create. And I have no idea if there is a linux option -- but it seems like the standard of practice for an application for linux is a bunch of files scattered over the system anyway :-)</div><div><br></div><div>Yes, the resulting exe is pretty big, but it does try to include only those modules and packages that are used, and that kind of optimization could be improved in
any case.</div><div><br></div><div>So is something different being asked for here?</div><div><br></div><div>Barry Warsaw wrote:</div><div><span style="font-size:12.8000001907349px">>> I do think single-file executables are an important piece to Python's </span><span style="font-size:12.8000001907349px">long-term competitiveness.</span><br></div><div><br></div><div>Really? It seems to me that desktop development is dying. What are the critical use-cases for a single file executable?</div><div><br></div><div>And I'd note that getting a good way to use Python to develop for iOS, Android, and Mobile Windows is FAR more critical!  -- maybe that's the same problem ?</div><div><br></div><div>-Chris</div><div><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, May 28, 2015 at 8:39 AM, Donald Stufft <span dir="ltr"><<a href="mailto:donald@stufft.io" target="_blank">donald@stufft.io</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
<br>
On May 28, 2015 at 11:30:37 AM, Steve Dower (<a href="mailto:steve.dower@microsoft.com" target="_blank">steve.dower@microsoft.com</a>) wrote:<br>
> Donald Stufft wrote:<br>
> > Well Python 3.4.3 binary is 4kb for me, so you'd have that + your 1KB Python script + whatever<br>
> other pieces you need.<br>
><br>
> For contrast, here are the things you need on Windows to be able to get to an interactive<br>
> prompt (I don't know how other platforms get this down to 4KB...):<br>
><br>
> * python.exe (or some equivalent launcher) 39KB<br>
> * python35.dll 3,788KB<br>
> * vcruntime140.dll 87KB (the rest of the CRT is about 1MB, but is not redistributable<br>
> so doesn't count here)<br>
> * 26 files in Lib 343KB<br>
><br>
> This gets you to ">>>", and basically everything after that is going to fail for some reason.<br>
> That's an unavoidable 4,257KB.<br>
><br>
> The rest of the stdlib adds another ~16MB once you exclude the test suite, so a fully functioning<br>
> Python is not cheap. (Using compressed .pyc's in a zip file can make a big difference here<br>
> though, assuming you're willing to trade CPU for HDD.)<br>
><br>
> Cheers,<br>
> Steve<br>
><br>
><br>
<br>
You don’t need a "fully functioning Python" for a single file binary, you only<br>
need enough to actually run your application. For example, if you're making<br>
an application that can download files over HTTP, you don't need to include<br>
parts of the stdlib like xmlrpc, pickle, shelve, marshall, sqlite, csv, email,<br>
mailcap, mailbox, imaplib, nntplib, etc.<br>
<br>
Of course deciding which pieces you include in the zip file you're appending<br>
to the end of Python is up to whatever tool builds this executable which<br>
doesn't need to be part of Python itself. If Python itself gained the ability<br>
to operate in that manner than third party tools could handle trying to do the<br>
optimizations where it only includes the things it actually needs in the stdlib<br>
and excludes things it doesn't. The key thing here is that since you're doing<br>
a single file binary, you don't need to have a Python which is suitable to<br>
execute random Python code, you only need one that is suitable to execute this<br>
particular code so you can specialize what that includes.<br>
<br>
---<br>
Donald Stufft<br>
PGP: 7C6B 7C5D 5E2B 6356 A926 F04F 6E3C BCE9 3372 DCFA<br>
<br>
<br>
_______________________________________________<br>
Python-Dev mailing list<br>
<a href="mailto:Python-Dev@python.org" target="_blank">Python-Dev@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/python-dev" target="_blank">https://mail.python.org/mailman/listinfo/python-dev</a><br>
Unsubscribe: <a href="https://mail.python.org/mailman/options/python-dev/chris.barker%40noaa.gov" target="_blank">https://mail.python.org/mailman/options/python-dev/chris.barker%40noaa.gov</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div><br>Christopher Barker, Ph.D.<br>Oceanographer<br><br>Emergency Response Division<br>NOAA/NOS/OR&R            <a href="tel:%28206%29%20526-6959" value="+12065266959" target="_blank">(206) 526-6959</a>   voice<br>7600 Sand Point Way NE   <a href="tel:%28206%29%20526-6329" value="+12065266329" target="_blank">(206) 526-6329</a>   fax<br>Seattle, WA  98115       <a href="tel:%28206%29%20526-6317" value="+12065266317" target="_blank">(206) 526-6317</a>   main reception<br><br><a href="mailto:Chris.Barker@noaa.gov" target="_blank">Chris.Barker@noaa.gov</a></div>
</div></div>
<p style="margin-top:2.5em;margin-bottom:1em;border-bottom:1px solid #000"></p></div></div><pre><div><div class="h5"><hr><br>Python-Dev mailing list<br><a href="mailto:Python-Dev@python.org" target="_blank">Python-Dev@python.org</a><br><a href="https://mail.python.org/mailman/listinfo/python-dev" target="_blank">https://mail.python.org/mailman/listinfo/python-dev</a><br></div></div>Unsubscribe: <a href="https://mail.python.org/mailman/options/python-dev/rymg19%40gmail.com" target="_blank">https://mail.python.org/mailman/options/python-dev/rymg19%40gmail.com</a><span class="HOEnZb"><font color="#888888"><br></font></span></pre></blockquote></div><span class="HOEnZb"><font color="#888888"><br>
-- <br>
Sent from my Android device with K-9 Mail. Please excuse my brevity.</font></span></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><br>Christopher Barker, Ph.D.<br>Oceanographer<br><br>Emergency Response Division<br>NOAA/NOS/OR&R            (206) 526-6959   voice<br>7600 Sand Point Way NE   (206) 526-6329   fax<br>Seattle, WA  98115       (206) 526-6317   main reception<br><br><a href="mailto:Chris.Barker@noaa.gov" target="_blank">Chris.Barker@noaa.gov</a></div>
</div></div>