Re: [Python-ideas] Using Python for end user applications

On Tue, Feb 7, 2017, at 02:29 PM, Steve Dower wrote:
I think what we really want is a self-extractor that "installs" into the user's AppData directory without prompting for admin.
There's a PR in the works for Pynsist that will add a non-admin per-user install into AppData: https://github.com/takluyver/pynsist/pull/100 Because of the way permissions work on Windows, if you do have admin privileges, the installer will still request them so that it can offer you the choice of a systemwide installation. But if you don't, it should happily do a user installation without them.
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. Thomas

On 7 February 2017 at 15:47, Thomas Kluyver <thomas@kluyver.me.uk> wrote:
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@gmail.com | Brisbane, Australia

This could change when webassembly is stable. If we manage to make a Python => webassembly compiler, I doubt it will make Python in the browser happen. But it certainly can make Python in NodeJS happen, and so in Electron apps. Le 09/02/2017 à 19:56, Nick Coghlan a écrit :

On 7 February 2017 at 15:47, Thomas Kluyver <thomas@kluyver.me.uk> wrote:
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@gmail.com | Brisbane, Australia

This could change when webassembly is stable. If we manage to make a Python => webassembly compiler, I doubt it will make Python in the browser happen. But it certainly can make Python in NodeJS happen, and so in Electron apps. Le 09/02/2017 à 19:56, Nick Coghlan a écrit :
participants (3)
-
Michel Desmoulin
-
Nick Coghlan
-
Thomas Kluyver