Re: [BangPypers] What are you using for developing desktop GUIs?
On Fri, Sep 27, 2013 at 2:25 AM, Bibhas m...@bibhas.in wrote: I used Kivy a year back. Not sure of it's state now. You could look into it once. +1 for Kivy (under active development). The same code runs unmodified on Linux, OSX, Windows, Android and iOS (ofcourse, if device in question does not has for instance multi-touch support, then corresponding features won't work; or work in some kind of fallback mode). Guido himself recommended Kivy (though he recommended it specifically for developing mobile apps in Python): https://twitter.com/gvanrossum/status/342145797770604545 Shabda Raaj sha...@agiliq.com wrote: I am building my first desktop app with Python and I would like to get recommendation on what toolkit to use. I am planning to use either PyGTK or PyQT. (Are there anything else I should consider.) I see a lot of outdated, unmaintained tutorials about these. I am looking for modern, opinionated tutorials/books about GUI programming for Python. -- Amber Jain i.amber.j...@gmail.com http://amberj.devio.us/ ___ BangPypers mailing list BangPypers@python.org https://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] What are you using for developing desktop GUIs?
On Fri, Sep 27, 2013 at 2:49 AM, Amber Jain i.amber.j...@gmail.com wrote: On Fri, Sep 27, 2013 at 2:25 AM, Bibhas m...@bibhas.in wrote: I used Kivy a year back. Not sure of it's state now. You could look into it once. +1 for Kivy (under active development). The same code runs unmodified on Linux, OSX, Windows, Android and iOS (ofcourse, if device in question does not has for instance multi-touch support, then corresponding features won't work; or work in some kind of fallback mode). Guido himself recommended Kivy (though he recommended it specifically for developing mobile apps in Python): https://twitter.com/gvanrossum/status/342145797770604545 Is kivy comparably good enough for desktop based development as desktop focused toolkits are? Shabda Raaj sha...@agiliq.com wrote: I am building my first desktop app with Python and I would like to get recommendation on what toolkit to use. I am planning to use either PyGTK or PyQT. (Are there anything else I should consider.) I see a lot of outdated, unmaintained tutorials about these. I am looking for modern, opinionated tutorials/books about GUI programming for Python. -- Amber Jain i.amber.j...@gmail.com http://amberj.devio.us/ ___ BangPypers mailing list BangPypers@python.org https://mail.python.org/mailman/listinfo/bangpypers ___ BangPypers mailing list BangPypers@python.org https://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] What are you using for developing desktop GUIs?
On Fri, Sep 27, 2013 at 1:14 PM, Dhananjay Nene dhananjay.n...@gmail.comwrote: +1 for Kivy (under active development). The same code runs unmodified on Linux, OSX, Windows, Android and iOS (ofcourse, if device in question does not has for instance multi-touch support, then corresponding features won't work; or work in some kind of fallback mode). Guido himself recommended Kivy (though he recommended it specifically for developing mobile apps in Python): https://twitter.com/gvanrossum/status/342145797770604545 Is kivy comparably good enough for desktop based development as desktop focused toolkits are? Adding to that, are there any thoughts from people who have used kivy apps across OSes and devices ? Especially on interaction and look and feel as these are traditionally hard to get right across platforms. -- Vinayak ___ BangPypers mailing list BangPypers@python.org https://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] What are you using for developing desktop GUIs?
Kivy is good for multiplatform. But at that time we had to ditch it because it requires OpenGL = 2.0. That means computers with older graphics driver would have suffered. And we didn't have any way to solve that. The look and feel is kind of like AOSP ICS of Android. Looks different from the other options. Vinayak Hegde vinay...@gmail.com wrote: On Fri, Sep 27, 2013 at 1:14 PM, Dhananjay Nene dhananjay.n...@gmail.comwrote: +1 for Kivy (under active development). The same code runs unmodified on Linux, OSX, Windows, Android and iOS (ofcourse, if device in question does not has for instance multi-touch support, then corresponding features won't work; or work in some kind of fallback mode). Guido himself recommended Kivy (though he recommended it specifically for developing mobile apps in Python): https://twitter.com/gvanrossum/status/342145797770604545 Is kivy comparably good enough for desktop based development as desktop focused toolkits are? Adding to that, are there any thoughts from people who have used kivy apps across OSes and devices ? Especially on interaction and look and feel as these are traditionally hard to get right across platforms. -- Vinayak ___ BangPypers mailing list BangPypers@python.org https://mail.python.org/mailman/listinfo/bangpypers -- Thanks Bibhas http://bibhas.in Sent from my Android device with K-9 Mail. Please excuse my brevity. ___ BangPypers mailing list BangPypers@python.org https://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] What are you using for developing desktop GUIs?
Here is a reddit conversation[1] that might give some feedback. I haven't used other UI frameworks, so can't say anything specifically. Some other threads like this[2] should make you try it atleast once. [1]: http://www.reddit.com/r/Python/comments/1c08rl/kivy_for_desktop_apps/ [2]: http://www.reddit.com/r/Python/comments/14287d/sick_at_home_today_so_decided_to_try_out_kivy/ On Friday 27 September 2013 01:14 PM, Dhananjay Nene wrote: On Fri, Sep 27, 2013 at 2:49 AM, Amber Jain i.amber.j...@gmail.com wrote: On Fri, Sep 27, 2013 at 2:25 AM, Bibhas m...@bibhas.in wrote: I used Kivy a year back. Not sure of it's state now. You could look into it once. +1 for Kivy (under active development). The same code runs unmodified on Linux, OSX, Windows, Android and iOS (ofcourse, if device in question does not has for instance multi-touch support, then corresponding features won't work; or work in some kind of fallback mode). Guido himself recommended Kivy (though he recommended it specifically for developing mobile apps in Python): https://twitter.com/gvanrossum/status/342145797770604545 Is kivy comparably good enough for desktop based development as desktop focused toolkits are? Shabda Raaj sha...@agiliq.com wrote: I am building my first desktop app with Python and I would like to get recommendation on what toolkit to use. I am planning to use either PyGTK or PyQT. (Are there anything else I should consider.) I see a lot of outdated, unmaintained tutorials about these. I am looking for modern, opinionated tutorials/books about GUI programming for Python. -- Amber Jain i.amber.j...@gmail.com http://amberj.devio.us/ ___ BangPypers mailing list BangPypers@python.org https://mail.python.org/mailman/listinfo/bangpypers ___ BangPypers mailing list BangPypers@python.org https://mail.python.org/mailman/listinfo/bangpypers ___ BangPypers mailing list BangPypers@python.org https://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] What are you using for developing desktop GUIs?
On Fri, Sep 27, 2013 at 2:19 AM, Shabda Raaj sha...@agiliq.com wrote: I am building my first desktop app with Python and I would like to get recommendation on what toolkit to use. I am planning to use either PyGTK or PyQT. (Are there anything else I should consider.) I always write them as webapps - and ship them with embedded tornado web server. You can strip it down to bare minimum, or choose lighter weight 'frameworks' if you wish. There are plenty of advantages to this general approach: a) your app will look the same across all your platforms (at least the best it can be) as the front end is html/css/js b) you don't have to learn a new widget library c) your are building reusable code and skills that you can carry across even programming languages. If you use mustache templates, for e.g., you can even reuse the templates wholesale in other projects written in ruby, for e.g. ___ BangPypers mailing list BangPypers@python.org https://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] What are you using for developing desktop GUIs?
On Fri, Sep 27, 2013 at 6:52 PM, Sriram Karra karra@gmail.com wrote: On Fri, Sep 27, 2013 at 2:19 AM, Shabda Raaj sha...@agiliq.com wrote: I am building my first desktop app with Python and I would like to get recommendation on what toolkit to use. I am planning to use either PyGTK or PyQT. (Are there anything else I should consider.) I always write them as webapps - and ship them with embedded tornado web server. You can strip it down to bare minimum, or choose lighter weight 'frameworks' if you wish. There are plenty of advantages to this general approach: a) What are sample installers one could use to install web based apps on user's machine (users more often than not use simple wizards to install apps) b) Do you start up app by default ? If so can the installer integrate into the native service system to start / stop the webapp ? c) If you do not start app by default, how easy is it for users to start and stop the webapp. d) Do you offer any integration in the system tray to shut down the app if the user is in a memory hungry situation and would prefer to shutdown your app to conserve memory e) Do you undergo security audits ? If so, what issues come up in the discussions that wouldn't have come up in pure desktop apps ? a) your app will look the same across all your platforms (at least the best it can be) as the front end is html/css/js b) you don't have to learn a new widget library c) your are building reusable code and skills that you can carry across even programming languages. If you use mustache templates, for e.g., you can even reuse the templates wholesale in other projects written in ruby, for e.g. ___ BangPypers mailing list BangPypers@python.org https://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] What are you using for developing desktop GUIs?
Sriram Karra karra@gmail.com writes: [...] I always write them as webapps - and ship them with embedded tornado web server. You can strip it down to bare minimum, or choose lighter weight 'frameworks' if you wish. There are plenty of advantages to this general approach: I personally dislike applications that start a local web server. I look for non web apps for most things because they're responsive, integrate better with the desktop and have generally better UX considerations than web apps. I'd use web if I wanted to make it available for the general public. Never for local apps. a) your app will look the same across all your platforms (at least the best it can be) as the front end is html/css/js I think you'll get the common denominator. c) your are building reusable code and skills that you can carry across even programming languages. If you use mustache templates, for e.g., you can even reuse the templates wholesale in other projects written in ruby, Yes but writing desktop apps is different from writing web apps. You can do things with the former that are still not possible with the latter. Why do this just to avoid learning something new? [...] -- Cordially, Noufal http://nibrahim.net.in ___ BangPypers mailing list BangPypers@python.org https://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] What are you using for developing desktop GUIs?
On Fri, Sep 27, 2013 at 7:06 PM, Dhananjay Nene dhananjay.n...@gmail.comwrote: a) What are sample installers one could use to install web based apps on user's machine (users more often than not use simple wizards to install apps) It is a standard python application with a web server included - the server and client are on the same machine, that is all. So there are no special requirements, per se. b) Do you start up app by default ? If so can the installer integrate into the native service system to start / stop the webapp? I have not done this. The invocation is explicitly on demand. It is trivial to protect against multiple invocations of the program, and to support a 'Exit Program' action on the front end that will shut down the web server. c) If you do not start app by default, how easy is it for users to start and stop the webapp. It is as easy as any other program. To give you an example, take a look at a sample: https://github.com/skarra/PRS Here I require that the user have python installed. The main python driver is called prs.pyw (for Windows) - the user has to double click on that file. For use on other systems I have a symlink the py file to the pyw. d) Do you offer any integration in the system tray to shut down the app if the user is in a memory hungry situation and would prefer to shutdown your app to conserve memory I have not tried this. But I am sure the answer to such question lies in platform specific libraries. For e.g. on Windows Pywin32 can do wonders. But again, these issues have to be solved regardless of what widget library you use, or you go the tornado route. e) Do you undergo security audits ? If so, what issues come up in the discussions that wouldn't have come up in pure desktop apps ? I do not do this stuff commercially. So have not had to deal with this. But *again* - no one needs to even bother that this is a 'webapp' - the entire thing runs on your desktop and will work even without an internet connection. ___ BangPypers mailing list BangPypers@python.org https://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] What are you using for developing desktop GUIs?
On Fri, Sep 27, 2013 at 7:15 PM, Noufal Ibrahim nou...@nibrahim.net.inwrote: a) your app will look the same across all your platforms (at least the best it can be) as the front end is html/css/js I think you'll get the common denominator. Isn't that the case with any cross-platform toolkit - if the intent is to be cross platform? c) your are building reusable code and skills that you can carry across even programming languages. If you use mustache templates, for e.g., you can even reuse the templates wholesale in other projects written in ruby, Yes but writing desktop apps is different from writing web apps. You can do things with the former that are still not possible with the latter. Can you give some specific examples of what is possible in a Python app using a cross platform GUI toolkit and NOT possible with a webapp architecture when the web server and the browser are running on the same machine? ___ BangPypers mailing list BangPypers@python.org https://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] What are you using for developing desktop GUIs?
Sriram Karra karra@gmail.com writes: [...] Isn't that the case with any cross-platform toolkit - if the intent is to be cross platform? Yes but going inside the browser is more of a sacrifice than other approaches. I mean, just launching the app will start a web server and then a browser and take you inside there to do a task that should be done locally. You don't get any of the native widgets (which you would if you something like wx) and none of the behaviour you've configured for local GUI apps. I guess YMMV but if a local app launches a web server and a browser to get things done, it's a deal breaker for me. [...] Can you give some specific examples of what is possible in a Python app using a cross platform GUI toolkit and NOT possible with a webapp architecture when the web server and the browser are running on the same machine? Hmmm. That's a good point. You're planning to use the HTML+CSS+JS purely for presentation (instead of a gui toolkit). I suppose most things can be done although perhaps using a combination of HTML/CSS/JS for UI and then sending messages to the backend and doing the work there. This sounds convoluted to me and I think it's overkill for a web app. As for things not possible with a web app that work fine with a GUI, I can think of games and other resource demanding applications but those are not particularly cross platform anyway so you're right. -- Cordially, Noufal http://nibrahim.net.in ___ BangPypers mailing list BangPypers@python.org https://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] What are you using for developing desktop GUIs?
Speaking of embedded web apps, https://en.wikipedia.org/wiki/Chromium_Embedded_Framework https://code.google.com/p/chromiumembedded/ -- Dhruv Baldawa (http://www.dhruvb.com) On Fri, Sep 27, 2013 at 7:35 PM, Noufal Ibrahim nou...@nibrahim.net.inwrote: Sriram Karra karra@gmail.com writes: [...] Isn't that the case with any cross-platform toolkit - if the intent is to be cross platform? Yes but going inside the browser is more of a sacrifice than other approaches. I mean, just launching the app will start a web server and then a browser and take you inside there to do a task that should be done locally. You don't get any of the native widgets (which you would if you something like wx) and none of the behaviour you've configured for local GUI apps. I guess YMMV but if a local app launches a web server and a browser to get things done, it's a deal breaker for me. [...] Can you give some specific examples of what is possible in a Python app using a cross platform GUI toolkit and NOT possible with a webapp architecture when the web server and the browser are running on the same machine? Hmmm. That's a good point. You're planning to use the HTML+CSS+JS purely for presentation (instead of a gui toolkit). I suppose most things can be done although perhaps using a combination of HTML/CSS/JS for UI and then sending messages to the backend and doing the work there. This sounds convoluted to me and I think it's overkill for a web app. As for things not possible with a web app that work fine with a GUI, I can think of games and other resource demanding applications but those are not particularly cross platform anyway so you're right. -- Cordially, Noufal http://nibrahim.net.in ___ BangPypers mailing list BangPypers@python.org https://mail.python.org/mailman/listinfo/bangpypers ___ BangPypers mailing list BangPypers@python.org https://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] What are you using for developing desktop GUIs?
On Fri, Sep 27, 2013 at 7:21 PM, Sriram Karra karra@gmail.com wrote: On Fri, Sep 27, 2013 at 7:06 PM, Dhananjay Nene dhananjay.n...@gmail.comwrote: Overall background: I write desktop apps but not in python, I do write the backends in python. So my desktop awareness is more generic. I did try wxPython years ago but never took it to reasonable stage and not to production either. a) What are sample installers one could use to install web based apps on user's machine (users more often than not use simple wizards to install apps) It is a standard python application with a web server included - the server and client are on the same machine, that is all. So there are no special requirements, per se. In most cases I find users want a installer. Basically just point and click. So if there is no installer where a user selects a install directory and presses a button called install (and perhaps a couple of app specific items), there's a huge support cost due to users being not able to install apps successfully. I presume what you mean by a standard python application, but if it means a user having to install python if not installed, create a virtualenv, run pip install, create desktop shortcuts to start / stop servers, in most cases it is very very unlikely to work with lay end users. (Much of this applies to desktop based apps as well). b) Do you start up app by default ? If so can the installer integrate into the native service system to start / stop the webapp? I have not done this. The invocation is explicitly on demand. It is trivial to protect against multiple invocations of the program, and to support a 'Exit Program' action on the front end that will shut down the web server. Ok. I've never tried this. Perhaps it is trivial. But shutting down a server even as the controller is processing a request may potentially be hard. Perhaps one could set a timeout to allow the request to complete and then trigger a shutdown. c) If you do not start app by default, how easy is it for users to start and stop the webapp. It is as easy as any other program. To give you an example, take a look at a sample: https://github.com/skarra/PRS Ok, I am not particularly familiar with how the windows integration works so am not able to quickly figure it out. Here I require that the user have python installed. The main python driver is called prs.pyw (for Windows) - the user has to double click on that file. For use on other systems I have a symlink the py file to the pyw. The difficulty is that the user may have multiple versions of python installed and/or his default version may not be compatible with the one you want. Plus virtualenv specific for your app will need to be configured. d) Do you offer any integration in the system tray to shut down the app if the user is in a memory hungry situation and would prefer to shutdown your app to conserve memory I have not tried this. But I am sure the answer to such question lies in platform specific libraries. For e.g. on Windows Pywin32 can do wonders. But again, these issues have to be solved regardless of what widget library you use, or you go the tornado route. You did mention reusable code. Service integration, system tray integration etc. are all cross platform issues that are introduced when you install a web app on a desktop (desktop apps usually do not have these issues since they exit when user presses exit, and usually always keep an application window open for the user to find the exit button from. So there's still a few skills you need to pick up and in this case they are platform specific (at least I am not aware of platform neutral solutions) You also open yourself up to cross browser portability issues. Also having to deal with older vs newer browsers (IE6??). Which if you were using a standard widget library wouldn't have worried you. e) Do you undergo security audits ? If so, what issues come up in the discussions that wouldn't have come up in pure desktop apps ? I do not do this stuff commercially. So have not had to deal with this. But *again* - no one needs to even bother that this is a 'webapp' - the entire thing runs on your desktop and will work even without an internet connection. At the minimum you have an open port. You probably need to restrict traffic only from localhost. In addition you need to worry about SQL injection, XSS, XSRF, and a bunch of other alphabet soup combinations. Desktop apps don't need to worry about many of these (though they can fall prey to some of these as well, its much harder to write an insecure desktop app than an insecure webapp). I don't mean to suggest it is wrong or inappropriate to use webapps as desktop apps. But just wanted to point out there are a whole bunch of counter issues as well that need to be dealt with. Dhananjay ___ BangPypers mailing list BangPypers@python.org
Re: [BangPypers] What are you using for developing desktop GUIs?
On Fri, Sep 27, 2013 at 7:35 PM, Noufal Ibrahim nou...@nibrahim.net.in wrote: Sriram Karra karra@gmail.com writes: [...] Isn't that the case with any cross-platform toolkit - if the intent is to be cross platform? Yes but going inside the browser is more of a sacrifice than other approaches. I mean, just launching the app will start a web server and then a browser and take you inside there to do a task that should be done locally. You don't get any of the native widgets (which you would if you something like wx) and none of the behaviour you've configured for local GUI apps. I guess YMMV but if a local app launches a web server and a browser to get things done, it's a deal breaker for me. [...] Can you give some specific examples of what is possible in a Python app using a cross platform GUI toolkit and NOT possible with a webapp architecture when the web server and the browser are running on the same machine? Event loops and asynchronous updates on the UI are much easier to handle within a desktop app than writing JS+AJAX imo. Also Rich UIs where you have lots of panels and components and based on data entered in one you want to enable / disable or modify other panels is much easier handled in desktop UIs since they have a easier event propagation and listener models. The same can be done in Javascript, but can get a lot more painful. On both the points, YMMV Hmmm. That's a good point. You're planning to use the HTML+CSS+JS purely for presentation (instead of a gui toolkit). I suppose most things can be done although perhaps using a combination of HTML/CSS/JS for UI and then sending messages to the backend and doing the work there. This sounds convoluted to me and I think it's overkill for a web app. As for things not possible with a web app that work fine with a GUI, I can think of games and other resource demanding applications but those are not particularly cross platform anyway so you're right. ___ BangPypers mailing list BangPypers@python.org https://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] What are you using for developing desktop GUIs?
On Fri, Sep 27, 2013 at 8:55 PM, Dhananjay Nene dhananjay.n...@gmail.comwrote: In most cases I find users want a installer. Basically just point and click. So if there is no installer where a user selects a install directory and presses a button called install (and perhaps a couple of app specific items), there's a huge support cost due to users being not able to install apps successfully. I presume what you mean by a standard python application, but if it means a user having to install python if not installed, create a virtualenv, run pip install, create desktop shortcuts to start / stop servers, in most cases it is very very unlikely to work with lay end users. (Much of this applies to desktop based apps as well). None of that pip/virtualenv stuff is required. There are tools available that can convert a python application into a native executable - py2exe for windows, and py2app mac, for. e.g. Once you have the native, self contained executables, they can be wrapped into a msi or dmg package like any other native application. When I said the embedded webapp is like any other python application I wanted to say that the above packaging options area available for a webapp as well - because all the code is pure python and is completely self contained. I hope that was clear. I have not done this. The invocation is explicitly on demand. It is trivial to protect against multiple invocations of the program, and to support a 'Exit Program' action on the front end that will shut down the web server. Ok. I've never tried this. Perhaps it is trivial. But shutting down a server even as the controller is processing a request may potentially be hard. Perhaps one could set a timeout to allow the request to complete and then trigger a shutdown. You should definitely fire up the PRS program below, and look at how the shutdown action is triggered and handled in the controller. My guess is you will find it very straightforward. It is as easy as any other program. To give you an example, take a look at a sample: https://github.com/skarra/PRS Ok, I am not particularly familiar with how the windows integration works so am not able to quickly figure it out. There is no windows integration of any sort here. If you are using python on Windows already, just clone that repo and double click on the file called prs.pyw - that is all you need to start the program. The difficulty is that the user may have multiple versions of python installed and/or his default version may not be compatible with the one you want. Plus virtualenv specific for your app will need to be configured. As explained above, the py2exe / py2app type programs are able to make completely self contained native executables. You did mention reusable code. Service integration, system tray integration etc. are all cross platform issues that are introduced when you install a web app on a desktop I do not know if there are any cross-platform python libraries that take care of issues such as this. I will only say that the webapp approach to cross-platform UI programming does not put you at any greater disadvantage than using a UI toolkit. Remember the original topic was discussion on UI toolkits! You also open yourself up to cross browser portability issues. Also having to deal with older vs newer browsers (IE6??). Which if you were using a standard widget library wouldn't have worried you. That is definitely very true. But in this day and age of html5 boilerplate, twitter bootstrap, jquery, etc. this particular problem can be considered well under control. At the minimum you have an open port. You probably need to restrict traffic only from localhost. Yes, and this is done very easily, I am sure agree. In addition you need to worry about SQL injection, XSS, XSRF, and a bunch of other alphabet soup combinations. I would image these are all non-issues if you reject all connections not from localhost as discussed above? I don't mean to suggest it is wrong or inappropriate to use webapps as desktop apps. But just wanted to point out there are a whole bunch of counter issues as well that need to be dealt with. Absolutely. It is definitely constructive and instructive to think about all angles - even if just to understand the limits of a given approach. Thank you for this conversation. ___ BangPypers mailing list BangPypers@python.org https://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] What are you using for developing desktop GUIs?
On Fri, Sep 27, 2013 at 7:35 PM, Noufal Ibrahim nou...@nibrahim.net.inwrote: I guess YMMV but if a local app launches a web server and a browser to get things done, it's a deal breaker for me. In this case starting a web server can be nothing more than executing a few hundreds of lines of python code that just happens to talk http and wsgi. It is more of a mental block than anything! I know because I had to fight it too :) The user does not need to know or care. Interacting with a browser tab is likely to be a bit more of a hurdle, particularly if the user opens your app twice and ends up with two browser tabs with your app, etc. It is certainly a possibility that some users will feel a bit disoriented. ___ BangPypers mailing list BangPypers@python.org https://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] What are you using for developing desktop GUIs?
On Fri, Sep 27, 2013 at 10:04 PM, Sriram Karra karra@gmail.com wrote: On Fri, Sep 27, 2013 at 8:55 PM, Dhananjay Nene dhananjay.n...@gmail.comwrote: In most cases I find users want a installer. Basically just point and click. So if there is no installer where a user selects a install directory and presses a button called install (and perhaps a couple of app specific items), there's a huge support cost due to users being not able to install apps successfully. I presume what you mean by a standard python application, but if it means a user having to install python if not installed, create a virtualenv, run pip install, create desktop shortcuts to start / stop servers, in most cases it is very very unlikely to work with lay end users. (Much of this applies to desktop based apps as well). None of that pip/virtualenv stuff is required. There are tools available that can convert a python application into a native executable - py2exe for windows, and py2app mac, for. e.g. Once you have the native, self contained executables, they can be wrapped into a msi or dmg package like any other native application. Ok. I haven't tried them myself ever :( Though usually there's more required during installation (eg. where does the program get installed what directory should data go to etc. Not sure if these get addressed by these. Perhaps there are standard python ways to deal with all such issues that I am unaware of. When I said the embedded webapp is like any other python application I wanted to say that the above packaging options area available for a webapp as well - because all the code is pure python and is completely self contained. I hope that was clear. It wasn't to me, but that could be my shortcoming. I have not done this. The invocation is explicitly on demand. It is trivial to protect against multiple invocations of the program, and to support a 'Exit Program' action on the front end that will shut down the web server. Ok. I've never tried this. Perhaps it is trivial. But shutting down a server even as the controller is processing a request may potentially be hard. Perhaps one could set a timeout to allow the request to complete and then trigger a shutdown. You should definitely fire up the PRS program below, and look at how the shutdown action is triggered and handled in the controller. My guess is you will find it very straightforward. Ok. It is as easy as any other program. To give you an example, take a look at a sample: https://github.com/skarra/PRS Ok, I am not particularly familiar with how the windows integration works so am not able to quickly figure it out. There is no windows integration of any sort here. If you are using python on Windows already, just clone that repo and double click on the file called prs.pyw - that is all you need to start the program. Haven't used windows in ages :( The difficulty is that the user may have multiple versions of python installed and/or his default version may not be compatible with the one you want. Plus virtualenv specific for your app will need to be configured. As explained above, the py2exe / py2app type programs are able to make completely self contained native executables. You did mention reusable code. Service integration, system tray integration etc. are all cross platform issues that are introduced when you install a web app on a desktop I do not know if there are any cross-platform python libraries that take care of issues such as this. I will only say that the webapp approach to cross-platform UI programming does not put you at any greater disadvantage than using a UI toolkit. Remember the original topic was discussion on UI toolkits! My point was that service and system tray integration are usually not required for desktop apps. But if your webapp is going to be explicitly started and stopped by user, it may not be required by such webapps as well. You also open yourself up to cross browser portability issues. Also having to deal with older vs newer browsers (IE6??). Which if you were using a standard widget library wouldn't have worried you. That is definitely very true. But in this day and age of html5 boilerplate, twitter bootstrap, jquery, etc. this particular problem can be considered well under control. At the minimum you have an open port. You probably need to restrict traffic only from localhost. Yes, and this is done very easily, I am sure agree. Yes. In addition you need to worry about SQL injection, XSS, XSRF, and a bunch of other alphabet soup combinations. I would image these are all non-issues if you reject all connections not from localhost as discussed above? I am afraid not. I don't mean to suggest it is wrong or inappropriate to use webapps as desktop apps. But just wanted to point out there are a whole bunch of counter issues as well that need to be dealt with. Absolutely. It is definitely
Re: [BangPypers] What are you using for developing desktop GUIs?
I have spent 10+ years of Desktop app development using VC++/.NET, mostly on Windows. After Windows XP SP 3 onwards, Microsoft changed the application installation and execution architecture, specifically the socket servers, firewall, administrator rights etc. We have WCF Web Service (part of MS .NET framework), which was running on TCP/IP, we have so much of trouble when users install application on their machines. Basic issues are listed here, which are difficult for common users to deal. 1. Anti-virus apps block the socket/outgoing emails/application altogether 2. Firewall blocks the binding to port, incoming/outgoing connections. 3. End user shall not have admin rights to install/run the server applications that especially binds to socket server. 4. Socket port number could have been bind by other process, so we get port bind exceptions. None of above are not part of our application, but affected by external world. Situation is completely based on what user had before, what is there right now, what he/she might have later. On Windows, we use WCF Named Pipe binding now. No more socket related issues. During installation, we install our server as Windows Service with admin rights which uses named pipe (using GUID + some strong identity options for naming pipe). -- Krish On Fri, Sep 27, 2013 at 10:20 PM, Dhananjay Nene dhananjay.n...@gmail.comwrote: On Fri, Sep 27, 2013 at 10:04 PM, Sriram Karra karra@gmail.com wrote: On Fri, Sep 27, 2013 at 8:55 PM, Dhananjay Nene dhananjay.n...@gmail.comwrote: In most cases I find users want a installer. Basically just point and click. So if there is no installer where a user selects a install directory and presses a button called install (and perhaps a couple of app specific items), there's a huge support cost due to users being not able to install apps successfully. I presume what you mean by a standard python application, but if it means a user having to install python if not installed, create a virtualenv, run pip install, create desktop shortcuts to start / stop servers, in most cases it is very very unlikely to work with lay end users. (Much of this applies to desktop based apps as well). None of that pip/virtualenv stuff is required. There are tools available that can convert a python application into a native executable - py2exe for windows, and py2app mac, for. e.g. Once you have the native, self contained executables, they can be wrapped into a msi or dmg package like any other native application. Ok. I haven't tried them myself ever :( Though usually there's more required during installation (eg. where does the program get installed what directory should data go to etc. Not sure if these get addressed by these. Perhaps there are standard python ways to deal with all such issues that I am unaware of. When I said the embedded webapp is like any other python application I wanted to say that the above packaging options area available for a webapp as well - because all the code is pure python and is completely self contained. I hope that was clear. It wasn't to me, but that could be my shortcoming. I have not done this. The invocation is explicitly on demand. It is trivial to protect against multiple invocations of the program, and to support a 'Exit Program' action on the front end that will shut down the web server. Ok. I've never tried this. Perhaps it is trivial. But shutting down a server even as the controller is processing a request may potentially be hard. Perhaps one could set a timeout to allow the request to complete and then trigger a shutdown. You should definitely fire up the PRS program below, and look at how the shutdown action is triggered and handled in the controller. My guess is you will find it very straightforward. Ok. It is as easy as any other program. To give you an example, take a look at a sample: https://github.com/skarra/PRS Ok, I am not particularly familiar with how the windows integration works so am not able to quickly figure it out. There is no windows integration of any sort here. If you are using python on Windows already, just clone that repo and double click on the file called prs.pyw - that is all you need to start the program. Haven't used windows in ages :( The difficulty is that the user may have multiple versions of python installed and/or his default version may not be compatible with the one you want. Plus virtualenv specific for your app will need to be configured. As explained above, the py2exe / py2app type programs are able to make completely self contained native executables. You did mention reusable code. Service integration, system tray integration etc. are all cross platform issues that are introduced when you install a web app on a desktop I do not know if there are any cross-platform python
Re: [BangPypers] What are you using for developing desktop GUIs?
Maybe that's another way of looking at it. It's introducing network related issues when we should be concentrating on building the app that has nothing to do with network, right? That is definitely very true. But in this day and age of html5 boilerplate, twitter bootstrap, jquery, etc. this particular problem can be considered well under control. IMO, you can never trust the user system too much. It is a possible case that the user system doesn't have a browser installed, right? What'd happen then? Any fallback mechanism? On Saturday 28 September 2013 12:04:40 AM IST, Gopalakrishnan Subramani wrote: I have spent 10+ years of Desktop app development using VC++/.NET, mostly on Windows. After Windows XP SP 3 onwards, Microsoft changed the application installation and execution architecture, specifically the socket servers, firewall, administrator rights etc. We have WCF Web Service (part of MS .NET framework), which was running on TCP/IP, we have so much of trouble when users install application on their machines. Basic issues are listed here, which are difficult for common users to deal. 1. Anti-virus apps block the socket/outgoing emails/application altogether 2. Firewall blocks the binding to port, incoming/outgoing connections. 3. End user shall not have admin rights to install/run the server applications that especially binds to socket server. 4. Socket port number could have been bind by other process, so we get port bind exceptions. None of above are not part of our application, but affected by external world. Situation is completely based on what user had before, what is there right now, what he/she might have later. On Windows, we use WCF Named Pipe binding now. No more socket related issues. During installation, we install our server as Windows Service with admin rights which uses named pipe (using GUID + some strong identity options for naming pipe). -- Krish On Fri, Sep 27, 2013 at 10:20 PM, Dhananjay Nene dhananjay.n...@gmail.comwrote: On Fri, Sep 27, 2013 at 10:04 PM, Sriram Karra karra@gmail.com wrote: On Fri, Sep 27, 2013 at 8:55 PM, Dhananjay Nene dhananjay.n...@gmail.comwrote: In most cases I find users want a installer. Basically just point and click. So if there is no installer where a user selects a install directory and presses a button called install (and perhaps a couple of app specific items), there's a huge support cost due to users being not able to install apps successfully. I presume what you mean by a standard python application, but if it means a user having to install python if not installed, create a virtualenv, run pip install, create desktop shortcuts to start / stop servers, in most cases it is very very unlikely to work with lay end users. (Much of this applies to desktop based apps as well). None of that pip/virtualenv stuff is required. There are tools available that can convert a python application into a native executable - py2exe for windows, and py2app mac, for. e.g. Once you have the native, self contained executables, they can be wrapped into a msi or dmg package like any other native application. Ok. I haven't tried them myself ever :( Though usually there's more required during installation (eg. where does the program get installed what directory should data go to etc. Not sure if these get addressed by these. Perhaps there are standard python ways to deal with all such issues that I am unaware of. When I said the embedded webapp is like any other python application I wanted to say that the above packaging options area available for a webapp as well - because all the code is pure python and is completely self contained. I hope that was clear. It wasn't to me, but that could be my shortcoming. I have not done this. The invocation is explicitly on demand. It is trivial to protect against multiple invocations of the program, and to support a 'Exit Program' action on the front end that will shut down the web server. Ok. I've never tried this. Perhaps it is trivial. But shutting down a server even as the controller is processing a request may potentially be hard. Perhaps one could set a timeout to allow the request to complete and then trigger a shutdown. You should definitely fire up the PRS program below, and look at how the shutdown action is triggered and handled in the controller. My guess is you will find it very straightforward. Ok. It is as easy as any other program. To give you an example, take a look at a sample: https://github.com/skarra/PRS Ok, I am not particularly familiar with how the windows integration works so am not able to quickly figure it out. There is no windows integration of any sort here. If you are using python on Windows already, just clone that repo and double click on the file called prs.pyw - that is all you need to start the program. Haven't used windows in ages :( The difficulty is that the
Re: [BangPypers] What are you using for developing desktop GUIs?
Its 2013 and I think its interesting people still want to write desktop apps. If you are already highly skilled in desktop GUIs then it probably makes sense, but browser is definitely the most portable environment for the future. For *most* cases, its usually better that the app is web by default. There are so many open source libraries (widgets, charting engines, UI frameworks) to choose from, so many services to plug in (Maps, Analytics etc) that its a no brainer even for scientific applications. The canvas for the web is just a whole lot wider. Deployment is still an issue, but thanks to broadband - VMs have become the easiest way to evaluate / deploy web apps. On 28-Sep-2013, at 12:21 AM, bangpypers-requ...@python.org wrote: I guess YMMV but if a local app launches a web server and a browser to get things done, it's a deal breaker for me. In this case starting a web server can be nothing more than executing a few hundreds of lines of python code that just happens to talk http and wsgi. It is more of a mental block than anything! I know because I had to fight it too :) The user does not need to know or care. Interacting with a browser tab is likely to be a bit more of a hurdle, particularly if the user opens your app twice and ends up with two browser tabs with your app, etc. It is certainly a possibility that some users will feel a bit disoriented. ___ BangPypers mailing list BangPypers@python.org https://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] What are you using for developing desktop GUIs?
We needed Desktop apps as our apps are based on Hardware interfacing, ie Density, Pressure, Flow etc measuring transmitters and control devices. Those devices use the special industrial protocols and each protocols has its own advantages, need specific device drivers based on vendors. Desktop based solution is 100% expected in this cases. Now we make these Desktop apps as web enabled, that can connect to cloud for data backup or remote connectivity, iphone etc. Web Enabled is not web only option. There are cases that web/internet may not work inside food processing/chemical/refineries industries or you may not get either WIFI or 2G/3G not working due to external interferences such as noise, frequency, heat, gas, air pressure etc. We have cross platform app that works on Windows (.NET), iOS and Android. But that is not build using HTML/CSS/JS instead we use Lua as a common language and we code up each platform to have top level application in native technologies and then use Lua heavily as glue, cross platform. This means, we cannot write everything in Lua, but we can balance between native technologies (Objective C, Java, C#) and cross platform application. Web only is not always reliable, External factors such as network connectivity, modem/routers, bandwidth/speed, latency, fail over and many other stuffs can affect reliability. There are mission critical apps that still needs to work offline/Desktop. For social apps like facebook or twitter or even linkedin and many other social apps, web only option may be good. Building native (native as native) desktop apps using HTML5/CSS/(JS or Python) may not be too long, we need to come out of browser security levels, exposure to local resources to OS kernel/user/gdi objects shall help us to make apps in Desktop only. Mobile world is leading in this initiatives, Desktop world is far behind now. On Sat, Sep 28, 2013 at 12:43 AM, Rushabh Mehta rme...@gmail.com wrote: Its 2013 and I think its interesting people still want to write desktop apps. If you are already highly skilled in desktop GUIs then it probably makes sense, but browser is definitely the most portable environment for the future. For *most* cases, its usually better that the app is web by default. There are so many open source libraries (widgets, charting engines, UI frameworks) to choose from, so many services to plug in (Maps, Analytics etc) that its a no brainer even for scientific applications. The canvas for the web is just a whole lot wider. Deployment is still an issue, but thanks to broadband - VMs have become the easiest way to evaluate / deploy web apps. On 28-Sep-2013, at 12:21 AM, bangpypers-requ...@python.org wrote: I guess YMMV but if a local app launches a web server and a browser to get things done, it's a deal breaker for me. In this case starting a web server can be nothing more than executing a few hundreds of lines of python code that just happens to talk http and wsgi. It is more of a mental block than anything! I know because I had to fight it too :) The user does not need to know or care. Interacting with a browser tab is likely to be a bit more of a hurdle, particularly if the user opens your app twice and ends up with two browser tabs with your app, etc. It is certainly a possibility that some users will feel a bit disoriented. ___ BangPypers mailing list BangPypers@python.org https://mail.python.org/mailman/listinfo/bangpypers ___ BangPypers mailing list BangPypers@python.org https://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] What are you using for developing desktop GUIs?
I used Kivy a year back. Not sure of it's state now. You could look into it once. Shabda Raaj sha...@agiliq.com wrote: I am building my first desktop app with Python and I would like to get recommendation on what toolkit to use. I am planning to use either PyGTK or PyQT. (Are there anything else I should consider.) I see a lot of outdated, unmaintained tutorials about these. I am looking for modern, opinionated tutorials/books about GUI programming for Python. -- Thanks, Shabda Agiliq.com - Building Amazing Apps agiliq.com/blog/ | github.com/agiliq US: +13152854388 | IN: +919949997612 | Skype: shabda.raaj Our Android Apps https://play.google.com/store/apps/developer?id=Agiliq | Our iOS Apps https://itunes.apple.com/us/artist/agiliq/id407918088 ___ BangPypers mailing list BangPypers@python.org https://mail.python.org/mailman/listinfo/bangpypers -- Thanks Bibhas http://bibhas.in Sent from my Android device with K-9 Mail. Please excuse my brevity. ___ BangPypers mailing list BangPypers@python.org https://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] What are you using for developing desktop GUIs?
Shabda Raaj sha...@agiliq.com writes: I am building my first desktop app with Python and I would like to get recommendation on what toolkit to use. I am planning to use either PyGTK or PyQT. (Are there anything else I should consider.) wxpython. It uses the native widgets depending on platform. I see a lot of outdated, unmaintained tutorials about these. I am looking for modern, opinionated tutorials/books about GUI programming for Python. -- Cordially, Noufal http://nibrahim.net.in ___ BangPypers mailing list BangPypers@python.org https://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] What are you using for developing desktop GUIs?
Here is a good documentation for Python bindings of GTK+ 3 bindings: http://python-gtk-3-tutorial.readthedocs.org/en/latest/ On Fri, Sep 27, 2013 at 2:19 AM, Shabda Raaj sha...@agiliq.com wrote: I am building my first desktop app with Python and I would like to get recommendation on what toolkit to use. I am planning to use either PyGTK or PyQT. (Are there anything else I should consider.) I see a lot of outdated, unmaintained tutorials about these. I am looking for modern, opinionated tutorials/books about GUI programming for Python. -- Thanks, Shabda Agiliq.com - Building Amazing Apps agiliq.com/blog/ | github.com/agiliq US: +13152854388 | IN: +919949997612 | Skype: shabda.raaj Our Android Apps https://play.google.com/store/apps/developer?id=Agiliq | Our iOS Apps https://itunes.apple.com/us/artist/agiliq/id407918088 ___ BangPypers mailing list BangPypers@python.org https://mail.python.org/mailman/listinfo/bangpypers ___ BangPypers mailing list BangPypers@python.org https://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] What are you using for developing desktop GUIs?
Take a look at PySide? -- Sent from mobile On Sep 27, 2013 9:24 AM, Noufal Ibrahim nou...@nibrahim.net.in wrote: Shabda Raaj sha...@agiliq.com writes: I am building my first desktop app with Python and I would like to get recommendation on what toolkit to use. I am planning to use either PyGTK or PyQT. (Are there anything else I should consider.) wxpython. It uses the native widgets depending on platform. I see a lot of outdated, unmaintained tutorials about these. I am looking for modern, opinionated tutorials/books about GUI programming for Python. -- Cordially, Noufal http://nibrahim.net.in ___ BangPypers mailing list BangPypers@python.org https://mail.python.org/mailman/listinfo/bangpypers ___ BangPypers mailing list BangPypers@python.org https://mail.python.org/mailman/listinfo/bangpypers