Re: Linux/Windows GUI programming: tk or wx?
On 2017-08-05, Chris Green wrote: > Michael Torrie wrote: > > I went through a similar process of deciding the easiest (for me) GUI > to go with. I've actually ended up with PyGtk as it feels for me the > 'least foreign' compared with doing things the CLI way. I definitely think PyGtk feels the "most Pythonic". It seems simpler than wx, yet is able to handle complex applications. The last time I read up on it, it didn't sound like a very good option if you want Windows compatibility. If I hadn't cared about Windows, I definitely would have picked PyGtk over wx. I haven't used it in a while, and I don't the state of gtk2 vs. gtk3 (pygobject). -- Grant Edwards grant.b.edwardsYow! ... I want a COLOR at T.V. and a VIBRATING BED!!! gmail.com -- https://mail.python.org/mailman/listinfo/python-list
Re: Linux/Windows GUI programming: tk or wx?
Hi, Grant, On Mon, Aug 7, 2017 at 10:37 AM, Grant Edwards wrote: > On 2017-08-05, Michael Torrie wrote: > >> Well tk is already an optional part of the Python standard library, >> whereas wx is an external package. So for your simple requirements, >> Tk may be the way to go. > > I find it much easier to get a simple application written and working > with Tk than with wx. However, once the size/complexity increases > beyond a certain point, I find wx to be less work. What version of wx/python did you try? It is very easy to work with wx{Python, Phoenix} no matter which application {complexity} we are talking about. There are a lot of samples/demos on the wxpython web site. Thank you. > >> I'm guessing the tk would result in the >> smallest executable as well, though I could be very wrong. > > The last time I compared wx vs tk bundled sizes using py2exe (for a > fairly simple application), using tk generated far larger .exe files. > > When you use Tk, it pulls in a complete TCL implementation as well as > the Tk libraries (which contain way more library files than wx -- > IIRC, there was a _lot_ of localization stuff in the Tk libraries). > > -- > Grant Edwards grant.b.edwardsYow! ... he dominates the > at DECADENT SUBWAY SCENE. > gmail.com > > -- > https://mail.python.org/mailman/listinfo/python-list -- https://mail.python.org/mailman/listinfo/python-list
Re: Linux/Windows GUI programming: tk or wx?
On 2017-08-05, Michael Torrie wrote: > Well tk is already an optional part of the Python standard library, > whereas wx is an external package. So for your simple requirements, > Tk may be the way to go. I find it much easier to get a simple application written and working with Tk than with wx. However, once the size/complexity increases beyond a certain point, I find wx to be less work. > I'm guessing the tk would result in the > smallest executable as well, though I could be very wrong. The last time I compared wx vs tk bundled sizes using py2exe (for a fairly simple application), using tk generated far larger .exe files. When you use Tk, it pulls in a complete TCL implementation as well as the Tk libraries (which contain way more library files than wx -- IIRC, there was a _lot_ of localization stuff in the Tk libraries). -- Grant Edwards grant.b.edwardsYow! ... he dominates the at DECADENT SUBWAY SCENE. gmail.com -- https://mail.python.org/mailman/listinfo/python-list
Re: Linux/Windows GUI programming: tk or wx?
On 08/05/2017 04:52 AM, Chris Green wrote: > I went through a similar process of deciding the easiest (for me) GUI > to go with. I've actually ended up with PyGtk as it feels for me the > 'least foreign' compared with doing things the CLI way. Yes PyGtk is fairly Pythonic and natural feeling. PyQt feels more like a thin wrapper around the C++ API, because that's what it is. In other words you feel like you're programming in C++ using Python syntax. Unfortunately the GTK3 bindings are much less pythonic than PyGTK (GTK2). The bindings work through the GTK introspection mechanism so the resulting in a thinner abstraction layer, and exposing a bit more of GTK's C-isms to you. It's been a while since I used it so I can't point to a concrete example of what I mean, but it's just more of a general feel. The upside to the new binding system for GTK3 is that any library based on Glib and GTK3 can be accessed via Python now, even third-party ones. GTK2 is no longer under active development so if you still use PyGTK, you really should start porting your projects to PyGObject and GTK3. In the end I choose to use PyQt or PySide because Qt has the best cross-platform support of all the toolkits. Windows and Mac support in GTK3 is there, but it lags way behind the Linux version. and it doesn't integrate the look and feel as well as Qt does. -- https://mail.python.org/mailman/listinfo/python-list
Re: Linux/Windows GUI programming: tk or wx?
On 8/5/2017 1:45 AM, Ulli Horlacher wrote: Any kind of installer is not acceptable. Is the requirement "no installer" or "single file" or both? You can satisfy the "no installer" requirement also by just distributing the .py file, the interpreter and a .bat file that e.g. contains "python27\python.exe programm.py". I have been doing this for years, sometimes just letting people run the .bat from a network share. Is there a recommendation for using tk or wx? I would recommend wx. For Python 2.7 you can use either the 'Classic' version 3 or the new version 4 called 'Phoenix'. I have been using Python 2 plus Classic for 15 years and have switched to Python 3 and Phoenix a year ago. If you plan to switch to Python 3 at any time then go for Phoenix right now. The pyinstaller may not yet support Phoenix, which is e.g. required for Python 3. So you may be restricted to the Classic version. Classic: https://sourceforge.net/projects/wxpython/files/wxPython/3.0.2.0/ Phoenix: https://pypi.python.org/pypi/wxPython/4.0.0b1 (It's still beta, but is perfectly usable.) For documentation, get the book "wxPython in Action". For questions there's a helpful mailing list wxpython-users. If your requirement is basically to have some user input forms, then you should give wxGlade a try (use the version from the repository https://bitbucket.org/wxglade/wxglade/get/default.zip as a release is in preparation; then press F1 for the tutorial). A GUI builder should make the start much easier, especially when it comes to Sizers (the layout managers). Regards, Dietmar -- https://mail.python.org/mailman/listinfo/python-list
Re: Linux/Windows GUI programming: tk or wx?
Michael Torrie wrote: > On 08/04/2017 05:45 PM, Ulli Horlacher wrote: > > I have to transfer a python 2.7 CLI programm into one with a (simple) GUI. > > The program must run on Linux and Windows and must be compilable with > > pyinstall, because I have to ship a standalone windows.exe > > Any kind of installer is not acceptable. > > > > Reading https://github.com/pyinstaller/pyinstaller/wiki/Supported-Packages > > supported GUI packages are PyGTK, PyQt4, PyQt5, wxPython > > I have tested tkinter by myself and it works, too. > > I do not like GTK and Qt, because they are too complex. > > > > I want to do VERY simple things and I prefer a simple GUI toolkit :-) > > > > Is there a recommendation for using tk or wx? > > Well tk is already an optional part of the Python standard library, > whereas wx is an external package. So for your simple requirements, Tk > may be the way to go. I'm guessing the tk would result in the smallest > executable as well, though I could be very wrong. > > As for Qt, it's a large library, but it's not as complex as you think. > In fact for simple GUIs it's no more complicated than wx or tk. So > don't discount PyQt as being unworkable, though you do need to be aware > of PyQt's license, which might be incompatible with your needs (it's GPL > only unless you pay for it). PySide is largely compatible with PyQt > code and is LGPL instead of GPL, so that could be an option as well. > I went through a similar process of deciding the easiest (for me) GUI to go with. I've actually ended up with PyGtk as it feels for me the 'least foreign' compared with doing things the CLI way. -- Chris Green · -- https://mail.python.org/mailman/listinfo/python-list
Re: Linux/Windows GUI programming: tk or wx?
On 8/5/2017 2:45 AM, Ulli Horlacher wrote: I do not like GTK and Qt, because they are too complex. I'm not a programmer, but at least simple cross platform GUI notification message was easiest to do with PyQt (IMO). -- https://mail.python.org/mailman/listinfo/python-list
Re: Linux/Windows GUI programming: tk or wx?
Am 05.08.17 um 01:45 schrieb Ulli Horlacher: I have to transfer a python 2.7 CLI programm into one with a (simple) GUI. The program must run on Linux and Windows and must be compilable with pyinstall, because I have to ship a standalone windows.exe Any kind of installer is not acceptable. TkInter works with pyinstaller, done that before. Also I suspect you are continuing your work with the file transfer service, and in that case, congratulations that you came to the conclusion to do a proper GUI ;) Back then I even created a "getting started" version for you, see here: https://groups.google.com/d/msg/comp.lang.python/AB42dD5xB_U/pYG6-rnMBQAJ Maybe it is useful now. If you replace the "askopenfilename" by "askopenfilenames", it will allow to select multiple files and return them as a list. Christian -- https://mail.python.org/mailman/listinfo/python-list
Re: Linux/Windows GUI programming: tk or wx?
On 08/04/2017 05:45 PM, Ulli Horlacher wrote: > I have to transfer a python 2.7 CLI programm into one with a (simple) GUI. > The program must run on Linux and Windows and must be compilable with > pyinstall, because I have to ship a standalone windows.exe > Any kind of installer is not acceptable. > > Reading https://github.com/pyinstaller/pyinstaller/wiki/Supported-Packages > supported GUI packages are PyGTK, PyQt4, PyQt5, wxPython > I have tested tkinter by myself and it works, too. > I do not like GTK and Qt, because they are too complex. > > I want to do VERY simple things and I prefer a simple GUI toolkit :-) > > Is there a recommendation for using tk or wx? Well tk is already an optional part of the Python standard library, whereas wx is an external package. So for your simple requirements, Tk may be the way to go. I'm guessing the tk would result in the smallest executable as well, though I could be very wrong. As for Qt, it's a large library, but it's not as complex as you think. In fact for simple GUIs it's no more complicated than wx or tk. So don't discount PyQt as being unworkable, though you do need to be aware of PyQt's license, which might be incompatible with your needs (it's GPL only unless you pay for it). PySide is largely compatible with PyQt code and is LGPL instead of GPL, so that could be an option as well. -- https://mail.python.org/mailman/listinfo/python-list
Linux/Windows GUI programming: tk or wx?
I have to transfer a python 2.7 CLI programm into one with a (simple) GUI. The program must run on Linux and Windows and must be compilable with pyinstall, because I have to ship a standalone windows.exe Any kind of installer is not acceptable. Reading https://github.com/pyinstaller/pyinstaller/wiki/Supported-Packages supported GUI packages are PyGTK, PyQt4, PyQt5, wxPython I have tested tkinter by myself and it works, too. I do not like GTK and Qt, because they are too complex. I want to do VERY simple things and I prefer a simple GUI toolkit :-) Is there a recommendation for using tk or wx? -- Ullrich Horlacher Server und Virtualisierung Rechenzentrum TIK Universitaet Stuttgart E-Mail: horlac...@tik.uni-stuttgart.de Allmandring 30aTel:++49-711-68565868 70569 Stuttgart (Germany) WWW:http://www.tik.uni-stuttgart.de/ -- https://mail.python.org/mailman/listinfo/python-list