[Python-ideas] Using Python for end user applications

Nick Coghlan ncoghlan at gmail.com
Thu Feb 9 13:56:14 EST 2017


On 7 February 2017 at 15:47, Thomas Kluyver <thomas at kluyver.me.uk> wrote:
> I've been thinking for a while about Python apps using Electron (Positron?
> ;-). It's an interesting idea from the Python side, but I struggle to come
> up with reasons why developing an Electron+Python app would be easier than
> developing a regular Electron app. I prefer writing Python to Javascript,
> but you'd need quite a bit of Javascript anyway, you don't have to care
> about browser compatibility, and there would inevitably be some extra
> friction in using two languages.
>
> I'm sure there are use cases where it makes sense, like if you use Python's
> scientific computing ecosystem. But I don't know how broad they are.

I'd say the rationale for Electron/Python apps is the same as that for
any JS frontend/Python backend configuration - JS/CSS/HTML5 is a great
suite of technologies for defining user interfaces, but you don't
necessarily want to be writing all your application logic in it. (You
certainly *can*, you just may not want to)

The trade-offs are different for client-side apps (since shipping two
different language runtimes is kinda horrible, given neither V8 nor
CPython is particularly lightweight), but it's not *that* different
from the traditional Python GUI app development model of depending on
a C/C++ toolkit like Tcl/Tk, Gtk, Qt, or wxWidgets.

It's just that the modern GUI toolkit is called V8, most of the actual
GUI bits are written in JavaScript rather than C/C++, and the language
independent in-process bindings got fairly dramatically worse along
the way :)

Cheers,
Nick.

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia


More information about the Python-ideas mailing list