<div dir="ltr">Folks,<div><br></div><div>Over on the list for the Anaconda distribution, we've run into a limitation in our understanding of the whole app bundle, etc business.</div><div><br></div><div>The problem is thus:</div>
<div><br></div><div>Anaconda is currently built with the old python / pythonw dichotomy. </div><div><br></div><div>python is a standard unix-style executable -- great for command line apps, web servers, what have you. But you get the dreaded:</div>
<div><br></div><div><div>"""</div><div>This program needs access to the screen.</div><div>Please run with a Framework build of python, and only when you are</div><div>logged in on the main display of your Mac.</div>
</div><div>"""</div><div><br></div><div>when you try to run a GUI app (this error message from wxPython)</div><div><br></div><div>pythonw, on the other hand, is a shell script that re-directs to a python that is inside a hand-built application bundle:</div>
<div><br></div><div><div>#!/bin/bash</div><div>export PYTHONEXECUTABLE=/Users/chris.barker/PythonStuff/Anaconda/anaconda/bin/python</div><div>/Users/chris.barker/PythonStuff/Anaconda/anaconda/python.app/Contents/MacOS/python $@</div>
</div><div><br></div><div>This all sort-of works. But it's a pain, because you may not know when you start up an app, whether it needs to access the Window manger (like iPython, for instance). And now I need to put "pythonw" in my #! lines, which may fail on other *nix systems, and...</div>
<div><br></div><div>One thought is to simply have "python" be the same shell script as "pythonw" but there is concern that having it be a re-directing shell script may cause problems for some use cases.</div>
<div><br></div><div>I know that this has been solved for years in the <a href="http://python.org">python.org</a> installer. So how is that done?</div><div><br></div><div>Anaconda doesn't seem to want to make their python a proper framework build -- don't know why not -- would there be any downside? But is it possible to build the python executable so it can access the GUI system without structuring their whole python install?</div>
<div><br></div><div>Thanks,</div><div> -Chris</div><div><br></div><div><br></div><div>-- <br><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>