Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'python.': 0.02; 'languages.': 0.04; 'anyway.': 0.05; 'inspired': 0.05; 'interpreter': 0.05; 'say,': 0.05; 'subject:Python': 0.06; 'distributing': 0.07; 'environments': 0.07; 'pypi': 0.07; 'users,': 0.07; 'default.': 0.09; 'jessica': 0.09; 'mind,': 0.09; 'python': 0.11; 'gui': 0.12; 'archive': 0.14; 'books': 0.15; '"here': 0.16; 'already,': 0.16; 'competent': 0.16; 'developer)': 0.16; 'gave.': 0.16; 'interpreter,': 0.16; 'list),': 0.16; 'magic': 0.16; 'non-native': 0.16; 'non-python': 0.16; 'reliability.': 0.16; 'simple.': 0.16; 'struck': 0.16; 'subject:distribution': 0.16; 'subject:program': 0.16; 'work."': 0.16; 'wsgi': 0.16; '\xa0no': 0.16; 'java,': 0.16; 'all.': 0.16; 'language': 0.16; 'do.': 0.18; 'users.': 0.18; 'bit': 0.19; '(but': 0.19; 'pieces': 0.19; 'server,': 0.19; 'things.': 0.19; 'written': 0.21; 'code,': 0.22; '(in': 0.22; 'install': 0.23; 'installation': 0.23; 'library,': 0.24; 'proxy': 0.24; '\xa0if': 0.24; 'java': 0.24; 'file.': 0.24; 'looks': 0.24; 'environment': 0.24; 'developers': 0.25; 'compare': 0.26; 'right.': 0.26; 'somewhere': 0.26; 'asking': 0.27; 'installed': 0.27; 'point': 0.28; 'points': 0.29; "doesn't": 0.30; 'message- id:@mail.gmail.com': 0.30; "i'm": 0.30; 'code': 0.31; 'getting': 0.31; 'serve': 0.31; 'cool,': 0.31; 'developers.': 0.31; 'once,': 0.31; 'really,': 0.31; 'servers.': 0.31; "user's": 0.31; 'anyone': 0.31; 'file': 0.32; 'probably': 0.32; 'front': 0.32; 'themselves': 0.32; 'run': 0.32; 'worked': 0.33; 'running': 0.33; '(i.e.': 0.33; 'packaging': 0.33; 'could': 0.34; 'problem': 0.35; 'connection': 0.35; 'except': 0.35; 'problem.': 0.35; 'something': 0.35; 'good.': 0.35; 'hundreds': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'there': 0.35; 'really': 0.36; 'doubt': 0.36; 'useful': 0.36; 'possible': 0.36; 'similar': 0.36; 'example,': 0.37; 'virtual': 0.37; 'level': 0.37; 'area': 0.37; 'being': 0.38; 'problems': 0.38; 'handle': 0.38; 'whatever': 0.38; 'to:addr:python-list': 0.38; 'fact': 0.38; 'little': 0.38; 'anything': 0.39; 'address': 0.63; 'developed': 0.63; 'such': 0.63; 'zip': 0.64; 'more': 0.64; 'taking': 0.65; 'great': 0.65; 'talking': 0.65; 'youtube': 0.65; 'services': 0.66; 'here': 0.66; 'close': 0.67; 'promise': 0.68; 'reads': 0.68; 'useful.': 0.68; 'helping': 0.70; 'audience': 0.74; 'special': 0.74; 'analysis': 0.75; 'hand': 0.80; 'attractive': 0.81; '3.4': 0.84; 'blob': 0.84; 'end-user': 0.84; 'hardly': 0.84; 'is)': 0.84; 'out..': 0.84; 'subject:source': 0.84; '\xa0at': 0.84; '\xa0but': 0.84; '\xa0have': 0.84; '\xa0of': 0.84; 'steps.': 0.91; 'hundred': 0.95 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=nrey99A/I6c7gGtTc1CgK1hHvasw7+x5TTovdQt1MLU=; b=eqKS5NBAkjkxsiWBNlCwdqUQR91ZU9qq8bxpKerSYJaj5wUTK3Wi6MDxwfXiOD44Gy OMxFmY3AAuJKj9Iv7y+VdruGsOc7smouMzsFKFrO0jn6XR0L4UoSWJaGP+2D7f94DTD/ I1p+dl8nY0V2+4mKoHuzZ0tqBVnsDjPWGzheZGi3tROZ0GkmujdB8Up+majIfYTkSKQr g4ANAjWANnQ6XQyChqH3m8nRBmczW/97Qd0ppqvUdBwviFAb9HduOZRXXHIMNTvjAhQT w4UbbTc8E7pdFes24Wnj2nQBthM5GPs/uObQNDAUOMUAtIoPu3cR429rFqieoaxTR1fJ tHEQ== MIME-Version: 1.0 X-Received: by 10.15.22.137 with SMTP id f9mr37654955eeu.30.1389051553395; Mon, 06 Jan 2014 15:39:13 -0800 (PST) Date: Mon, 6 Jan 2014 23:39:13 +0000 Subject: Python program distribution - a source of constant friction From: Nicholas Cole To: Python Content-Type: multipart/alternative; boundary=089e0163576e6a380404ef55c4c2 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 181 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1389051596 news.xs4all.nl 2885 [2001:888:2000:d::a6]:37357 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:63376 --089e0163576e6a380404ef55c4c2 Content-Type: text/plain; charset=ISO-8859-1 This email is inspired by a YouTube video of a talk that Jessica McKellar recently gave. I was struck by her analysis that it is hard to remain a popular language (as Python currently is) and her call to action to address friction points that make it hard for a non-Python audience to use Python and applications developed in Python. Well, here is one. All of the early books one reads on Python compare it to Java or similar languages. Write code once, is the promise, and as long as your target computer has a Python interpreter, your code will run. For Java, I have to say! this really does seem true. Once I have a Java environment installed, Java applications work seamlessly. I download them, execute them, and, unless they are very old and give themselves away by using a non-native set of GUI widgets, I probably forget that I am running Java at all. But as we all know, Python isn't that simple. I'm not talking about the problems of cross-platform GUIs or other such things. I'm taking about the problem of distributing anything more complicated than a single-file program to end users. I realise that I'm not really, either, taking about the much written about Python packaging problem. I was going to berate the packaging documentation for not really helping with the problem I have in mind, but I realised that actually the kinds of packages that the Packaging Guide is taking about are the kinds of things that developers and python-proficient system administrators will be installing. But what about the end-user? The end-user who just wants a blob (he doesn't care about what language it is in - he just wants to solve the problem at hand with your shiny, cool, problem-solving application). He is hopefully using a system on which Python comes as default. At most one might get him to install a new Python interpreter and standard library, but asking him to do more than that is simply asking more than he will do. Will your code run or not? (i.e. without him having to learn what pip is!) There are tools that will package up binaries of python and create something that will even run without an interpreter installed on the target system. If only they were better documented, less fragile and worked consistently with Python 3! Even then, I'm not sure this is the answer - anything like that is bound to be a bit fragile and break one of the attractive features of Python - that all things being equal, I don't need to maintain development environments for every possible target platform to get code to run. What would be nice is something much less complicated. Something , for example, that just takes everything except the python interpreter from a virtual environment, packs it up and turns it into a zip archive that really will run on a user's python installation without any additional steps. There are a couple of tools to do something close to this, but they are hardly well signposted in the python documentation (in fact I only found them with the help of this list), and even these tools need more than a little experimentation to get right. No doubt even here some extra glue or magic would be useful - what is the right thing to do when C modules are needed? But at any rate, I think that some more thought in this area would be very useful. And what about WSGI apps? I regard WSGI as one of the great features of modern Python. But again, end users don't really want to have to learn all about python and proxy servers running in front of special WSGI servers. Most are not going to serve hundreds of thousands of users, but probably do need a little more than one connection at a time. Even if the right solution is to create these complicated setups, I defy anyone to find me a page I could point a competent system administrator (but non-Python developer) at and say, "here is my code, install it in this directory and set up a webserver according to the instructions on this single web page and everything will just work." We are even further away from saying, "Here is a special zip file. Make sure you have a Python 3 interpreter ready and then just treat this file as you would any other service on your system. Have it started by whatever daemon manages services on your server, and it will all just work and be able to handle a reasonable number of users with a reasonable level of security and reliability. Of course, if you end up with more than a few hundred users, you will need something more specialised." Python *packaging* looks as if it is getting sorted out. Pip is going to be part of Python 3.4 and PyPI works very well. The instructions on the net for packaging things for a Python audience are extremely good. Sending python code to other python developers is extremely easy. But it is not easy to send code to non-python developers. The promise that you can just get your users to install a Python interpreter and then give them code to run on it is a worthy dream. Perhaps all the pieces to do this all seamlessly exist already, but if so they need much better documentation, somewhere that it is really easy to find it. IMHO, anyway. Nicholas --089e0163576e6a380404ef55c4c2 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable This email is inspired by a YouTube video of a talk that Jessica McKellar r= ecently gave. =A0I was struck by her analysis that it is hard to remain a p= opular language (as Python currently is) and her call to action to address = friction points that make it hard for a non-Python audience to use Python a= nd applications developed in Python.

Well, here is one.

All of the early= books one reads on Python compare it to Java or similar languages. =A0Writ= e code once, is the promise, and as long as your target computer has a Pyth= on interpreter, your code will run. =A0For Java, I have to say! this really= does seem true. =A0Once I have a Java environment installed, Java applicat= ions work seamlessly. =A0I download them, execute them, and, unless they ar= e very old and give themselves away by using a non-native set of GUI widget= s, I probably forget that I am running Java at all.

But as we all know, Python=A0isn't that simple. =A0I'= ;m not talking about the problems of cross-platform GUIs or other such thin= gs. =A0I'm taking about the problem of distributing anything more compl= icated than a single-file program to end users.

I realise that I'm not really, either, taking about the = much written about=A0Python packaging problem. =A0I was going to berate the= packaging documentation for not really helping with the problem I have in = mind, but I realised that=A0actually the kinds of packages that the Packagi= ng Guide=A0is taking about are the kinds of things that developers and pyth= on-proficient system administrators will be installing.

But what about the end-user? =A0The end-user who just wants = a blob (he doesn't care about what language it is in - he just wants to= solve the problem at hand with your shiny, cool, problem-solving applicati= on). =A0He is hopefully using a system on which Python comes as default. = =A0At most one might get him to install a new Python interpreter and standa= rd library, but asking him to do more than that is simply asking more than = he will do. =A0Will your code run or not? (i.e. without him having to learn= what pip is!)

There are tools that will package up binaries of python and = create something that will even run without an interpreter installed on the= target system. =A0If only they were better documented, less fragile and wo= rked consistently with Python 3! =A0Even then, I'm not sure this is the= answer - anything like that is bound to be a bit fragile and break one of = the attractive features of Python - that all things being equal, I don'= t need to maintain development environments for every possible target platf= orm to get code to run.

What would be nice is something much less complicated. =A0So= mething , for example,=A0that just takes everything except the python inter= preter from a virtual environment, packs it up and turns it into a zip arch= ive that really will run on a user's python installation without any ad= ditional steps.=A0 There are a couple of tools to do something close to thi= s, but they are hardly well signposted in the python documentation (in fact= I only found them with the help of this list), and even these tools need m= ore than a little experimentation to get right. =A0No doubt even here some = extra glue or magic would be useful - what is the right thing to do when C = modules are needed? =A0But at any rate, I think that some more thought in t= his area would be very useful.=A0

And what about WSGI apps? =A0I regard WSGI as one of th= e great features of modern Python. =A0But again, end users don't really= want to have to learn all about python and proxy servers running in front = of special WSGI servers. =A0Most are not going to serve hundreds of thousan= ds of users, but probably do need a little more than one connection at a ti= me. =A0Even if the right solution is to create these complicated setups, I = defy anyone to find me a page I could point a competent system administrato= r (but non-Python developer)=A0at and say, "here is my code, install i= t in this directory and set up a webserver according to the instructions on= this single web page and everything will just work."

We are even further away from saying, "Here is a s= pecial zip file. Make sure you have a Python 3 interpreter ready and then j= ust treat this file as you would any other service on your system. =A0Have = it started by whatever daemon manages services on your server, and it will = all just work and be able to handle a reasonable number of users=A0with a r= easonable level of security and reliability. =A0Of course, if you end up wi= th more than a few hundred users, you will need something more specialised.= "

Python *packaging* looks as if it is getting sorted out= . =A0Pip is going to be part of Python 3.4 and PyPI works very well. The in= structions on the net for packaging things for a Python audience are extrem= ely good. =A0Sending python code to other python developers is extremely ea= sy.

But it is not easy to send code to non-python developer= s. =A0The promise that you can just get your users to install a Python inte= rpreter and then give them code to run on it is a worthy dream. =A0Perhaps = all the pieces to do this all seamlessly exist already, but if so they need= much better documentation, somewhere that it is really easy to find it.

IMHO, anyway.=A0

Nicholas --089e0163576e6a380404ef55c4c2--