Skip to main content

Ralsina.Me — Roberto Alsina's website

Making deployment of desktop Python apps trivial: an idea

Proprietor and printer in front of Schwartz Print Shop in Minneapolis

Here's what I'm think­ing: how hard could it be to make PyQt app de­ploy­ment ab­so­lute­ly easy? Well, I am guess­ing: not very hard.

Here's the trick: see what works in the re­al world, and adopt it.

Ques­tion: what has de­ployed bil­lions of apps and has its users hap­py? An­swer: phones app stores.

Ques­tion: how do they work? An­swer: well, that's not that short, so let's start ex­plain­ing.

As I see it, a rea­son­able app store has the fol­low­ing com­po­nents:

A Stable Deployment Target

You can't de­ploy from the store if you don't know what you are de­ploy­ing in­to. If the tar­get plat­form is shaky, you just can't know how to de­ploy with­out us­er as­sis­tance, and we are try­ing to make this easy for the user, which means that's not ac­cept­able.

So, what's a sta­ble de­ploy­ment tar­get we can provide?

  • PyQt (so we can de­­ploy GUIs to all ma­jor desk­­top plat­­for­m­s)

  • Python stan­­dard li­brary

  • Se­lec­t­ed mod­­ules

What can be (and should be) bun­dled with the ap­p?

  • Pure python mod­­ules

  • Art­­work and oth­­er re­­sources

What may be bun­dled:

  • Python mod­­ules writ­ten in C/C++, but you then have to re­­do the app for each plat­­for­m, and that kin­­da suck­­s.

Deployment Services

  • Apps should be able to check if there is a new ver­­sion of them in the store, to ask for up­­­grades.

  • Apps should be added by the de­­ploy­­ment plat­­form nice­­ly in­­­to the host sys­tem's menus, desk­­top, etc.

Monetization Services

  • Some way to charge for ap­p­s. Even for open source ap­p­s, you could ask for U$S0.99 if you in­­stall them through the store. Op­­tion­al, of course, and up to the app own­er.

  • Ad plat­­for­m? There must be a good one for desk­­top apps some­where?

The Store Itself

  • A we­b­site that down­loads a "pack­­age" as­­so­­ci­at­ed with a lo­­cal de­­ploy­­ment ap­­pli­­ca­­tion.

  • A app store ap­p. In­­stall things not via we­b, but via a desk­­top ap­­pli­­ca­­tion.

I don't ex­pect a func­tion­al ver­sion of this would take me more than a week work­ing full­time to im­ple­men­t. Of course then there are all sorts of us­abil­i­ty, look­s, etc. things to con­sid­er.

And... I am go­ing to do some­thing I very rarely do. I am go­ing to ask for mon­ey.

As an ex­per­i­men­t, I have set­up a project at­diegogo.­com/Qt-Shop and set a fund­ing goal of U$S 600.

There you can fund me. I prom­ise that if the project is to­tal­ly fund­ed, I will de­liv­er. If it is­n't, I may de­liv­er any­way. I would pre­fer to have the mon­ey though.

The plat­form would be re­leased un­der GPLv2 or lat­er.

Why we are here.

Warn­ing: rant ahead.

Yes­ter­day the gov­ern­ment of Ar­genti­na an­nounced that they are giv­ing way 3 mil­lion net­books to stu­dents. They al­so an­nounced that they are giv­ing them the op­tion of Ubun­tu or Win­dows 7.

There was, of course, the typ­i­cal re­ac­tion from the FLOSS side: why are they giv­ing Win­dows to the stu­dents when Lin­ux is bet­ter? It's un­fair that the gov­ern­ment pays for Win­dows!

I am here to tell you to grow up and stop be­ing a ba­by. I am here to tell you to stop treat­ing oth­ers like ba­bies.

I think I can do this be­cause I am im­mune to crit­i­cism from the FLOSS crowd: I am a mem­ber of that crowd. I have an awe­some FLOSS pedi­gree, I have used noth­ing but Lin­ux for over 15 years. And I have a thick skin and I don't care much what oth­er peo­ple say, in prin­ci­ple, un­less they give me good rea­sons to care. And I am telling you to stop com­plain­ing.

I am telling you that if the on­ly rea­son to use a spe­cif­ic piece of soft­ware is be­cause it's cheap­er, you are ac­cept­ing that piece of soft­ware suck­s.

I want peo­ple not to just use Lin­ux, I want them to want to use Lin­ux. I want them to wait anx­ious­ly for the next re­lease of Ubun­tu or Fire­fox or what­ev­er.

And the first step to­wards ex­cel­lence is want­ing to be ex­cel­len­t. If hav­ing to pay noth­ing for Win­dows or Ubun­tu there is a cer­tain­ty that Win­dows will win, then Ubun­tu freak­ing sucks and needs to im­prove. Peo­ple are not adopt­ing it even if it's free? Then some­thing is wrong, and fig­ur­ing out what is im­por­tan­t.

But even more im­por­tant than find­ing the miss­ing piece is know­ing a piece is miss­ing. Open source has grown com­pla­cen­t. It's grown self right­eous. It's be­come ado­les­cen­t, sure of its awe­some­ness and im­mor­tal­i­ty.

I don't be­lieve in many things, but I do be­lieve in free will. I be­lieve that peo­ple are not mo­ron­s, I be­lieve that if they pre­fer Win­dows, it's be­cause it does some­thing bet­ter, and I be­lieve that what­ev­er that is (and I don't re­al­ly know what it may be), it can be found, and can be im­proved, and can be re­placed, and oth­er things can be added, and peo­ple will want to use the bet­ter prod­uc­t.

And if they don't... well, at least we fought an hon­est fight, and we did our best, and we (hope­ful­ly) had fun in the pro­cess, and pushed the en­velope, and cre­at­ed nice things, and the users are bet­ter off in the end even if our ba­bies are not the cho­sen ones, be­cause we raised the lev­el of ev­ery­thing.

For ex­am­ple, be­fore Lin­ux, Win­dows sucked much, much more than it does now, and I think many of those im­prove­ments were be­cause of Lin­ux, and I am hap­py that to­day Win­dows users have a OS that does­n't stink.

I want free and open source soft­ware to be used be­cause it's awe­some, not be­cause it's cheap. Awe­some and cheap I can live with. Just cheap? That suck­s.

And the con­stant "they use win­dows be­cause they don't know bet­ter"? That's pa­tron­iz­ing and con­de­scend­ing, and very, very an­noy­ing. And if it an­noys me, who is not the tar­get of the lame con­de­scen­sion, trust me, it an­noys the crap out of Win­dows user­s.

Grow a spine, get your ass­es in­to gear, start mak­ing awe­some stuff, kick ass with qual­i­ty. That's why we are here. Not to be the cheap­est date in town.

Perdido Street Station (New Crobuzon, #1)

Cover for Perdido Street Station (New Crobuzon, #1)


Is this book per­fec­t? No. The plot me­an­ders a bit, it turns in­to a mon­ster hunter sto­ry in the mid­dle, the au­thor has more words for black and dirty than the av­er­age in­huit has for snow, but... it's still very, very, very good.

Goodreads+webcam+python+zbar == hackfun!

I am a big fan of GoodReads a so­cial net­work for peo­ple who read book­s.

I read a lot, and I like that I can see what oth­er peo­ple think be­fore start­ing a book, and I can put my short re­views, and I can see what I have been read­ing, and lots more.

In fac­t, goodreads is go­ing to be a big part of a project I am start­ing with some PyAr guys.

One thing I have been lazy about is adding my book list to goodread­s, be­cause it's a bit of a chore.

Well, chore no more!

Here's how to do it, the hack­er way...

  1. Get zbar

  2. Get a cheap we­b­­cam

  3. Get a book

  4. Get a 7-­­line python pro­­gram (in­­clud­ed be­low)

Now watch the video...

Cute, is­n't it?

Here's the code:

import os

while True:
    code = p.readline()
    print 'Got barcode:', code
    isbn = code.split(':')[1]

PET: English Translation Issue 1 has a date

Be­cause it worked on­ce, let's do it again. I have just set a com­plete­ly ar­bi­trary, and prob­a­bly too ear­ly date for the re­lease of the first eng­lish Is­sue of "PET: Python En­tre To­dos" mag­a­zine.

The eng­lish ver­sion is called PET, which means "Python En­tre To­dos: Eng­lish Trans­la­tion".

It will have the same con­tents as the first span­ish Is­sue and... it will be the last Is­sue done like this.

From now on, both ver­sions will be pub­lished at the same time, if we can.

So, there will be a very short gap be­tween the eng­lish first Is­sue and the sec­ond one (less than a mon­th, we hope).

So, stay tuned

Contents © 2000-2023 Roberto Alsina