Mailing List Archive

Windows Gui Frontend
I have another question. I have an app written in python, but I want to add
a windows GUI front end to it. Can this be done in python? What packages
would allow me to do that?



Thanks.

--
https://mail.python.org/mailman/listinfo/python-list
Re: Windows Gui Frontend [ In reply to ]
On 4/1/2023 7:59 AM, Jim Schwartz wrote:
> I have another question. I have an app written in python, but I want to add
> a windows GUI front end to it. Can this be done in python? What packages
> would allow me to do that?

WxWindows, Tk, and PyQt are some of the common ones. Be aware that GUI
programming can soak up a lot of your time, so be prepared.

If you want it to work on Linux as well (always a good idea), you will
need to pay attention to file locations, paths, and path separators as well.

--
https://mail.python.org/mailman/listinfo/python-list
Re: Windows Gui Frontend [ In reply to ]
On 4/1/23, Jim Schwartz <jschwar@sbcglobal.net> wrote:
> I have another question. I have an app written in python, but I want to
> add a windows GUI front end to it. Can this be done in python? What
> packages would allow me to do that?

Here are a few of the GUI toolkit libraries in common use:

* tkinter (Tk)
* PyQt (Qt)
* PySide (Qt)
* wxPython (wxWidgets)
* PyGObject (GTK)

tkinter is included in Python's standard library.
--
https://mail.python.org/mailman/listinfo/python-list
Re: Windows Gui Frontend [ In reply to ]
Are there any ide’s that will let me design the screen and convert it to python? I doubt it because it was mentioned that this is time consuming.

Thanks for the responses everyone. I appreciate it.

Sent from my iPhone

> On Apr 1, 2023, at 10:37 AM, Eryk Sun <eryksun@gmail.com> wrote:
>
> ?On 4/1/23, Jim Schwartz <jschwar@sbcglobal.net> wrote:
>> I have another question. I have an app written in python, but I want to
>> add a windows GUI front end to it. Can this be done in python? What
>> packages would allow me to do that?
>
> Here are a few of the GUI toolkit libraries in common use:
>
> * tkinter (Tk)
> * PyQt (Qt)
> * PySide (Qt)
> * wxPython (wxWidgets)
> * PyGObject (GTK)
>
> tkinter is included in Python's standard library.

--
https://mail.python.org/mailman/listinfo/python-list
Re: Windows Gui Frontend [ In reply to ]
On 4/1/2023 1:21 PM, Jim Schwartz wrote:
> Are there any ide’s that will let me design the screen and convert it to python? I doubt it because it was mentioned that this is time consuming.

Depends on what you mean by "let me design the screen", but Pyside
(which I think is now called Pyside2) may be suitable. It is part the
Qt framework.


> Thanks for the responses everyone. I appreciate it.
>
> Sent from my iPhone
>
>> On Apr 1, 2023, at 10:37 AM, Eryk Sun <eryksun@gmail.com> wrote:
>>
>> ?On 4/1/23, Jim Schwartz <jschwar@sbcglobal.net> wrote:
>>> I have another question. I have an app written in python, but I want to
>>> add a windows GUI front end to it. Can this be done in python? What
>>> packages would allow me to do that?
>>
>> Here are a few of the GUI toolkit libraries in common use:
>>
>> * tkinter (Tk)
>> * PyQt (Qt)
>> * PySide (Qt)
>> * wxPython (wxWidgets)
>> * PyGObject (GTK)
>>
>> tkinter is included in Python's standard library.
>

--
https://mail.python.org/mailman/listinfo/python-list
Re: Windows Gui Frontend [ In reply to ]
Hi,

On Sat, Apr 1, 2023 at 12:24?PM Jim Schwartz <jschwar@sbcglobal.net> wrote:
>
> Are there any ide’s that will let me design the screen and convert it to python? I doubt it because it was mentioned that this is time consuming.

Look at wxGlade (a project designed for wxWidgets).
You will design you layout and then just save it as a py file.

No conversion needed.
And it's pretty straightforward. And very easy.
You can do it in 5 min or less..

Thank you.

I'm sure other libraries mentioned have their own RAD tool.

>
> Thanks for the responses everyone. I appreciate it.
>
> Sent from my iPhone
>
> > On Apr 1, 2023, at 10:37 AM, Eryk Sun <eryksun@gmail.com> wrote:
> >
> > ?On 4/1/23, Jim Schwartz <jschwar@sbcglobal.net> wrote:
> >> I have another question. I have an app written in python, but I want to
> >> add a windows GUI front end to it. Can this be done in python? What
> >> packages would allow me to do that?
> >
> > Here are a few of the GUI toolkit libraries in common use:
> >
> > * tkinter (Tk)
> > * PyQt (Qt)
> > * PySide (Qt)
> > * wxPython (wxWidgets)
> > * PyGObject (GTK)
> >
> > tkinter is included in Python's standard library.
>
> --
> https://mail.python.org/mailman/listinfo/python-list
--
https://mail.python.org/mailman/listinfo/python-list
Re: Windows Gui Frontend [ In reply to ]
On 4/1/23, Jim Schwartz <jschwar@sbcglobal.net> wrote:
> Are there any ide’s that will let me design the screen and convert it to
> python? I doubt it because it was mentioned that this is time consuming.
>
> Thanks for the responses everyone. I appreciate it.

For Qt, the WYSIWYG UI editor is Qt Designer. The basics are covered
in the following PySide tutorial:

https://www.pythonguis.com/pyside2-tutorial
--
https://mail.python.org/mailman/listinfo/python-list
Re: Windows Gui Frontend [ In reply to ]
On 4/1/2023 1:28 PM, Thomas Passin wrote:
> On 4/1/2023 1:21 PM, Jim Schwartz wrote:
>> Are there any ide’s that will let me design the screen and convert it
>> to python?  I doubt it because it was mentioned that this is time
>> consuming.
>
> Depends on what you mean by "let me design the screen", but Pyside
> (which I think is now called Pyside2) may be suitable.  It is part the
> Qt framework.

I should have added that in my experience, the screen layout of controls
is not the hardest and most time-consuming part of developing GUIs. The
hard part is getting the screen elements and other components to do what
you want in the way that you want it.

For example, the Tk.Text class can be used as a fairly full-featured
editor, but try figuring out how to highlight part of the text - not so
obvious. Or say you decide you want to have a button flash when
clicked, but you don't like the standard flash effect and want to change
it. Those are a few of the kinds of things that you have to deal with
and that soak up the time. It's not usually screen design.

>>
>> Sent from my iPhone
>>
>>> On Apr 1, 2023, at 10:37 AM, Eryk Sun <eryksun@gmail.com> wrote:
>>>
>>> ?On 4/1/23, Jim Schwartz <jschwar@sbcglobal.net> wrote:
>>>> I have another question.  I have an app written in python, but I
>>>> want to
>>>> add a windows GUI front end to it.  Can this be done in python?  What
>>>> packages would allow me to do that?
>>>
>>> Here are a few of the GUI toolkit libraries in common use:
>>>
>>>     * tkinter (Tk)
>>>     * PyQt (Qt)
>>>     * PySide (Qt)
>>>     * wxPython (wxWidgets)
>>>     * PyGObject (GTK)
>>>
>>> tkinter is included in Python's standard library.
>>
>

--
https://mail.python.org/mailman/listinfo/python-list
Re: Windows Gui Frontend [ In reply to ]
Hi, Thomas,

On Sat, Apr 1, 2023 at 12:40?PM Thomas Passin <list1@tompassin.net> wrote:
>
> On 4/1/2023 1:28 PM, Thomas Passin wrote:
> > On 4/1/2023 1:21 PM, Jim Schwartz wrote:
> >> Are there any ide’s that will let me design the screen and convert it
> >> to python? I doubt it because it was mentioned that this is time
> >> consuming.
> >
> > Depends on what you mean by "let me design the screen", but Pyside
> > (which I think is now called Pyside2) may be suitable. It is part the
> > Qt framework.
>
> I should have added that in my experience, the screen layout of controls
> is not the hardest and most time-consuming part of developing GUIs. The
> hard part is getting the screen elements and other components to do what
> you want in the way that you want it.
>
> For example, the Tk.Text class can be used as a fairly full-featured
> editor, but try figuring out how to highlight part of the text - not so
> obvious. Or say you decide you want to have a button flash when
> clicked, but you don't like the standard flash effect and want to change
> it. Those are a few of the kinds of things that you have to deal with
> and that soak up the time. It's not usually screen design.

I suggest going with wxPython/wxGlade.

Thank you.

>
> >>
> >> Sent from my iPhone
> >>
> >>> On Apr 1, 2023, at 10:37 AM, Eryk Sun <eryksun@gmail.com> wrote:
> >>>
> >>> ?On 4/1/23, Jim Schwartz <jschwar@sbcglobal.net> wrote:
> >>>> I have another question. I have an app written in python, but I
> >>>> want to
> >>>> add a windows GUI front end to it. Can this be done in python? What
> >>>> packages would allow me to do that?
> >>>
> >>> Here are a few of the GUI toolkit libraries in common use:
> >>>
> >>> * tkinter (Tk)
> >>> * PyQt (Qt)
> >>> * PySide (Qt)
> >>> * wxPython (wxWidgets)
> >>> * PyGObject (GTK)
> >>>
> >>> tkinter is included in Python's standard library.
> >>
> >
>
> --
> https://mail.python.org/mailman/listinfo/python-list
--
https://mail.python.org/mailman/listinfo/python-list
Re: Windows Gui Frontend [ In reply to ]
On 01.04.2023 19:30, Igor Korot wrote:
> Look at wxGlade (a project designed for wxWidgets). You will design
> you layout and then just save it as a py file.

wxGlade also includes a tutorial to get you started with wxPython
itself. You should be able create basic GUIs within a few hours.
See https://discuss.wxpython.org/ for support on wxPython and the
wxGlade mailing list.

Regards,

Dietmar

--
https://mail.python.org/mailman/listinfo/python-list
Re: Windows Gui Frontend [ In reply to ]
On 4/1/23 11:34, Eryk Sun wrote:
> On 4/1/23, Jim Schwartz <jschwar@sbcglobal.net> wrote:
>> Are there any ide’s that will let me design the screen and convert it to
>> python? I doubt it because it was mentioned that this is time consuming.
>>
>> Thanks for the responses everyone. I appreciate it.
>
> For Qt, the WYSIWYG UI editor is Qt Designer. The basics are covered
> in the following PySide tutorial:
>
> https://www.pythonguis.com/pyside2-tutorial

Also here is a decent tutorial:

https://realpython.com/qt-designer-python/


--
https://mail.python.org/mailman/listinfo/python-list
Re: Windows Gui Frontend [ In reply to ]
tkinter is part of python

e.

Am 01.04.23 um 13:59 schrieb Jim Schwartz:
> I have another question. I have an app written in python, but I want to add
> a windows GUI front end to it. Can this be done in python? What packages
> would allow me to do that?
>
>
>
> Thanks.
>
--
https://mail.python.org/mailman/listinfo/python-list
Re: Windows Gui Frontend [ In reply to ]
On Sat, 1 Apr 2023 10:37:34 -0500, Eryk Sun wrote:

> On 4/1/23, Jim Schwartz <jschwar@sbcglobal.net> wrote:
>> I have another question. I have an app written in python, but I want
>> to add a windows GUI front end to it. Can this be done in python?
>> What packages would allow me to do that?
>
> Here are a few of the GUI toolkit libraries in common use:
>
> * tkinter (Tk)
> * PyQt (Qt)
> * PySide (Qt)
> * wxPython (wxWidgets)
> * PyGObject (GTK)
>
> tkinter is included in Python's standard library.

Not to go into a lot of history, if this is a commercial application, go
with PySide rather than PyQt. They are very close, if not identical, until
you get to licensing.
--
https://mail.python.org/mailman/listinfo/python-list
Re: Windows Gui Frontend [ In reply to ]
> On 1 Apr 2023, at 18:47, Igor Korot <ikorot01@gmail.com> wrote:
>
> I suggest going with wxPython/wxGlade.

I ported all my wxPython code to PyQt and have not regretted it.

wxPython was (its been a while so may not be an issue now) far to
hard to make consistent across OS, my apps run on Linux, macOS and Windows.
I found that PyQt was easier to get working.

Barry

--
https://mail.python.org/mailman/listinfo/python-list
Re: Windows Gui Frontend [ In reply to ]
On 4/1/2023 5:11 PM, Barry Scott wrote:
>
>
>> On 1 Apr 2023, at 18:47, Igor Korot <ikorot01@gmail.com> wrote:
>>
>> I suggest going with wxPython/wxGlade.
>
> I ported all my wxPython code to PyQt and have not regretted it.
>
> wxPython was (its been a while so may not be an issue now) far to
> hard to make consistent across OS, my apps run on Linux, macOS and Windows.
> I found that PyQt was easier to get working.
>
> Barry
>

Having worked with both, I'd rather use PyQt, although Tk might be
easier to get a toy app going with. Both editing windows and packing
are easier for me to understand with PyQt, for one thing.

OTOH, Qt isn't free for commercial use and the OP seems to be
speculating on coming up with a product to sell at some point.

--
https://mail.python.org/mailman/listinfo/python-list
Re: Windows Gui Frontend [ In reply to ]
On 2023-04-01, Thomas Passin <list1@tompassin.net> wrote:

> Having worked with both, I'd rather use PyQt, although Tk might be
> easier to get a toy app going with. Both editing windows and packing
> are easier for me to understand with PyQt, for one thing.

With tk it is _very_ easy to get small apps going. As the apps get
larger and more complex, I find it easier to use wxPython or pyGTK
(never tried pyQt). However, if you want to package that small app
using cxfreeze (or whatever) tk tends to produce pretty large bundles
compared to others.

--
Grant


--
https://mail.python.org/mailman/listinfo/python-list
Re: Windows Gui Frontend [ In reply to ]
On 01/04/2023 18:21, Jim Schwartz wrote:
> Are there any ide’s that will let me design the screen and convert it to python?

There is nothing remotely like the VB or Delphi GUI builders.
There are some tools somewhat similar to the Java Swing and
FX GUI builders with varying degrees of bugginess.

And there are a few bespoke GUI type tools such as Dabo for
building specific types of applications.

But most Python GUI developers seem to prefer to just hard
code the Python, once you get used to it there's not much
time saving with the GUI tools.

The real time consuming stuff in building GUIs is getting
the basic design right and keeping all the controls,
keyboard bindings and menus in sync. State management
in other words.

I did a deep dive examination of GUI builders back around
v2.6 and came away less than enthused. Things may have
improved since then but I've seen no real evidence of
that.

--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos


--
https://mail.python.org/mailman/listinfo/python-list
Re: Windows Gui Frontend [ In reply to ]
On 4/1/23 15:33, Thomas Passin wrote:
> OTOH, Qt isn't free for commercial use and the OP seems to be
> speculating on coming up with a product to sell at some point.

Careful. That's not actually true, even though the marketing team at Qt
lets people believe it is. Qt is licensed under the LGPL, which you can
definitely use in a proprietary, close-source app, provided you use the
dynamically-linked version (which PySide does of course) and do not
modify it.

Qt's commerical licensing is very hostile to small companies, I can say
that much. It's too bad really. But the LGPL will work for most
companies, except for those that might wish to use the embedded version,
such as in cars where being able to abide by the terms of the LGPL
becomes difficult.


--
https://mail.python.org/mailman/listinfo/python-list
Re: Windows Gui Frontend [ In reply to ]
Jim Schwartz ? 2023?4?1? ?????8:00:19 [UTC+8] ??????
> I have another question. I have an app written in python, but I want to add
> a windows GUI front end to it. Can this be done in python? What packages
> would allow me to do that?
>
>
>
> Thanks.
There is a GUI Generator for tkinter
https://page.sourceforge.net/

--Jach
--
https://mail.python.org/mailman/listinfo/python-list
Re: Windows Gui Frontend [ In reply to ]
On Sat, 1 Apr 2023 19:19:17 -0600, Michael Torrie wrote:


> Qt's commerical licensing is very hostile to small companies, I can say
> that much. It's too bad really. But the LGPL will work for most
> companies, except for those that might wish to use the embedded version,
> such as in cars where being able to abide by the terms of the LGPL
> becomes difficult.

Even when the trolls had it the arcane requirements for commercial
licensing drove many away. I sometimes think 'Side' is actually Finnish
for 'up yours, Riverbank Computing'.
--
https://mail.python.org/mailman/listinfo/python-list
Aw: Re: Windows Gui Frontend [ In reply to ]
> The real time consuming stuff in building GUIs is getting
> the basic design right and keeping all the controls,
> keyboard bindings and menus in sync. State management
> in other words.

And cominmg up with sensible design choices _at all_.

> I did a deep dive examination of GUI builders back around
> v2.6 and came away less than enthused. Things may have
> improved since then but I've seen no real evidence of
> that.

Is this available anywhere ?

What GUI builders do (for me) is to make creating the GUI in a WYSIWYM way.

Like LyX for LaTeX.

Karsten
--
https://mail.python.org/mailman/listinfo/python-list
Re: Windows Gui Frontend [ In reply to ]
On 02.04.2023 01:13, Alan Gauld wrote:
> I did a deep dive examination of GUI builders back around
> v2.6 and came away less than enthused. Things may have
> improved since then but I've seen no real evidence of
> that.
I also did evaluate all the GUI builder from time to time between
2000 and 2016 to find one that I could recommend to colleagues,
but could not find one. Then I started contributing to wxGlade
and I can say that since a few years it's as easy again to
build GUIs as it was with VB6.

I don't want to go back to coding GUIs manually. For most use
cases it's a waste of time and often it does not result in the
best GUI as it's not so easy to try out and rearrange elements.

Regards,

Dietmar
--
https://mail.python.org/mailman/listinfo/python-list
Re: Windows Gui Frontend [ In reply to ]
On 4/2/23 05:09, Dietmar Schwertberger wrote:
> I also did evaluate all the GUI builder from time to time between
> 2000 and 2016 to find one that I could recommend to colleagues,
> but could not find one. Then I started contributing to wxGlade
> and I can say that since a few years it's as easy again to
> build GUIs as it was with VB6.
>
> I don't want to go back to coding GUIs manually. For most use
> cases it's a waste of time and often it does not result in the
> best GUI as it's not so easy to try out and rearrange elements.

But any modern GUI toolkit has sizers and layout managers. If you're
manually placing elements you cannot deal with HiDPI or changing window
sizes. Rearranging happens automatically when using sizers and layout
managers.

That said, the future of GUIs is declarative, using XAML or some other
domain-specific language like QML. Examples of this include QtQuick
(the long-term direction Qt is heading), and the various dot Net GUI
toolkits now popular including MS' own MAUI, WPF, Avalonia.

GUI designer tools (Qt Creator, Visual Studio) can be used to assist and
help layout the skeleton, but ultimately the GUI is defined by code. And
it works very well, is adaptive, and can automatically size and
rearrange. If you want portability to mobile devices, this is where it's at.

I've tried wxGlade but never could get into it, or wxWidgets in general.
I used to use GTK a lot and did use Glade back then, and dynamically
loaded the UI definition files at run time. Lately used more Qt with
QtDesigner, and even extended Designer to support using some custom
widgets I made.

but the future of Qt is clearly QtQuick, so I've been learning that.
Has its warts, but in general I like the declarative paradigm. It's a
learning curve. Overall it's fairly powerful, flexible and portable. I
have used the designer in Qt Creator a bit, but it's often faster and
just as intuitive to write it in QML, since you're going to be dropping
into QML frequently anyway to set properties (not unlike having to set
widget properties in Qt Designer. So I guess it's 6s using the
graphical designer vs straight Qt.
--
https://mail.python.org/mailman/listinfo/python-list
Re: Windows Gui Frontend [ In reply to ]
On 4/1/23 09:37, Eryk Sun wrote:
> Here are a few of the GUI toolkit libraries in common use:
>
> * tkinter (Tk)
> * PyQt (Qt)
> * PySide (Qt)
> * wxPython (wxWidgets)
> * PyGObject (GTK)
>
> tkinter is included in Python's standard library.

Another good one is Kivy. Especially if you ever want to target mobile
in the future. https://kivy.org/
--
https://mail.python.org/mailman/listinfo/python-list
Re: Windows Gui Frontend [ In reply to ]
On 02.04.2023 16:45, Michael Torrie wrote:
> But any modern GUI toolkit has sizers and layout managers. If you're
> manually placing elements you cannot deal with HiDPI or changing window
> sizes. Rearranging happens automatically when using sizers and layout
> managers.

I did not talk about pixel placement with wxGlade. That's not supported.
It's of course using sizers and with a hierarchy of sizers it's much easier
to rearrange things than it would be with pixel placement.

> GUI designer tools (Qt Creator, Visual Studio) can be used to assist and
> help layout the skeleton, but ultimately the GUI is defined by code. And

That's what I hated with Qt Designer: it does not output Python code
but  a .ui file.
This was the point where I could not recommend it to anyone.

> I've tried wxGlade but never could get into it, or wxWidgets in general.

Which version? Up to 0.7.2 I agree.

> but the future of Qt is clearly QtQuick, so I've been learning that.
> Has its warts, but in general I like the declarative paradigm. It's a
> learning curve. Overall it's fairly powerful, flexible and portable. I
For me QtQuick and QML are a step backwards by some ten years when
it comes to development speed.
It's as much 'fun' as doing GUIs with HTML and JavaScript.
Unfortunately, The Qt Company refused to provide an API for QtQuick to
be able to use it without QML.
Anyway, desktop development has long moved out of their focus
(around 15 years ago when Nokia acquired Trolltech). It's not where
their commercial customers are.

Regards,

Dietmar
--
https://mail.python.org/mailman/listinfo/python-list

1 2  View All