Re: Are there any easy-to-use Visual Studio C# WinForms-like GUI designers in the Python world for Tk?

2023-12-30 Thread Alan Gauld via Python-list
On 29/12/2023 01:05, Félix An via Python-list wrote:
> I'm used to C# WinForms, which has an easy-to-use drag-and-drop GUI 
> designer in Visual Studio. Is there anything similar for Tk? How about 
> Qt? 

There are any number of them but few that work well. The best
I found was Dabo but it uses its own Framework (based, ISTR,
on wxPython?) so not much good for integrating with third
party widgets etc.

I also used a Python fork of SpecTcl but it died a death I think.

The Qt Designer tool works with Python but I never took to
Qt as a toolkit although once mastered it is very powerful.
Probably the best choice for professional class GUI
applications using a GUI builder.

And on a Mac the standard Apple XCode GUI builder works fine
with Python too, but is Mac specific.

> What do you recommend as the easiest way to create GUI programs in 
> Python, similar to the ease of use of C# WinForms?

Provided you aren't getting fancy the basic Tkinter toolset
and programming by hand works best for me. Once you get used
to it its quick, flexible and fairly easy to debug. I also
use wxPython if I need something more sophisticated, but again
I just type the code I don't use a GUI builder.

-- 
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: Are there any easy-to-use Visual Studio C# WinForms-like GUI designers in the Python world for Tk?

2023-12-29 Thread Jach Feng via Python-list
Félix An 在 2023年12月29日 星期五下午2:05:24 [UTC+13] 的信中寫道:
> I'm used to C# WinForms, which has an easy-to-use drag-and-drop GUI 
> designer in Visual Studio. Is there anything similar for Tk? How about 
> Qt? What do you recommend as the easiest way to create GUI programs in 
> Python, similar to the ease of use of C# WinForms?
For tkinter, there is a GUI designer,
http://page.sourceforge.net/
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Are there any easy-to-use Visual Studio C# WinForms-like GUI designers in the Python world for Tk?

2023-12-29 Thread Mats Wichmann via Python-list

On 12/28/23 18:05, Félix An via Python-list wrote:
I'm used to C# WinForms, which has an easy-to-use drag-and-drop GUI 
designer in Visual Studio. Is there anything similar for Tk? How about 
Qt? What do you recommend as the easiest way to create GUI programs in 
Python, similar to the ease of use of C# WinForms?


Qt has a long-standing Designer tool.

I was pretty sure there was nothing for tkinter, but it seems at least 
someone tried:


https://pypi.org/project/tkdesigner/

and someone has tried a web-based one (looks like it may help to read 
Chinese for that one)


https://visualtk.com/


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


RE: Subject: Are there any easy-to-use Visual Studio C# WinForms-like GUI designers in the Python world for Tk?

2023-12-29 Thread Greg Walters via Python-list
> I'm used to C# WinForms, which has an easy-to-use drag-and-drop
GUI designer in Visual Studio. Is there anything similar for Tk? How
about Qt? What do you recommend as the easiest way to create GUI programs
in Python, similar to the ease of use of C# WinForms?

I can't say much for Qt other than there is a GUI designer for it, but I
don't know much about it.

As to the portion of your question about Python and Tkinter, YES!
The project is called PAGE and it is a drag and drop designer using the Tk
and ttk toolkits (basically Tkinter).

It's been around for many years, is completely FREE and open source, the
source code is included and works on Windows, Linux and Mac OS.

The current version is 7.6 and you can find it at
https://sourceforge.net/projects/page/ and it has been downloaded over 2000
times just in December, and over 26,000 times in 2023.

There is a TONNE of examples, full documentation and a number of
tutorials.  The Sourceforge acts as the main help site, but there is also a
Discord site dedicated to help and support.

I sincerely hope this helps!

Greg Walters


-- 
*My memory check bounced*



Greg Walters
-- 
https://mail.python.org/mailman/listinfo/python-list


Are there any easy-to-use Visual Studio C# WinForms-like GUI designers in the Python world for Tk?

2023-12-28 Thread Félix An via Python-list
I'm used to C# WinForms, which has an easy-to-use drag-and-drop GUI 
designer in Visual Studio. Is there anything similar for Tk? How about 
Qt? What do you recommend as the easiest way to create GUI programs in 
Python, similar to the ease of use of C# WinForms?

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


Re: Windows Gui Frontend

2023-04-03 Thread rbowman
On Sun, 2 Apr 2023 19:52:05 +0200, Dietmar Schwertberger wrote:

> On 02.04.2023 18:20, Michael Torrie wrote:
>>> Well the thing is you don't need to generate Python code at all.  Qt
>>> provides a UI loader class that loads the UI file at run time, builds
>>> the objects in memory, and connects all your signals for you.
> 
> I know, but having to load the .ui file is awkward.
> Even worse, you lose things like code completion.

One advantage is customization. It's not Python but we use a GUI system 
that supports uids. The underlying data is the same but some clients may 
not want certain fields or want them labeled or arranged differently. 
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Windows Gui Frontend

2023-04-03 Thread rbowman
On Sun, 02 Apr 2023 13:50:45 -0700 (PDT), Grant Edwards wrote:

> On 2023-04-02, Michael Torrie  wrote:
>> 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.
>>
>> [...]
>>
>> 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.
> 
> Ah, that's the brilliant thing about VB6 apps! They only work properly
> on machines with the same resoultion and display/font configuration as
> the developer.

VB6 isn't the only thing that goes to hell in a hand basket when you start 
playing around with fonts and resolutions. If I were emperor of the world 
there would only be monospaced fonts and a limited selection of those.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Windows Gui Frontend

2023-04-03 Thread rbowman
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


Re: Windows Gui Frontend

2023-04-03 Thread Jach Feng
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

2023-04-03 Thread rbowman
On Sat, 1 Apr 2023 10:37:34 -0500, Eryk Sun wrote:

> On 4/1/23, 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?
> 
> 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

2023-04-03 Thread Rolf Blum

Am 02.04.2023 um 01:13 schrieb Alan Gauld:

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.


The latest Delphi versions themself can create GUIs for Python. I use 
Delphi 10.4.2 (Sidney) Professional.

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


Re: Windows Gui Frontend

2023-04-02 Thread dn via Python-list




On 03/04/2023 02.45, Michael Torrie wrote:

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.


Do the two approaches acknowledge each other and enable 'round tripping'?
ie to use the best?better tool for particular jobs (and to cope with 
later-maintenance) can one start using one approach, switch to using the 
other, and then go back to the first?


--
Regards,
=dn
--
https://mail.python.org/mailman/listinfo/python-list


Re: Windows Gui Frontend

2023-04-02 Thread Grant Edwards
On 2023-04-02, Michael Torrie  wrote:
> 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.
>
> [...]
>
> 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.

Ah, that's the brilliant thing about VB6 apps! They only work properly
on machines with the same resoultion and display/font configuration as
the developer.

--
Grant

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


Re: Windows Gui Frontend

2023-04-02 Thread Igor Korot
Hi, Dietmer,

On Sun, Apr 2, 2023 at 1:14 PM Dietmar Schwertberger
 wrote:
>
> On 02.04.2023 18:26, Michael Torrie wrote:
> > Been a long time. I was initially turned off by the event handling
> > system of wx compared to the signals and slots of Gtk and Qt.
> When starting with Python GUIs in 1999, I evaluated both.
> Qt event handling had an advantage for C++ where the wxWidgets
> people had to use event tables. I don't know when wxWidgets
> added dynamic event binding, but with wxPython I don't know
> anything else than dynamic binding.

I think Bind() was added sometime in 2.9 as GSoC project.
And 
https://docs.wxwidgets.org/latest/classwx_evt_handler.html#a3b4a42f7263fd0a257a996a078ef802f
proves me correct: it is in "Since 2.9.0"

Thank you.

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


Re: Windows Gui Frontend

2023-04-02 Thread Dietmar Schwertberger

On 02.04.2023 18:26, Michael Torrie wrote:

Been a long time. I was initially turned off by the event handling
system of wx compared to the signals and slots of Gtk and Qt.

When starting with Python GUIs in 1999, I evaluated both.
Qt event handling had an advantage for C++ where the wxWidgets
people had to use event tables. I don't know when wxWidgets
added dynamic event binding, but with wxPython I don't know
anything else than dynamic binding.


Regards,

Dietmar

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


Re: Windows Gui Frontend

2023-04-02 Thread Dietmar Schwertberger

On 02.04.2023 18:20, Michael Torrie wrote:

Well the thing is you don't need to generate Python code at all.  Qt
provides a UI loader class that loads the UI file at run time, builds
the objects in memory, and connects all your signals for you.


I know, but having to load the .ui file is awkward.
Even worse, you lose things like code completion.



   So much
nicer than code generation.


I absolutely disagree on this.

Regards,

Dietmar

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


Re: Windows Gui Frontend

2023-04-02 Thread Michael Torrie
On 2023-04-02 9:09 a.m., Dietmar Schwertberger wrote:
>> I've tried wxGlade but never could get into it, or wxWidgets in general.
> 
> Which version? Up to 0.7.2 I agree.

Been a long time. I was initially turned off by the event handling
system of wx compared to the signals and slots of Gtk and Qt.

> 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.

There are a number of desktop apps built in QtQuick.  KDE is
transitioning to QtQuick and it's been alright, not without some
consistency issues.  The Cura slicer is another example of a complete
desktop app written in QtQuick which looks and feels quite nicely on all
platforms.

For me, more and more I need to be able to run on mobile as well as
desktop.  Qt, GTK, or wx are just not good fits when you need that kind
of portability.

But traditional Qt will be with us or decades yet.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Windows Gui Frontend

2023-04-02 Thread Michael Torrie
On 2023-04-02 9:09 a.m., Dietmar Schwertberger wrote:
> 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.

Well the thing is you don't need to generate Python code at all.  Qt
provides a UI loader class that loads the UI file at run time, builds
the objects in memory, and connects all your signals for you.  So much
nicer than code generation.


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


Re: Windows Gui Frontend

2023-04-02 Thread Dietmar Schwertberger

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


Re: Windows Gui Frontend

2023-04-02 Thread Michael Torrie
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

2023-04-02 Thread Michael Torrie
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

2023-04-02 Thread Dietmar Schwertberger

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


Aw: Re: Windows Gui Frontend

2023-04-02 Thread Karsten Hilbert
> 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

2023-04-01 Thread Michael Torrie
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

2023-04-01 Thread Alan Gauld
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

2023-04-01 Thread Grant Edwards
On 2023-04-01, Thomas Passin  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

2023-04-01 Thread Thomas Passin

On 4/1/2023 5:11 PM, Barry Scott wrote:




On 1 Apr 2023, at 18:47, Igor Korot  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

2023-04-01 Thread Barry Scott



> On 1 Apr 2023, at 18:47, Igor Korot  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

2023-04-01 Thread Egon Frerich

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

2023-04-01 Thread Mats Wichmann

On 4/1/23 11:34, Eryk Sun wrote:

On 4/1/23, 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.

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

2023-04-01 Thread Dietmar Schwertberger

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

2023-04-01 Thread Igor Korot
Hi, Thomas,

On Sat, Apr 1, 2023 at 12:40 PM Thomas Passin  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  wrote:
> >>>
> >>> On 4/1/23, 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?
> >>>
> >>> 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

2023-04-01 Thread Thomas Passin

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  wrote:

On 4/1/23, 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?


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

2023-04-01 Thread Eryk Sun
On 4/1/23, 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.
>
> 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

2023-04-01 Thread Igor Korot
Hi,

On Sat, Apr 1, 2023 at 12:24 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.

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  wrote:
> >
> > On 4/1/23, 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?
> >
> > 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

2023-04-01 Thread Thomas Passin

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  wrote:

On 4/1/23, 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?


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

2023-04-01 Thread Jim Schwartz
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  wrote:
> 
> On 4/1/23, 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?
> 
> 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

2023-04-01 Thread Eryk Sun
On 4/1/23, 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?

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

2023-04-01 Thread Thomas Passin

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


Windows Gui Frontend

2023-04-01 Thread 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: Tkinter GUI freezing, used Thread then encountered RuntimeError: threads can only be started once

2023-01-10 Thread MRAB

On 2023-01-11 00:13, Cameron Simpson wrote:

On 10Jan2023 18:32, MRAB  wrote:
I don't like how you're passing Thread...start as an argument. IMHO, it 
would be better/cleaner to pass a plain function, even if the only 
thing that function does is to start the thread.


Yes, and this is likely the thing causing the cited exception "threads
can only be started once". Your setup of the button with the action
defined as:

  Thread().start

creates a _single_ new Thread _when you define the button_, and makes
hte button callback try to start it. On the second and following
callback, you're trying to start the _same_ single Thread again.


You're right! I missed that detail. :-(


Do as MRAB suggests and have the callback create-and-start a Thread
instead of just starting an _existing_ Thread.

Also, for simple quick things there's no need to use a Thread at all. If
the final version of the programme is going to do something long running
at that point, then sure.

I can't tell what 'change_flag' is doing because of the formatting 
issue. Is it doing GUI stuff? In a thread? If yes, don't do that. The 
GUI doesn't like that. Only the main thread should do GUI stuff.


Aye. This is very important in almost all GUI toolkits.

Bit me very badly with Qt once, badly in that the segfaults (yes!
segfaults! in a Python app!) were erratic and very timing dependent,
making them hard to reproduce and understand. It wasn't until I
_realised_ it was thread/concurrency related that I could fix it.

Note that in Tk you can have a callback do GUI work, just not in a
separate thread.



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


Re: Tkinter GUI freezing, used Thread then encountered RuntimeError: threads can only be started once

2023-01-10 Thread Cameron Simpson

On 10Jan2023 18:32, MRAB  wrote:
I don't like how you're passing Thread...start as an argument. IMHO, it 
would be better/cleaner to pass a plain function, even if the only 
thing that function does is to start the thread.


Yes, and this is likely the thing causing the cited exception "threads 
can only be started once". Your setup of the button with the action 
defined as:


Thread().start

creates a _single_ new Thread _when you define the button_, and makes 
hte button callback try to start it. On the second and following 
callback, you're trying to start the _same_ single Thread again.


Do as MRAB suggests and have the callback create-and-start a Thread 
instead of just starting an _existing_ Thread.


Also, for simple quick things there's no need to use a Thread at all. If 
the final version of the programme is going to do something long running 
at that point, then sure.


I can't tell what 'change_flag' is doing because of the formatting 
issue. Is it doing GUI stuff? In a thread? If yes, don't do that. The 
GUI doesn't like that. Only the main thread should do GUI stuff.


Aye. This is very important in almost all GUI toolkits.

Bit me very badly with Qt once, badly in that the segfaults (yes!  
segfaults! in a Python app!) were erratic and very timing dependent, 
making them hard to reproduce and understand. It wasn't until I 
_realised_ it was thread/concurrency related that I could fix it.


Note that in Tk you can have a callback do GUI work, just not in a 
separate thread.


Cheers,
Cameron Simpson 
--
https://mail.python.org/mailman/listinfo/python-list


Re: Tkinter GUI freezing, used Thread then encountered RuntimeError: threads can only be started once

2023-01-10 Thread MRAB

On 2023-01-10 14:57, Abhay Singh wrote:

Here is the entire code snippet of the same.

Please help

def change_flag(top_frame, bottom_frame, button1, button2, button3, button4, 
controller): global counter, canvas, my_image, chosen, flag, directory 
canvas.delete('all') button5['state'] = DISABLED counter += 1

chosen, options_text = function_options()
right_answer_flag = get_right_answer_flag(chosen, options_text)
#pdb.set_trace()

try:
 location = directory + chosen + format_image
except:
 controller.show_frame(PlayAgainExit)
 
my_image = PhotoImage(file=location)

canvas.create_image(160, 100, anchor=CENTER, image=my_image)

button1["text"] = options_text[0]
button2["text"] = options_text[1]
button3["text"] = options_text[2]
button4["text"] = options_text[3]

button1['state'] = NORMAL
button2['state'] = NORMAL
button3['state'] = NORMAL
button4['state'] = NORMAL
##

 button5 = Button(
 next_frame,
 width=20,
 text="next",
 fg="black",
 #command=lambda: 
change_flag(top_frame,bottom_frame,button1,button2,button3,button4,controller))
 command=Thread(target=change_flag, args 
=(top_frame,bottom_frame,button1,button2,button3,button4,controller)).start)
 
 button5.pack(side=RIGHT, padx=5, pady=5)



The formatting is messed up, which doesn't help.

Some points:

You have a 'bare' except, i.e. "except:". Don't do that. It swallows 
_all_ exceptions and can hide bugs.


I don't like how you're passing Thread...start as an argument. IMHO, it 
would be better/cleaner to pass a plain function, even if the only thing 
that function does is to start the thread.


I can't tell what 'change_flag' is doing because of the formatting 
issue. Is it doing GUI stuff? In a thread? If yes, don't do that. The 
GUI doesn't like that. Only the main thread should do GUI stuff.

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


Tkinter GUI freezing, used Thread then encountered RuntimeError: threads can only be started once

2023-01-10 Thread Abhay Singh
Here is the entire code snippet of the same.

Please help

def change_flag(top_frame, bottom_frame, button1, button2, button3, button4, 
controller): global counter, canvas, my_image, chosen, flag, directory 
canvas.delete('all') button5['state'] = DISABLED counter += 1

chosen, options_text = function_options()
right_answer_flag = get_right_answer_flag(chosen, options_text)
#pdb.set_trace()

try:
location = directory + chosen + format_image
except:
controller.show_frame(PlayAgainExit)

my_image = PhotoImage(file=location)
canvas.create_image(160, 100, anchor=CENTER, image=my_image)

button1["text"] = options_text[0]
button2["text"] = options_text[1]
button3["text"] = options_text[2]
button4["text"] = options_text[3]

button1['state'] = NORMAL
button2['state'] = NORMAL
button3['state'] = NORMAL
button4['state'] = NORMAL
##

button5 = Button(
next_frame,
width=20,
text="next",
fg="black",
#command=lambda: 
change_flag(top_frame,bottom_frame,button1,button2,button3,button4,controller))
command=Thread(target=change_flag, args 
=(top_frame,bottom_frame,button1,button2,button3,button4,controller)).start)

button5.pack(side=RIGHT, padx=5, pady=5)

Thanks,
Abhay
-- 
https://mail.python.org/mailman/listinfo/python-list


[Python-announce] Brand new: Line Profiler GUI v0.1

2022-02-08 Thread Joseph Martinot-Lagarde
Hi all,
In the dark moments of code optimization, line_profiler from Robert Kern (now 
https://github.com/pyutils/line_profiler) helped me a lot. To ease the usage of 
this tool I created a GUI, namely "Line Profiler GUI".
The installation is just a pip command away (choose your favorite python Qt 
binding):

$ pip install line-profiler-gui[PySide2]
$ pip install line-profiler-gui[PyQt5]

The code is available on Github: https://github.com/Nodd/lineprofilergui

Happy optimization!
Joseph
___
Python-announce-list mailing list -- python-announce-list@python.org
To unsubscribe send an email to python-announce-list-le...@python.org
https://mail.python.org/mailman3/lists/python-announce-list.python.org/
Member address: arch...@mail-archive.com


[issue45451] IDLE Shell GUI - remove window border

2021-11-29 Thread Alex Waygood


Change by Alex Waygood :


--
nosy: +AlexWaygood

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45451] IDLE Shell GUI - remove window border

2021-11-29 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

I request that this entire new feature be reverted.  Having used it in 
classroom environment, it has been a catastrophe for teaching and is a 
significant regression in usability.

Here are my notes so far:

1) As the OP says, this strong vertical line is visually jarring and against 
graphic design principles that allow the eye to group input/output pairs.  
Contrast this with Jupyter, Ipython, and previous versions of IDLE which use 
strong horizontal delineations between successive input/output pairs.

2) Pasting multiple statements into the shell window causes the first to be 
executed and the other statements are silently ignored.  This is a recurring 
problem with new students and for those with Jupyter experience.  For example, 
cut and paste these two statements into the shell and press return/enter:

print('hello')   # This executes
print('world')   # This is silently ignored

3) When students have errors, it is the norm to communicate them via a chat 
window.  Formerly, the PS1 prompt separated the inputs from the outputs in a 
shell session; however, the PS1 and PS2 prompts are not included in a cut and 
paste section.  The session becomes unintelligible because essential 
information is lost.   This affects chat, posting interactive sessions to 
StackOverflow, and the ability to post examples in docstrings.  In the main 
Python documentation, the examples always show the >>> but there is no longer a 
way to extract this essential information from an interactive session.

4) Related to #3 is that saving the shell window loses all the prompts.  For a 
decade, I've performed live interactive demonstrations and have saved the 
sessions so that students could review it.  Those saved sessions are now 
unreadable and therefore unusable.

Here is what a saved interactive lesson used to look like:

Python 3.7.6 (v3.7.6:43364a7ae0, Dec 18 2019, 14:18:50)
[Clang 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "license()" for more information.
>>> # Quoting syntax:  '  "   '''   """
>>> 'hello'
'hello'
>>> "hello"
'hello'
>>> '''hello'''
'hello'
>>> """hello"""
'hello'
>>> print('Don\'t prefer backslashes')
Don't prefer backslashes
>>> print("Instead, we've used alternate quotes")
Instead, we've used alternate quotes
>>> print('''She said, "I'm a good string quoter."''')
She said, "I'm a good string quoter."
>>> 30 + 40 - 5
65
>>> _ * 10
650
>>> _ * 10
6500
>>> type(_)


Here is what the saved session looks like now:

Python 3.11.0a2 (v3.11.0a2:e2b4e4bab9, Nov  5 2021, 15:54:35) [Clang 13.0.0 
(clang-1300.0.29.3)] on darwin
Type "help", "copyright", "credits" or "license()" for more information.
# Quoting syntax:  '  "   '''   """
'hello'
'hello'
"hello"
'hello'
'''hello'''
'hello'
"""hello"""
'hello'
print('Don\'t prefer backslashes')
Don't prefer backslashes
print("Instead, we've used alternate quotes")
Instead, we've used alternate quotes
print('''She said, "I'm a good string quoter."''')
She said, "I'm a good string quoter."
30 + 40 - 5
65
_ * 10
650
_ * 10
6500
type(_)


5) With new students, we have a problem we didn't use to have before.  When 
they emulate a live demo, they are typing the '...' PS1 prompt.  It is 
confusing.

FWIW, when I say "students", I'm referring to adults who are already experts in 
their field.  Today I was teaching experienced engineers (most with masters 
degrees) at a major consumer electronics company.  The new IDLE feature 
seriously degraded their experience and almost every learner was adversely 
affected in some way.

--
nosy: +rhettinger
priority: normal -> high

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45451] IDLE Shell GUI - remove window border

2021-10-15 Thread jerry chow


Change by jerry chow :


--
nosy: +jerrylikerice1s

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45451] IDLE Shell GUI - remove window border

2021-10-14 Thread primexx


primexx  added the comment:

of course that's fair, colour schemes are a very preferential thing. the main 
issue really is the border that creates a visual separation between the line 
indicators and the lines that they should be visually associated with. thanks!

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45451] IDLE Shell GUI - remove window border

2021-10-12 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Whereas to me, 'not shaded' is easily the worst.  Users can customize the 
sidebar colors, but since the default is the same at the text, I would not want 
to deliver IDLE with a scheme that I think is awful.

On Windows, I agree that the light theme border is too heavy.  The dark  theme 
light border is barely noticeable.  On mac, its the opposite: light theme ok, 
dark theme white border is too prominent.  I would be willing to look at a 
change.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45451] IDLE Shell GUI - remove window border

2021-10-12 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
nosy: +taleinat

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45451] IDLE Shell GUI - remove window border

2021-10-12 Thread primexx


New submission from primexx :

Python 3.10 bundled IDLE with a small change in the interactive interpreter 
shell.

Previously, the line indicators ">>>" were in-line with the command line, and a 
long/multi line command would have the same indentation as the indicator which 
was not ideal.

that has been changed in 3.10 so that the line indicators are in a separate 
area as the actual commands so actual commands are always indented 
consistently. this is good.

however, there is now a thick window border separating the line indicator and 
the main window. this is jarring and creates a visual separation that 
disassociates the line indicator from the line itself.

i have on several occasions sat there waiting for something to finish only to 
notice that it has already finished but i missed seeing the next line indicator 
to the left.

the window border creates two separate spaces and is distracting.

an improvement would be to instead of the window border, eliminate it and shade 
the left side with a very light colour (probably even lighter than my photoshop 
in the attached image).

actually, I suggest that the best solution is to remove the window border and 
leave the entire thing contiguously white, with no shading, similar to what it 
looked like previously. except that it now has correct indentation. I think 
this is the most visually cohesive and easy to use.

Attached is an image to illustrate. Again, I suggest the "not shaded" version 
is the best.

--
assignee: terry.reedy
components: IDLE
files: idle310.PNG
messages: 403774
nosy: primexx, terry.reedy
priority: normal
severity: normal
status: open
title: IDLE Shell GUI - remove window border
type: enhancement
versions: Python 3.10
Added file: https://bugs.python.org/file50352/idle310.PNG

___
Python tracker 
<https://bugs.python.org/issue45451>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: Free OCR package in Python and selecting appropriate widget for the GUI

2021-09-26 Thread Mohsen Owzar
Mohsen Owzar schrieb am Donnerstag, 23. September 2021 um 08:53:15 UTC+2:
> DFS schrieb am Mittwoch, 22. September 2021 um 09:41:42 UTC+2: 
> > On 9/22/2021 1:54 AM, Mohsen Owzar wrote: 
> > > DFS schrieb am Mittwoch, 22. September 2021 um 05:10:30 UTC+2: 
> > >> On 9/21/2021 10:38 PM, Mohsen Owzar wrote: 
> > >>> DFS schrieb am Dienstag, 21. September 2021 um 15:45:38 UTC+2: 
> > >>>> On 9/21/2021 4:36 AM, Mohsen Owzar wrote: 
> > >>>>> Hi Guys 
> > >>>>> Long time ago I've written a program in Malab a GUI for solving 
> > >>>>> Sudoku puzzles, which worked not so bad. 
> > >>>>> Now I try to write this GUI with Python with PyQt5 or TKinter. 
> > >>>>> First question is: 
> > >>>>> Is there any free OCR software, packages or code in Python, which I 
> > >>>>> can use to recognize the given digits and their positions in the 
> > >>>>> puzzle square. 
> > >>>>> Second: 
> > >>>>> Because, I can not attach a picture to this post, I try to describe 
> > >>>>> my picture of my GUI. 
> > >>>> Draw your GUI in PyQt designer or other graphics tool, then upload a 
> > >>>> screenshot of it to imgur, then post the link to the picture. 
> > >>> Thanks, for your answer. Hi
> > >>> But, what is "imgur"? 
> > >>> I'm not so familiar with handling of pictures in this group. 
> > >>> How can I call "imgur" or how can I get there? 
> > >>> 
> > >>> Regards 
> > >>> Mohsen 
> > >> www.imgur.com 
> > >> 
> > >> It's a website you can upload image files or screenshots to. Then you 
> > >> can copy a link to your picture and post the link here. 
> > > I have already posted the link, but I can not see it anywhere. 
> > > Now, I post it again: 
> > > https://imgur.com/a/Vh8P2TE 
> > > I hope that you can see my two images. 
> > > Regards 
> > > Mohsen 
> > Got it. 
> > 
> > I haven't used tkinter. In PyQt5 designer I think you should use one 
> > QTextEdit control for each square. 
> > 
> > 
> > Each square with the small black font can be initially populated with 
> > 
> > 1 2 3 
> > 4 5 6 
> > 7 8 9 
> > 
> > 
> > 
> > https://imgur.com/lTcEiML 
> > 
> > 
> > 
> > some starter python code (maybe save as sudoku.py) 
> > 
> > = 
> > from PyQt5 import Qt, QtCore, QtGui, QtWidgets, uic 
> > from PyQt5.Qt import * 
> > from PyQt5.QtCore import * 
> > from PyQt5.QtGui import * 
> > from PyQt5.QtWidgets import * 
> > 
> > #objects 
> > app = QtWidgets.QApplication([]) 
> > frm = uic.loadUi("sudoku.ui") 
> > 
> > 
> > #grid = a collection of squares 
> > grids = 1 
> > 
> > #squares = number of squares per grid 
> > squares = 9 
> > 
> > #fill the squares with 1-9 
> > def populateSquares(): 
> > for i in range(grids,grids+1): 
> > for j in range(1,squares+1): 
> > widget = frm.findChild(QtWidgets.QTextEdit, "txt{}_{}".format(i,j)) 
> > widget.setText("1 2 3 4 5 6 7 8 9") 
> > 
> > #read data from squares 
> > def readSquares(): 
> > for i in range(grids,grids+1): 
> > for j in range(1,squares+1): 
> > print("txt%d_%d contains: %s" % 
> > (i,j,frm.findChild(QtWidgets.QTextEdit, 
> > "txt{}_{}".format(i,j)).toPlainText())) 
> > 
> > 
> > #connect pushbuttons to code 
> > frm.btnPopulate.clicked.connect(populateSquares) 
> > frm.btnReadContents.clicked.connect(readSquares) 
> > 
> > #show main form 
> > frm.show() 
> > 
> > #initiate application 
> > app.exec() 
> > = 
> > 
> > 
> > 
> > 
> > 
> > .ui file (ie save as sudoku.ui) 
> > = 
> > 
> >  
> >  
> > MainWindow 
> >  
> >  
> >  
> > 0 
> > 0 
> > 325 
> > 288 
> >  
> >  
> >  
> > Sudoku 
> >  
> >  
> >  
> >  
> >  
> > 32 
> > 22 
> > 83 
> > 65 
> >  
> >  
> >  
> >  
> > Cou

Re: Free OCR package in Python and selecting appropriate widget for the GUI

2021-09-23 Thread Mohsen Owzar
DFS schrieb am Mittwoch, 22. September 2021 um 09:41:42 UTC+2:
> On 9/22/2021 1:54 AM, Mohsen Owzar wrote: 
> > DFS schrieb am Mittwoch, 22. September 2021 um 05:10:30 UTC+2: 
> >> On 9/21/2021 10:38 PM, Mohsen Owzar wrote: 
> >>> DFS schrieb am Dienstag, 21. September 2021 um 15:45:38 UTC+2: 
> >>>> On 9/21/2021 4:36 AM, Mohsen Owzar wrote: 
> >>>>> Hi Guys 
> >>>>> Long time ago I've written a program in Malab a GUI for solving Sudoku 
> >>>>> puzzles, which worked not so bad. 
> >>>>> Now I try to write this GUI with Python with PyQt5 or TKinter. 
> >>>>> First question is: 
> >>>>> Is there any free OCR software, packages or code in Python, which I can 
> >>>>> use to recognize the given digits and their positions in the puzzle 
> >>>>> square. 
> >>>>> Second: 
> >>>>> Because, I can not attach a picture to this post, I try to describe my 
> >>>>> picture of my GUI. 
> >>>> Draw your GUI in PyQt designer or other graphics tool, then upload a 
> >>>> screenshot of it to imgur, then post the link to the picture. 
> >>> Thanks, for your answer. 
> >>> But, what is "imgur"? 
> >>> I'm not so familiar with handling of pictures in this group. 
> >>> How can I call "imgur" or how can I get there? 
> >>> 
> >>> Regards 
> >>> Mohsen 
> >> www.imgur.com 
> >> 
> >> It's a website you can upload image files or screenshots to. Then you 
> >> can copy a link to your picture and post the link here. 
> > I have already posted the link, but I can not see it anywhere. 
> > Now, I post it again: 
> > https://imgur.com/a/Vh8P2TE 
> > I hope that you can see my two images. 
> > Regards 
> > Mohsen
> Got it. 
> 
> I haven't used tkinter. In PyQt5 designer I think you should use one 
> QTextEdit control for each square. 
> 
> 
> Each square with the small black font can be initially populated with 
> 
> 1 2 3 
> 4 5 6 
> 7 8 9 
> 
> 
> 
> https://imgur.com/lTcEiML 
> 
> 
> 
> some starter python code (maybe save as sudoku.py) 
> 
> = 
> from PyQt5 import Qt, QtCore, QtGui, QtWidgets, uic 
> from PyQt5.Qt import * 
> from PyQt5.QtCore import * 
> from PyQt5.QtGui import * 
> from PyQt5.QtWidgets import * 
> 
> #objects 
> app = QtWidgets.QApplication([]) 
> frm = uic.loadUi("sudoku.ui") 
> 
> 
> #grid = a collection of squares 
> grids = 1 
> 
> #squares = number of squares per grid 
> squares = 9 
> 
> #fill the squares with 1-9 
> def populateSquares(): 
> for i in range(grids,grids+1): 
> for j in range(1,squares+1): 
> widget = frm.findChild(QtWidgets.QTextEdit, "txt{}_{}".format(i,j)) 
> widget.setText("1 2 3 4 5 6 7 8 9") 
> 
> #read data from squares 
> def readSquares(): 
> for i in range(grids,grids+1): 
> for j in range(1,squares+1): 
> print("txt%d_%d contains: %s" % 
> (i,j,frm.findChild(QtWidgets.QTextEdit, 
> "txt{}_{}".format(i,j)).toPlainText())) 
> 
> 
> #connect pushbuttons to code 
> frm.btnPopulate.clicked.connect(populateSquares) 
> frm.btnReadContents.clicked.connect(readSquares) 
> 
> #show main form 
> frm.show() 
> 
> #initiate application 
> app.exec() 
> = 
> 
> 
> 
> 
> 
> .ui file (ie save as sudoku.ui) 
> = 
> 
>  
>  
> MainWindow 
>  
>  
>  
> 0 
> 0 
> 325 
> 288 
>  
>  
>  
> Sudoku 
>  
>  
>  
>  
>  
> 32 
> 22 
> 83 
> 65 
>  
>  
>  
>  
> Courier 
> 12 
> 50 
> false 
>  
>  
>  
> false 
>  
>  
> color: rgb(0, 0, 127); 
> background-color: rgb(255, 255, 127); 
>  
>  
> QFrame::StyledPanel 
>  
>  
> QFrame::Sunken 
>  
>  
> Qt::ScrollBarAlwaysOff 
>  
>  
> true 
>  
>  
>  
>  
>  
> 114 
> 22 
> 83 
> 65 
>  
>  
>  
>  
> Courier 
> 12 
> 50 
> false 
>  
>  
>  
> false 
>  
>  
> color: rgb(0, 0, 127); 
> background-color: rgb(255, 255, 127); 
>  
>  
> QFrame::StyledPanel 
>  
>  
> QFrame::Sunken 
>  
>  
> Qt::ScrollBarAlwaysOff 
>  
>  
> true 
>  
>  
>  
>  
>  
> 196 
> 22

Re: Free OCR package in Python and selecting appropriate widget for the GUI

2021-09-22 Thread DFS

On 9/22/2021 1:54 AM, Mohsen Owzar wrote:

DFS schrieb am Mittwoch, 22. September 2021 um 05:10:30 UTC+2:

On 9/21/2021 10:38 PM, Mohsen Owzar wrote:

DFS schrieb am Dienstag, 21. September 2021 um 15:45:38 UTC+2:

On 9/21/2021 4:36 AM, Mohsen Owzar wrote:

Hi Guys
Long time ago I've written a program in Malab a GUI for solving Sudoku puzzles, 
which worked not so bad.
Now I try to write this GUI with Python with PyQt5 or TKinter.
First question is:
Is there any free OCR software, packages or code in Python, which I can use to 
recognize the given digits and their positions in the puzzle square.
Second:
Because, I can not attach a picture to this post, I try to describe my picture 
of my GUI.

Draw your GUI in PyQt designer or other graphics tool, then upload a
screenshot of it to imgur, then post the link to the picture.

Thanks, for your answer.
But, what is "imgur"?
I'm not so familiar with handling of pictures in this group.
How can I call "imgur" or how can I get there?

Regards
Mohsen

www.imgur.com

It's a website you can upload image files or screenshots to. Then you
can copy a link to your picture and post the link here.

I have already posted the link, but I can not see it anywhere.
Now, I post it again:
https://imgur.com/a/Vh8P2TE
I hope that you can see my two images.
Regards
Mohsen



Got it.

I haven't used tkinter.  In PyQt5 designer I think you should use one 
QTextEdit control for each square.



Each square with the small black font can be initially populated with

1  2  3
4  5  6
7  8  9



https://imgur.com/lTcEiML



some starter python code  (maybe save as sudoku.py)

=
from PyQt5 import Qt, QtCore, QtGui, QtWidgets, uic
from PyQt5.Qt import *
from PyQt5.QtCore import *
from PyQt5.QtGui import *
from PyQt5.QtWidgets import *

#objects
app = QtWidgets.QApplication([])
frm  = uic.loadUi("sudoku.ui")


#grid = a collection of squares
grids = 1

#squares = number of squares per grid
squares = 9

#fill the squares with 1-9
def populateSquares():
for i in range(grids,grids+1):
for j in range(1,squares+1):
widget = frm.findChild(QtWidgets.QTextEdit, 
"txt{}_{}".format(i,j))
widget.setText("1  2  3  4  5  6  7  8  9")

#read data from squares
def readSquares():
for i in range(grids,grids+1):
for j in range(1,squares+1):
			print("txt%d_%d contains: %s" % 
(i,j,frm.findChild(QtWidgets.QTextEdit, 
"txt{}_{}".format(i,j)).toPlainText()))



#connect pushbuttons to code
frm.btnPopulate.clicked.connect(populateSquares)
frm.btnReadContents.clicked.connect(readSquares)

#show main form
frm.show()

#initiate application
app.exec()
=





.ui file (ie save as sudoku.ui)
=



 MainWindow
 
  
   
0
0
325
288
   
  
  
   Sudoku
  
  
   

 
  32
  22
  83
  65
 


 
  Courier
  12
  50
  false
 


 false


 color: rgb(0, 0, 127);
background-color: rgb(255, 255, 127);


 QFrame::StyledPanel


 QFrame::Sunken


 Qt::ScrollBarAlwaysOff


 true

   
   

 
  114
  22
  83
  65
 


 
  Courier
  12
  50
  false
 


 false


 color: rgb(0, 0, 127);
background-color: rgb(255, 255, 127);


 QFrame::StyledPanel


 QFrame::Sunken


 Qt::ScrollBarAlwaysOff


 true

   
   

 
  196
  22
  83
  65
 


 
  Courier
  12
  50
  false
 


 false


 color: rgb(0, 0, 127);
background-color: rgb(255, 255, 127);


 QFrame::StyledPanel


 QFrame::Sunken


 Qt::ScrollBarAlwaysOff


 true

   
   

 
  32
  86
  83
  65
 


 
  Courier
  12
  50
  false
 


 false


 color: rgb(0, 0, 127);
background-color: rgb(255, 255, 127);


 QFrame::StyledPanel


 QFrame::Sunken


 Qt::ScrollBarAlwaysOff


 true

   
   

 
  114
  86
  83
  65
 


 
  Courier
  12
  50
  false
 


 false


 color: rgb(0, 0, 127);
background-color: rgb(255, 255, 127);


 QFrame::StyledPanel


 QFrame::Sunken


 Qt::ScrollBarAlwaysOff


 true

   
   

 
  196
  86
  83
  65
 


 
  Courier
  12
  50
  false
 


 false
   

Re: Free OCR package in Python and selecting appropriate widget for the GUI

2021-09-22 Thread Mohsen Owzar
DFS schrieb am Mittwoch, 22. September 2021 um 05:10:30 UTC+2:
> On 9/21/2021 10:38 PM, Mohsen Owzar wrote: 
> > DFS schrieb am Dienstag, 21. September 2021 um 15:45:38 UTC+2: 
> >> On 9/21/2021 4:36 AM, Mohsen Owzar wrote: 
> >>> Hi Guys 
> >>> Long time ago I've written a program in Malab a GUI for solving Sudoku 
> >>> puzzles, which worked not so bad. 
> >>> Now I try to write this GUI with Python with PyQt5 or TKinter. 
> >>> First question is: 
> >>> Is there any free OCR software, packages or code in Python, which I can 
> >>> use to recognize the given digits and their positions in the puzzle 
> >>> square. 
> >>> Second: 
> >>> Because, I can not attach a picture to this post, I try to describe my 
> >>> picture of my GUI. 
> >> Draw your GUI in PyQt designer or other graphics tool, then upload a 
> >> screenshot of it to imgur, then post the link to the picture. 
> > Thanks, for your answer. 
> > But, what is "imgur"? 
> > I'm not so familiar with handling of pictures in this group. 
> > How can I call "imgur" or how can I get there? 
> > 
> > Regards 
> > Mohsen
> www.imgur.com 
> 
> It's a website you can upload image files or screenshots to. Then you 
> can copy a link to your picture and post the link here.
I have already posted the link, but I can not see it anywhere.
Now, I post it again:
https://imgur.com/a/Vh8P2TE
I hope that you can see my two images.
Regards
Mohsen
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Free OCR package in Python and selecting appropriate widget for the GUI

2021-09-22 Thread DFS

On 9/21/2021 10:38 PM, Mohsen Owzar wrote:

DFS schrieb am Dienstag, 21. September 2021 um 15:45:38 UTC+2:

On 9/21/2021 4:36 AM, Mohsen Owzar wrote:

Hi Guys
Long time ago I've written a program in Malab a GUI for solving Sudoku puzzles, 
which worked not so bad.
Now I try to write this GUI with Python with PyQt5 or TKinter.
First question is:
Is there any free OCR software, packages or code in Python, which I can use to 
recognize the given digits and their positions in the puzzle square.
Second:
Because, I can not attach a picture to this post, I try to describe my picture 
of my GUI.

Draw your GUI in PyQt designer or other graphics tool, then upload a
screenshot of it to imgur, then post the link to the picture.

Thanks, for your answer.
But, what is "imgur"?
I'm not so familiar with handling of pictures in this group.
How can I call "imgur" or how can I get there?

Regards
Mohsen



www.imgur.com

It's a website you can upload image files or screenshots to.  Then you 
can copy a link to your picture and post the link here.



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


Re: Free OCR package in Python and selecting appropriate widget for the GUI

2021-09-22 Thread Roland Mueller via Python-list
Hello,


ti 21. syysk. 2021 klo 16.53 Mohsen Owzar (mohsen.ow...@gmail.com)
kirjoitti:

> Hi Guys
> Long time ago I've written a program in Malab a GUI for solving Sudoku
> puzzles, which worked not so bad.
> Now I try to write this GUI with Python with PyQt5 or TKinter.
> First question is:
> Is there any free OCR software, packages or code in Python, which I can
> use to recognize the given digits and their positions in the puzzle square.
>

to my knowledge there is no Python package for OCR. Using a free OCR
package that has a command line interface one could integrate this into a
Python script that makes a call to this external OCR e.g. using Python
module subprocess.

BR,
Roland


> Second:
> Because, I can not attach a picture to this post, I try to describe my
> picture of my GUI.
> It is a 3x3 block / matrix (one third of the whole Sudoku 9x9 block).
> This block must be placed three times in row and columns.
> Each square of this 3x3 block has 3x3 digits from 1 to 9 at the
> initialization time. These digits are spread out in 3x3 equal distances.
> These are small fonts and black.
> The values given by the puzzle are red big fonts and not changeable
> The digits typed by the user are black big fonts and changeable
> If there is a big font from the Puzzle / User, these must be removed from
> the neighboring fields from the 3x3 matrix (1-9).
> Now my question is, actually a hint from your side:
> What should I take as widget for one of these small squares to have
> different content as I described above?
> I thought of a QLineEdit in PyQt5 or LineEdit in TKinter, because the user
> must type some values in there and therefore can not be labels. So again,
> for the sake of the clarity.
> •   When the fields are empty, each square has to show digits from 1
> to 9 with small fonts in 3x3 matrix order.
> •   Given values in the puzzle are big fonts and red.
> •   Digits which are typed by the user are big fonts and black.
> Now the question is, can I take only one LineEdit for all these tree
> situations, or I have to implement 9 small squares for small fonts and a
> big one for the big fonts?
> Any help and suggestion is welcome and appreciated.
>
> Best regards
> Mohsen
> --
> https://mail.python.org/mailman/listinfo/python-list
>
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Free OCR package in Python and selecting appropriate widget for the GUI

2021-09-21 Thread Igor Korot
imgur.com
Then you upload your image and post a perma-link here in reply.


On Tue, Sep 21, 2021, 22:03 Mohsen Owzar  wrote:

> DFS schrieb am Dienstag, 21. September 2021 um 15:45:38 UTC+2:
> > On 9/21/2021 4:36 AM, Mohsen Owzar wrote:
> > > Hi Guys
> > > Long time ago I've written a program in Malab a GUI for solving Sudoku
> puzzles, which worked not so bad.
> > > Now I try to write this GUI with Python with PyQt5 or TKinter.
> > > First question is:
> > > Is there any free OCR software, packages or code in Python, which I
> can use to recognize the given digits and their positions in the puzzle
> square.
> > > Second:
> > > Because, I can not attach a picture to this post, I try to describe my
> picture of my GUI.
> > Draw your GUI in PyQt designer or other graphics tool, then upload a
> > screenshot of it to imgur, then post the link to the picture.
> Thanks, for your answer.
> But, what is "imgur"?
> I'm not so familiar with handling of pictures in this group.
> How can I call "imgur" or how can I get there?
>
> Regards
> Mohsen
> --
> https://mail.python.org/mailman/listinfo/python-list
>
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Free OCR package in Python and selecting appropriate widget for the GUI

2021-09-21 Thread Mohsen Owzar
DFS schrieb am Dienstag, 21. September 2021 um 15:45:38 UTC+2:
> On 9/21/2021 4:36 AM, Mohsen Owzar wrote: 
> > Hi Guys 
> > Long time ago I've written a program in Malab a GUI for solving Sudoku 
> > puzzles, which worked not so bad. 
> > Now I try to write this GUI with Python with PyQt5 or TKinter. 
> > First question is: 
> > Is there any free OCR software, packages or code in Python, which I can use 
> > to recognize the given digits and their positions in the puzzle square. 
> > Second: 
> > Because, I can not attach a picture to this post, I try to describe my 
> > picture of my GUI.
> Draw your GUI in PyQt designer or other graphics tool, then upload a 
> screenshot of it to imgur, then post the link to the picture.
Thanks, for your answer.
But, what is "imgur"?
I'm not so familiar with handling of pictures in this group.
How can I call "imgur" or how can I get there?

Regards
Mohsen
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Free OCR package in Python and selecting appropriate widget for the GUI

2021-09-21 Thread DFS

On 9/21/2021 4:36 AM, Mohsen Owzar wrote:

Hi Guys
Long time ago I've written a program in Malab a GUI for solving Sudoku puzzles, 
which worked not so bad.
Now I try to write this GUI with Python with PyQt5 or TKinter.
First question is:
Is there any free OCR software, packages or code in Python, which I can use to 
recognize the given digits and their positions in the puzzle square.
Second:
Because, I can not attach a picture to this post, I try to describe my picture 
of my GUI.


Draw your GUI in PyQt designer or other graphics tool, then upload a 
screenshot of it to imgur, then post the link to the picture.


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


Free OCR package in Python and selecting appropriate widget for the GUI

2021-09-21 Thread Mohsen Owzar
Hi Guys
Long time ago I've written a program in Malab a GUI for solving Sudoku puzzles, 
which worked not so bad.
Now I try to write this GUI with Python with PyQt5 or TKinter.
First question is:
Is there any free OCR software, packages or code in Python, which I can use to 
recognize the given digits and their positions in the puzzle square.
Second:
Because, I can not attach a picture to this post, I try to describe my picture 
of my GUI.
It is a 3x3 block / matrix (one third of the whole Sudoku 9x9 block).
This block must be placed three times in row and columns.
Each square of this 3x3 block has 3x3 digits from 1 to 9 at the initialization 
time. These digits are spread out in 3x3 equal distances. These are small fonts 
and black.
The values given by the puzzle are red big fonts and not changeable
The digits typed by the user are black big fonts and changeable
If there is a big font from the Puzzle / User, these must be removed from the 
neighboring fields from the 3x3 matrix (1-9).
Now my question is, actually a hint from your side:
What should I take as widget for one of these small squares to have different 
content as I described above?
I thought of a QLineEdit in PyQt5 or LineEdit in TKinter, because the user must 
type some values in there and therefore can not be labels. So again, for the 
sake of the clarity.
•   When the fields are empty, each square has to show digits from 1 to 9 
with small fonts in 3x3 matrix order.
•   Given values in the puzzle are big fonts and red.
•   Digits which are typed by the user are big fonts and black.
Now the question is, can I take only one LineEdit for all these tree 
situations, or I have to implement 9 small squares for small fonts and a big 
one for the big fonts?
Any help and suggestion is welcome and appreciated.

Best regards 
Mohsen
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Php vs Python gui (tkinter...) for small remote database app

2021-06-15 Thread Menno Holscher

Op 15-06-2021 om 19:14 schreef Grant Edwards:

On 2021-06-15, Menno Holscher  wrote:


There is no difference regarding security concerns.


I find that hard to believe given the long list of CVEs I've just had
to sort through for even fairly recent versions of PHP. I just can't
belive that Python has anywhere close to that many secruity issues.

An excellent example. The "concerns" here are "Is this platform safe?" 
and "Does the supplier/community react promptly to security problems?". 
In case of PHP indeed the safety of the platform is a worry, however, 
apparently if there is a problem, action is taken.


How does the Tkinter/TCL/TK software or the PyQt/Qt do in that respect? 
Just looking at the number of CVEs, is that enough? What if one of these 
stacks has few, but long outstanding security problems? Would that be 
better or worse than the situation for PHP?


As an aside, I do not know the amount of CVEs PHP nor Python is 
receiving. When I search the NIST CVE database for the word Python I get 
43 hits for the last 3 months. None of those are against the language or 
the CPython interpreter and only 1 against a Standard Library package or 
module (urllib3). A lot of the others are for web frameworks and 
extensions for those, as well as Tensorflow. So as you argue, it seems 
Python does really well as a secure development platform.

--
Met vriendelijke groet / Kind regards

Menno Hölscher


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


Re: Php vs Python gui (tkinter...) for small remote database app

2021-06-15 Thread Grant Edwards
On 2021-06-15, Menno Holscher  wrote:

> There is no difference regarding security concerns.

I find that hard to believe given the long list of CVEs I've just had
to sort through for even fairly recent versions of PHP. I just can't
belive that Python has anywhere close to that many secruity issues.

-- 
Grant Edwards   grant.b.edwardsYow! I'd like some JUNK
  at   FOOD ... and then I want to
  gmail.combe ALONE --

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


Re: Php vs Python gui (tkinter...) for small remote database app

2021-06-15 Thread Menno Holscher

Op 14-06-2021 om 21:17 schreef Pascal B via Python-list:

Hi,
I would like to know if for a small app for instance that requires a connection 
to a remote server database if php is more suitable than Python mainly 
regarding security.
Php requires one port for http and one port for the connection to the database open. If using Python with a tkinter gui, I understand a small app can connect to a database so only one port to the database would need to be accessed/open listening to connection. So I would need to worry less 
about security if using Python over Php for something small, like a small 
python app that I give over to users.


Am I missing something in this assertion?


There is no difference regarding security concerns.

In the case of a PHP (or any web app for that matter) you indeed have to 
worry about the security of the connection to the browser. But, e.g. the 
access to the database is only in one place, on the server. If you use a 
Tkinter application, each user will have the access to the database at 
his/her own machine, causing other worries than connection security. The 
attack vector may be different, but the worries are no less or more in 
one of the solutions.


First investigate what you need to be afraid of/worried about, do not 
make a decision on a simple criterion like the number of connections.


--
Met vriendelijke groet / Kind regards

Menno Hölscher


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


Re: Php vs Python gui (tkinter...) for small remote database app

2021-06-15 Thread Tomasz Rola
On Tue, Jun 15, 2021 at 08:39:51AM +1200, dn via Python-list wrote:
> On 15/06/2021 07.17, Pascal B via Python-list wrote:
> > Hi,
> > I would like to know if for a small app for instance that requires a 
> > connection to a remote server database if php is more suitable than Python 
> > mainly regarding security.
> > Php requires one port for http and one port for the connection to the 
> > database open. If using Python with a tkinter gui, I understand a small app 
> > can connect to a database so only one port to the database would need to be 
> > accessed/open listening to connection. So I would need to worry less about 
> > security if using Python over Php for something small, like a small python 
> > app that I give over to users.
> > 
> > Am I missing something in this assertion?
> 
> Yes - or maybe I'm missing the point of your question?
> 
> There are two connections to consider: the database and the GUI.
> 
> 
> Database:
> 
[...]
> 
> 
> GUI:
> 
[...]
> The (Internet-connected) world runs on TLS. If you wish to
> secure/encrypt communications between application and server, this is
> accepted by most. If you wish to 'secure' by reducing inter-connections,
> then using tkinter and its tight-linkage to Python removes the need for
> the (http) web-server.

I would rather go with https-based "app", but not necessarily in PHP,
if security is to be considered (albeit I am not sure if Python
framework would do better).

Nowadays, there should be a firewall and server sitting behind it
(this is simple description, let us not put load balancing, many
servers etc into the mix, or if firewall really helps). So, in case of
http(s), there should be more tutorials and hints about doing this
well. Browser would do the gui side, http server will talk to the
database and to the world, but database itself is secured (hopefully)
from outside access. I suspect it is easier to secure web server than
db from various kind of 'kacks'. If you go with well rounded Python
framework, you can count on its authors carefully thinking about
various threats to apps written in it. Sorry, I cannot give any hints
- see, I rather deteste browser based apps, so this advice goes
against my own liking but one should be objective when giving
advices...

If you are truly new to this all, I suggest CGI, especially if you
want to do some proof of concept prototype, quickly. CGI is quite easy
to understand and as long as you are working out communications
between your code and DB, I think it simplifies the job a lot. Later
on, choose your framework and do the gui.

If you go with tkinter, then you will have to do the job already done
by authors of web server and web framework, you will have to rethink
various problems they gave their thoughts to, but in much shorter time
and on your own.

-- 
Regards,
Tomasz Rola

--
** A C programmer asked whether computer had Buddha's nature.  **
** As the answer, master did "rm -rif" on the programmer's home**
** directory. And then the C programmer became enlightened...  **
** **
** Tomasz Rola  mailto:tomasz_r...@bigfoot.com **
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Php vs Python gui (tkinter...) for small remote database app

2021-06-14 Thread dn via Python-list
On 15/06/2021 07.17, Pascal B via Python-list wrote:
> Hi,
> I would like to know if for a small app for instance that requires a 
> connection to a remote server database if php is more suitable than Python 
> mainly regarding security.
> Php requires one port for http and one port for the connection to the 
> database open. If using Python with a tkinter gui, I understand a small app 
> can connect to a database so only one port to the database would need to be 
> accessed/open listening to connection. So I would need to worry less about 
> security if using Python over Php for something small, like a small python 
> app that I give over to users.
> 
> Am I missing something in this assertion?

Yes - or maybe I'm missing the point of your question?

There are two connections to consider: the database and the GUI.


Database:

In each case, the programming-language must make a connection to the
Database Management System. The API, the manner for doing-so may vary
slightly between DBMS-es, but will not particularly between languages.
Thus, if we talk about MySQL/MariaDB, the data which must be exchanged
between language and DBMS is identical (even if the code, and appearance
of the 'variables' differs).

As far as security goes, the different DBMS-publishers have decided, in
their wisdom, to select different IP-ports for communication with their
products (see
https://en.wikipedia.org/wiki/List_of_TCP_and_UDP_port_numbers). Please
refer to (their, cf Python's) specific documentation to ascertain
security and encryption options.


GUI:

There's a bit of 'chalk and cheese' in this question. PHP is built
around HTML. HTML requires an HTTP server (ignoring the interpreter
built-in to a web-browser). Thus, PHP or Python (likely Python plus
Flask or some other framework) will need to connect to
httpd/Apache/NGINX/etc, in similar fashion to the above. In this case,
the choice of IP-port is more standard - 80 for http and 443 for https.

Whereas tkinter is a module which can be import-ed into a Python
program(me). There is no separate server. Thus no need for an
IP-connection between application and front-end.


The (Internet-connected) world runs on TLS. If you wish to
secure/encrypt communications between application and server, this is
accepted by most. If you wish to 'secure' by reducing inter-connections,
then using tkinter and its tight-linkage to Python removes the need for
the (http) web-server.
-- 
Regards,
=dn
-- 
https://mail.python.org/mailman/listinfo/python-list


Php vs Python gui (tkinter...) for small remote database app

2021-06-14 Thread Pascal B via Python-list
Hi,
I would like to know if for a small app for instance that requires a connection 
to a remote server database if php is more suitable than Python mainly 
regarding security.
Php requires one port for http and one port for the connection to the database 
open. If using Python with a tkinter gui, I understand a small app can connect 
to a database so only one port to the database would need to be accessed/open 
listening to connection. So I would need to worry less about security if using 
Python over Php for something small, like a small python app that I give over 
to users.

Am I missing something in this assertion?
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue44183] Can't install certificates if GUI tools are not installed on macOS

2021-05-19 Thread Ned Deily


Change by Ned Deily :


--
assignee:  -> ned.deily

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44183] Can't install certificates if GUI tools are not installed on macOS

2021-05-19 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
components: +macOS
nosy: +ned.deily, ronaldoussoren

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44183] Can't install certificates if GUI tools are not installed on macOS

2021-05-19 Thread Joseph Trask Still


New submission from Joseph Trask Still :

This issue occurs on my M1 MacBook Pro running macOS 11.3.1.
Steps to reproduce:
1. Open the Python installation package
2. When asked where to install the package, click "Customize" at the bottom of 
the dialog
3. Uncheck the GUI Tools option
4. Proceed through the installation as normal
5. At the conclusion of the installation, when offered to install certificates, 
click either the Finder link, or the link to the ReadMe.  The system will play 
the error sound, and nothing will open.

The issue appears to occur due to the fact the Python 3.9 folder is not created 
in Applications if the GUI Tools are not installed.

--
components: Installation
messages: 393998
nosy: thetechconspiracy
priority: normal
severity: normal
status: open
title: Can't install certificates if GUI tools are not installed on macOS
type: behavior
versions: Python 3.9

___
Python tracker 
<https://bugs.python.org/issue44183>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37745] 3.8b3 - windows install gui/ inconsistent options

2021-03-30 Thread Dimitri Merejkowsky


Dimitri Merejkowsky  added the comment:

> the inevitable confusion when multiple PATH updates do not play well together 
> (which they don't).

Oh I see. Did not think about that. I can see a scenario where you install 3.9, 
PATH is set, you install 3.10, the PATH update fails for some reason and then 
you get stuck because PATH was not updated correctly... and then you're back to 
manually setting PATH which was the thing we were trying to prevent ...

> you can modify [Python installations coming from the Windows store] through 
> the built-in "Manage App Execution Aliases" control panel if you have 
> multiple)

Good to know, thanks. That was one of my concerns actually.

> I'm sick to death of being abused over this issue

I'm sorry to hear that and I apologize - I was simply trying to get answers.

Well, now that I know why the box is not ticked, I can say I'm happy with the 
state of the installer, and I guess I'll continue to teach my students about 
PATH - after all, it's a useful skill to have ;)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37745] 3.8b3 - windows install gui/ inconsistent options

2021-03-29 Thread Steve Dower


Steve Dower  added the comment:

The main problem with adding Python to PATH is interfering with other 
application's DLL and executable resolution order, as well as the inevitable 
confusion when multiple PATH updates do not play well together (which they 
don't).

The best thing you can do with your students (those on Windows 10, at least) is 
get Python from the Microsoft Store, which is able to do the PATH updates 
property (and you can modify them through the built-in "Manage App Execution 
Aliases" control panel if you have multiple).

Any other solution that is reliable, maintainable (for users) and usable is 
going to require significantly more development (and will break many existing 
users' workflows, but hopefully not too badly) than just flipping the checkbox. 
But some of us are thinking about it (me in particular, since I'm sick to death 
of being abused over this issue but would rather find a good way to fix it than 
just quit).

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37745] 3.8b3 - windows install gui/ inconsistent options

2021-03-25 Thread Dimitri Merejkowsky


Dimitri Merejkowsky  added the comment:

I know this is two years later so maybe this is not the best way to get 
answers, but Steve Dower said:

> We don't add Python to PATH by default (because it's bad), and people 
> couldn't find the option

Could someone clarify this for me? Because my experience as a Python teacher 
tells me the exact opposite.

For context, I've been teaching Python to absolute beginners (some of them do 
not even know how to *use* Windows to begin with).

I do tell them repeatedly to make sure to tick the "add python to Path", but 
every time, one of them forgot.

This gets even worse when the course is done remotely because I have to *tell* 
the students what to do through a screen-sharing app ...

Here's what I had to tell one of the students to do this morning.

Step 1: Tick "Display Hidden Items" in the Display option of the Windows File 
Explorer

Step 2: Go into c:\users\AppData

Step 3: Type `python.exe` in the search bar

Step 4: Copy/paste the full path 

Step 5: Open "Edit environment variables for my account"

Step 6: Click on "Edit environment variables"

Step 7: Click on Path

Step 8: Copy/paste the full path, without "python.exe"

Step 9: Copy/paste the full path, adding `\Scripts\` at the end

Step 10: restart cmd.exe


In insight, I wonder if I should have just told him to just re-run the 
installer and tick the box ...

Some notes: 

Fixing #14302 would help for step 9, which is nice.

I know very well that writing a Windows installer is far for trivial, but I'm 
ready to try and make a PR anyway. That being said, I understand there may be 
good reasons to *not* add python to PATH that I don't know about.

--
nosy: +Dimitri Merejkowsky

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3905] subprocess failing in GUI applications on Windows

2021-03-04 Thread Eryk Sun


Eryk Sun  added the comment:

For whatever the reason and Windows version, it's still the case that 
_get_handles() should work around any bad standard handles in the current 
process. In bpo-25492, I suggested checking os.get_handle_inheritable(). That's 
too permissive. It should require a valid file handle, checked via 
_winapi.GetFileType(). For example:

if stdin is None:
p2cread = _winapi.GetStdHandle(_winapi.STD_INPUT_HANDLE)
if p2cread is not None:
try:
_winapi.GetFileType(p2cread)
except OSError:
p2cread = None

--
components: +Library (Lib)
versions: +Python 3.10, Python 3.9 -Python 2.7, Python 3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



ANN: wxGlade GUI builder release 1.0.1

2020-12-31 Thread Dietmar Schwertberger

Hi!


I'm pleased to announce the availability of wxGlade revision 1.0.1
Please download from 
https://sourceforge.net/projects/wxglade/files/wxglade/1.0.1/


wxGlade is a GUI builder for wxWidgets and wxPython.

The documentation includes a tutorial for people who have not used wxPython
before.
Included are also examples for integration with matplotlib.
A snapshot of the documentation is available at 
http://wxglade.sourceforge.net/docs/index.html


For support, there's a mailing list at 
https://sourceforge.net/p/wxglade/mailman/wxglade-general/
git repository and bug tracker are at https://github.com/wxGlade/wxGlade
(These pages are also linked from the help menu.)



Changes in revision 1.0.x:
==

Besides many improvements in usability, code generation and widget support,
this is also a major internal refactoring of the main data structure and how
widgets in the Design window are created / updated / destroyed.


*General:*
 - sizers only required where wx requires them; not required e.g. for
   Frame->Panel (used to be Frame->Sizer->Panel)
 - better handling of display updates when properties are edited
 - accessibility and usability improvements
 - Dialog example
 - documentation update

*Widgets:*
 - all: separate class related properties into Class / Base Classes /
   Instance Class
 - Dialog: add StdDialogButtonSizer and standard buttons (stock items);
   support SetAffirmativeId, SetEscapeId
 - Button: support for image direction
 - MenuBar: support lambda event handlers
 - GridBagSizer: indicate overlapped slots in the Tree view

*Generated Code:*
 - no separation into __set_properties/__do_layout any more
 - support for instantiation classes

*Internal:*
 - internal structures refactored
 - add shell window and Tree Printer

wxGlade is released under the MIT license.


Happy New Year,
Dietmar Schwertberger
diet...@schwertberger.de

https://sourceforge.net/projects/wxglade/files/wxglade/1.0.1/;>wxGlade 
1.0.1 - GUI builder for wxPython (31-Dec-20)

___
Python-announce-list mailing list -- python-announce-list@python.org
To unsubscribe send an email to python-announce-list-le...@python.org
https://mail.python.org/mailman3/lists/python-announce-list.python.org/
Member address: arch...@mail-archive.com


Re: Solaris 11 GUI framework

2020-11-03 Thread Grant Edwards
On 2020-11-02, Igor Korot  wrote:
> On Mon, Nov 2, 2020, 3:57 PM Jay Braun  wrote:
>
>> Looking for a GUI framework supported on Solaris 11.
>
> Wxpython, pygtk, Java.

I wouldn't start a new project with pygtk. It's obsolete (Python2
only) and is no longer supported/available on some platforms. It's
been replace by PyGObject

  https://pygobject.readthedocs.io/en/latest/

Porting from PyGtk to PyGObject is pretty straight-forward, but
PyGObject is definitely less "Pythonic". While PyGtk was a
hand-crafted set of python bindings for GTK2, PyGObject is sort-of
automated based on the standard introspection features of GObject
libraries. I've heard this requires a lot less maintenance than the
old PyGTK bindings.

--
Grant

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


Re: Solaris 11 GUI framework

2020-11-02 Thread Igor Korot
Hi,

On Mon, Nov 2, 2020, 5:02 PM Jay Braun  wrote:

> Thank you.  I should have mentioned that I am looking for a Python GUI
> framework.  I neglected to mention that since this is a Python group.
> Sorry.
>

Well, first 2 are python and base on gtk.

Thank you.

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


Re: Solaris 11 GUI framework

2020-11-02 Thread Jay Braun
Thank you.  I should have mentioned that I am looking for a Python GUI 
framework.  I neglected to mention that since this is a Python group.  Sorry.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Solaris 11 GUI framework

2020-11-02 Thread Igor Korot
Hi,



On Mon, Nov 2, 2020, 3:57 PM Jay Braun  wrote:

> Looking for a GUI framework supported on Solaris 11.
>

Wxpython, pygtk, Java.

Take you poison.

Thank you.

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


Solaris 11 GUI framework

2020-11-02 Thread Jay Braun
Looking for a GUI framework supported on Solaris 11.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: GUI: I am also looking for a nudge into the best (GUI) direction.

2020-11-01 Thread Greg Ewing

On 1/11/20 5:43 pm, Michael Torrie wrote:

In C# world, WinForms is often used, but it's not "native" win32
widgets.  Widgets are implemented in managed code (according to
Wikipedia) that draw themselves using the theming dll so they look
native, or at least look somewhat consistent with regards to button
styles, fonts, colors, etc.


Well, Microsoft has a lot more resources than your typical third
party GUI toolkit developer to spend on re-doing everything
periodically. It still make sense to let them do the hard work
instead of replicating it all yourself.


In fact I know of very few
Windows applications that use exclusively the basic native widget set
from win32.


Which is understandable -- the raw Windows GUI API is pretty
cruddy and doesn't do a lot of what one expects from a modern
GUI toolkit.

But I still think it's better to base your UI on one of the
standard offerings from Microsoft such as WinForms rather than
rolling your own.

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


Re: GUI: I am also looking for a nudge into the best (GUI) direction.

2020-10-31 Thread Michael Torrie
On 10/31/20 5:42 PM, Greg Ewing wrote:
> On 1/11/20 9:44 am, Barry Scott wrote:
> 
>> It does not appear to me that use native widgets is important for a tool kit.
> 
> It's not strictly necessary. However, recreating the exact appearance
> and behaviour of native widgets is a lot of work, and difficult to do
> well -- most toolkits that attempt this don't manage to get all the
> details exactly right.
> 
> Moreover, a lot of maintenance effort is needed to keep up with
> changes to the native widgets which frequently happen with OS updates.
> And even if the toolkit is kept up to date, you need to install a
> new version of the toolkit when changes occur.

Maybe. However it seems like this is the route nearly everyone takes
these days, include MS themselves. See below.

> On the other hand, if the toolkit wraps the platform's native widgets,
> it gets all the correct appearance and behaviour, and automatically
> tracks changes.
> 
> For these reasons I regard "uses native widgets" as a mark of quality
> for a toolkit.

In C# world, WinForms is often used, but it's not "native" win32
widgets.  Widgets are implemented in managed code (according to
Wikipedia) that draw themselves using the theming dll so they look
native, or at least look somewhat consistent with regards to button
styles, fonts, colors, etc.

With the introduction of UWP apps, "native" has further lost meaning.
Going forward, perhaps MS intends UWP to be the new native. I don't know
and I'm not sure MS knows.

MS Office hasn't used native win32 widgets for many years now (since
Office 2000 I think, perhaps before).  In fact I know of very few
Windows applications that use exclusively the basic native widget set
from win32.  Nearly all apps use some kind of GUI framework, from MS or
elsewhere, that implement their own widgets, often using the Theming
system to draw them and get the colors right.  Some apps don't even
bother trying to look native--and yes those tend to be low-quality apps
like antivirus programs.  Shudder.

I think notepad.exe, regedit.exe, etc, are probably the only apps I've
used recently that actually use "native" win32 widgets.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: GUI: I am also looking for a nudge into the best (GUI) direction.

2020-10-31 Thread Greg Ewing

On 1/11/20 9:44 am, Barry Scott wrote:


It does not appear to me that use native widgets is important for a tool kit.


It's not strictly necessary. However, recreating the exact appearance
and behaviour of native widgets is a lot of work, and difficult to do
well -- most toolkits that attempt this don't manage to get all the
details exactly right.

Moreover, a lot of maintenance effort is needed to keep up with
changes to the native widgets which frequently happen with OS updates.
And even if the toolkit is kept up to date, you need to install a
new version of the toolkit when changes occur.

On the other hand, if the toolkit wraps the platform's native widgets,
it gets all the correct appearance and behaviour, and automatically
tracks changes.

For these reasons I regard "uses native widgets" as a mark of quality
for a toolkit.

--
Greg

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


Re: GUI: I am also looking for a nudge into the best (GUI) direction.

2020-10-31 Thread Barry Scott



> On 31 Oct 2020, at 16:37, Igor Korot  wrote:
> 
> Hi, Barry,
> 
> On Sat, Oct 31, 2020, 3:39 AM Barry Scott  <mailto:ba...@barrys-emacs.org>> wrote:
> 
> 
> > On 29 Oct 2020, at 15:54, flaskee via Python-list  > <mailto:python-list@python.org>> wrote:
> > 
> > Hello!
> > 
> > I've been reading the GUI toolkit posts.
> > 
> > If anyone can give me a push in the right python direction on
> > my needs, I'd be grateful.
> > 
> > This is for business applications, not games.
> > (but if a game toolkit fits...)
> > 
> 
> I choose to use PyQt5 for my apps that run on Linux, macOS and Windows.
> 
> You can see my apps code if you wish to see working examples:
> 
> https://barrys-emacs.org <https://barrys-emacs.org/> 
> <https://barrys-emacs.org/ <https://barrys-emacs.org/>>
> https://scm-workbench.barrys-emacs.org/ 
> <https://scm-workbench.barrys-emacs.org/> 
> <https://scm-workbench.barrys-emacs.org/ 
> <https://scm-workbench.barrys-emacs.org/>>
> 
> In the past I had used wxPython but it had too many problems and it was 
> cheaper for
> me to port in PyQt5 then have to carry a lot of platform specific workarounds.
> 
> PyQt5 can target iOS and android.
> 
> With PyQt5 I can develop on Linux and have high confidence that the code will 
> run the
> same way on macOS and Windows.
> 
> Qt does not use native controls on 3 major platforms and so is out of the 
> question...

It looks and feels native so I've been very happy with the way the Qt widgets 
work.

It does not appear to me that use native widgets is important for a tool kit.

So I think that Qt is worth considering.

Barry



> 
> Thank you.
> 
> 
> Barry
> 
> -- 
> https://mail.python.org/mailman/listinfo/python-list 
> <https://mail.python.org/mailman/listinfo/python-list>

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


Re: GUI: I am also looking for a nudge into the best (GUI) direction.

2020-10-31 Thread Igor Korot
Hi, Barry,

On Sat, Oct 31, 2020, 3:39 AM Barry Scott  wrote:

>
>
> > On 29 Oct 2020, at 15:54, flaskee via Python-list <
> python-list@python.org> wrote:
> >
> > Hello!
> >
> > I've been reading the GUI toolkit posts.
> >
> > If anyone can give me a push in the right python direction on
> > my needs, I'd be grateful.
> >
> > This is for business applications, not games.
> > (but if a game toolkit fits...)
> >
>
> I choose to use PyQt5 for my apps that run on Linux, macOS and Windows.
>
> You can see my apps code if you wish to see working examples:
>
> https://barrys-emacs.org <https://barrys-emacs.org/>
> https://scm-workbench.barrys-emacs.org/ <
> https://scm-workbench.barrys-emacs.org/>
>
> In the past I had used wxPython but it had too many problems and it was
> cheaper for
> me to port in PyQt5 then have to carry a lot of platform specific
> workarounds.
>
> PyQt5 can target iOS and android.
>
> With PyQt5 I can develop on Linux and have high confidence that the code
> will run the
> same way on macOS and Windows.
>

Qt does not use native controls on 3 major platforms and so is out of the
question...

Thank you.


> Barry
>
> --
> https://mail.python.org/mailman/listinfo/python-list
>
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: GUI: I am also looking for a nudge into the best (GUI) direction.

2020-10-31 Thread Betty Hollinshead
On Saturday, 31 October 2020 at 08:36:48 UTC, Barry Scott wrote:
> > On 29 Oct 2020, at 15:54, flaskee via Python-list  
> > wrote: 
> > 
> > Hello! 
> > 
> > I've been reading the GUI toolkit posts. 
> > 
> > snip
> >
> Barry

Suggest you look at Glade and pure Python3
Works well on Linux (Fedora here)
No idea about other platforms

GUI Design: Glade
GUI designer which produces an XML description of the target GUI (e.g. 
mainwin.glade)

Python3 code outline
from gi.repository import GObject, Gio, Gdk, Gtk
...
class AppWindow(object):
def __init__():
...
try:
   builder = Gtk.Builder.new_from_file("mainwin.glade")
   builder.connect_signals(self)
    except GObject.GError:
   print("Error reading GUI file")
   raise

There is identical support for using the Glade xml in a C application (but 
Python is easier!).
Liz
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: GUI: I am also looking for a nudge into the best (GUI) direction.

2020-10-31 Thread Betty Hollinshead
On Saturday, 31 October 2020 at 08:36:48 UTC, Barry Scott wrote:
> > On 29 Oct 2020, at 15:54, flaskee via Python-list  
> > wrote: 
> > 
> > Hello! 
> > 
> > I've been reading the GUI toolkit posts. 
> > 
> > If anyone can give me a push in the right python direction on 
> > my needs, I'd be grateful. 
> > 
> > This is for business applications, not games. 
> > (but if a game toolkit fits...) 
> >
> I choose to use PyQt5 for my apps that run on Linux, macOS and Windows. 
> 
> You can see my apps code if you wish to see working examples: 
> 
> https://barrys-emacs.org <https://barrys-emacs.org/> 
> https://scm-workbench.barrys-emacs.org/ 
> <https://scm-workbench.barrys-emacs.org/> 
> 
> In the past I had used wxPython but it had too many problems and it was 
> cheaper for 
> me to port in PyQt5 then have to carry a lot of platform specific 
> workarounds. 
> 
> PyQt5 can target iOS and android. 
> 
> With PyQt5 I can develop on Linux and have high confidence that the code will 
> run the 
> same way on macOS and Windows. 
> 
> Barry
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: GUI: I am also looking for a nudge into the best (GUI) direction.

2020-10-31 Thread Barry Scott



> On 29 Oct 2020, at 15:54, flaskee via Python-list  
> wrote:
> 
> Hello!
> 
> I've been reading the GUI toolkit posts.
> 
> If anyone can give me a push in the right python direction on
> my needs, I'd be grateful.
> 
> This is for business applications, not games.
> (but if a game toolkit fits...)
> 

I choose to use PyQt5 for my apps that run on Linux, macOS and Windows.

You can see my apps code if you wish to see working examples:

https://barrys-emacs.org <https://barrys-emacs.org/>
https://scm-workbench.barrys-emacs.org/ 
<https://scm-workbench.barrys-emacs.org/>

In the past I had used wxPython but it had too many problems and it was cheaper 
for
me to port in PyQt5 then have to carry a lot of platform specific workarounds.

PyQt5 can target iOS and android.

With PyQt5 I can develop on Linux and have high confidence that the code will 
run the
same way on macOS and Windows.

Barry

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


Re: GUI: I am also looking for a nudge into the best (GUI) direction.

2020-10-30 Thread flaskee via Python-list
I was actually working on a summarized list for my question.

I thought that I'd produce an up-to-date
list of GUI toolkits, with everyone's responses;
plus what I've cobbled together from comparisons on other sites.




Sent with ProtonMail Secure Email.

‐‐‐ Original Message ‐‐‐
On Thursday, October 29, 2020 10:18 PM, Dan Stromberg  
wrote:

> On Thu, Oct 29, 2020 at 4:48 PM Ethan Furman et...@stoneleaf.us wrote:
>
> > On 10/29/20 11:30 AM, Igor Korot wrote:
> >
> > > If you have any further questions you can contact me directly.
> >
> > Please do not. By keeping the discussion on the list many people can
> > participate and learn.
>
> This list isn't terribly overnoisy.
>
> But sun-managers had a terrific signal/noise ratio back in the day, by
> asking OP's to receive messages off list, and sending a self-composed
> summary of the replies back to the list.
>
> ---
>
> https://mail.python.org/mailman/listinfo/python-list


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


Re: GUI: I am also looking for a nudge into the best (GUI) direction.

2020-10-29 Thread Dan Stromberg
On Thu, Oct 29, 2020 at 4:48 PM Ethan Furman  wrote:

> On 10/29/20 11:30 AM, Igor Korot wrote:
>
> > If you have any further questions you can contact me directly.
>
> Please do not.  By keeping the discussion on the list many people can
> participate and learn.
>
This list isn't terribly overnoisy.

But sun-managers had a terrific signal/noise ratio back in the day, by
asking OP's to receive messages off list, and sending a self-composed
summary of the replies back to the list.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: GUI: I am also looking for a nudge into the best (GUI) direction.

2020-10-29 Thread Igor Korot
Hi, Ethan,

On Thu, Oct 29, 2020 at 6:51 PM Ethan Furman  wrote:
>
> On 10/29/20 11:30 AM, Igor Korot wrote:
>
> > If you have any further questions you can contact me directly.
>
> Please do not.  By keeping the discussion on the list many people can 
> participate and learn.

If the OP has further questions about wx{Widgets, Python, Phoenix}
(s)he can send me direct e-mail.
But of course if it's related to python itself I'd forward it to the ML.

Thank you.

>
> --
> ~Ethan~
> --
> https://mail.python.org/mailman/listinfo/python-list
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: GUI: I am also looking for a nudge into the best (GUI) direction.

2020-10-29 Thread Ethan Furman

On 10/29/20 11:30 AM, Igor Korot wrote:


If you have any further questions you can contact me directly.


Please do not.  By keeping the discussion on the list many people can 
participate and learn.

--
~Ethan~
--
https://mail.python.org/mailman/listinfo/python-list


Re: GUI: I am also looking for a nudge into the best (GUI) direction.

2020-10-29 Thread flaskee via Python-list
> The Python toolkits that I've looked at feel mostly grid-oriented
> or zone-oriented (you can put the button on the left, or middle,
> or right, etc).

I don't think it is easily possible in a cross-platform environment. But even 
if your software is one platform only how will you handle DPI change, theme 
change and other system changes?

You will have to have some kind of layout system.

-

Thanks Igor.

I'm actually converting a large actionscript set of apps,

that already had Android/iOS, Windows app, Mac app and Browser versions;

and that all shared about 80% of the self-written, layout code.

Works great -- resizes between mobile device sizes automatically,

scales widgets to fit, rotates portrait to landscape,  all of that.

But it had Very poor Linux support.

I want to rebuild for all of these platforms, plus Linux.

Really, MOSTLY, for Linux.

And I really want Python as the new core for most things.

Thanks

Sent with [ProtonMail](https://protonmail.com) Secure Email.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: GUI: I am also looking for a nudge into the best (GUI) direction.

2020-10-29 Thread Igor Korot
Hi,

On Thu, Oct 29, 2020 at 11:33 AM flaskee via Python-list
 wrote:
>
> Hello!
>
> I've been reading the GUI toolkit posts.
>
> If anyone can give me a push in the right python direction on
> my needs, I'd be grateful.
>
> This is for business applications, not games.
> (but if a game toolkit fits...)
>
> I'm coming from Actionscript,
> where there is a lot of GUI flexibility.
>
> The Python toolkits that I've looked at feel mostly grid-oriented
> or zone-oriented (you can put the button on the left, or middle,
> or right, etc).

I don't think it is easily possible in a cross-platform environment.
But even if your software is one platform only how will you handle
DPI change, theme change and other system changes?

You will have to have some kind of layout system.

>
> I am 100% committed to using Python now;
> so I just want to see what toolkit(s)/pieces/frameworks
> will get me as much of the following as possible.
>
> What I'd like:
>
> * To target MacOS, Windows, Linux, Android using native widgets (this drops 
> out Kivy).

See my previous reply.

>
> * To get the screen-size before loading anything else, and to resize controls 
> & forms to have the same as aspect ratio across screen sizes. In actionscript 
> you can say form.scale *= 1.5; and the form and ALL children resize 
> appropriately with that one line.

You are overthinking it.
What if the window will be positioned on half normal DPI screen and
half on HighDPI one?
Or there was a theme change with the start of your software?

As I said you absolutely have to have some kind of layout system or
end up having 100 copies of
same window prepared for a different layouts.

Just accept that there are different layouts available for you that
will handle every possible situation.

>
> * To resize a control/widget and be able to easily move it later. Needed for 
> the following point.
>
> * To handle portrait vs landscape rotation.
> I'm okay on the logic of resizing and repositioning controls accordingly [if 
> the facility to do so exists].

You mean positioning controls on the screen with portrait vs
landscape? Or during printing?
Please clarify.

>
> * Touch events, like swiping, pinch-to-resize, etc.
>
> BeeWare (Toga) has some of this, but BeeWare seems "under-developed" and
> it is not even listed on any of the Python GUI comparison sites
> that I've seen.
>
> I just don't want to go too far down the wrong path, if you good folks can 
> help.
>
> Right now I am plugging away on Gtk to see where that takes me.

As being said GTK does not use native widgets.

>
> Thank you for your help in advance!

If you have any further questions you can contact me directly.
Thank you.

>
> Sent with [ProtonMail](https://protonmail.com) Secure Email.
> --
> https://mail.python.org/mailman/listinfo/python-list
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: GUI: I am also looking for a nudge into the best (GUI) direction.

2020-10-29 Thread Dietmar Schwertberger

On 29.10.2020 16:54, flaskee via Python-list wrote:

Thank you for your help in advance!


Maybe, you should outline what you actually want to accomplish on each 
platform group (desktop / mobile).


Regards,

Dietmar


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


Re: GUI: I am also looking for a nudge into the best (GUI) direction.

2020-10-29 Thread Igor Korot
Hi,

On Thu, Oct 29, 2020 at 1:05 PM Dennis Lee Bieber  wrote:
>
> On Thu, 29 Oct 2020 15:54:33 +, flaskee via Python-list
>  declaimed the following:
>
> >
> >What I'd like:
> >
> >* To target MacOS, Windows, Linux, Android using native widgets (this drops 
> >out Kivy).
> >
> That's going to knock out a lot of stuff. wxWidgets (base for 
> wxPython)
> claims to use true "native widgets" on each supported OS (Android may
> depend upon support for generic X-Window) https://www.wxwidgets.org/about/

This is not a claim - its reality. ;-)
However Android will be a problem - it is not supported by the
library, since its written
in C++, and Android is JAVA-based.
The best way is to learn "JAVAsucks" and write natively for Android.

Thank you.

>
>
> QT and GTK do not use the actual "native widgets" -- they instead have
> styles/themes applied to their own widgets to make them look closer to the
> OS native stuff, but may not behave quite the same.
>
> Tkinter is Tk-based, and doesn't look "native" on anything 
>
>
> --
> Wulfraed Dennis Lee Bieber AF6VN
> wlfr...@ix.netcom.comhttp://wlfraed.microdiversity.freeddns.org/
>
> --
> https://mail.python.org/mailman/listinfo/python-list
-- 
https://mail.python.org/mailman/listinfo/python-list


GUI: I am also looking for a nudge into the best (GUI) direction.

2020-10-29 Thread flaskee via Python-list
Hello!

I've been reading the GUI toolkit posts.

If anyone can give me a push in the right python direction on
my needs, I'd be grateful.

This is for business applications, not games.
(but if a game toolkit fits...)

I'm coming from Actionscript,
where there is a lot of GUI flexibility.

The Python toolkits that I've looked at feel mostly grid-oriented
or zone-oriented (you can put the button on the left, or middle,
or right, etc).

I am 100% committed to using Python now;
so I just want to see what toolkit(s)/pieces/frameworks
will get me as much of the following as possible.

What I'd like:

* To target MacOS, Windows, Linux, Android using native widgets (this drops out 
Kivy).

* To get the screen-size before loading anything else, and to resize controls & 
forms to have the same as aspect ratio across screen sizes. In actionscript you 
can say form.scale *= 1.5; and the form and ALL children resize appropriately 
with that one line.

* To resize a control/widget and be able to easily move it later. Needed for 
the following point.

* To handle portrait vs landscape rotation.
I'm okay on the logic of resizing and repositioning controls accordingly [if 
the facility to do so exists].

* Touch events, like swiping, pinch-to-resize, etc.

BeeWare (Toga) has some of this, but BeeWare seems "under-developed" and
it is not even listed on any of the Python GUI comparison sites
that I've seen.

I just don't want to go too far down the wrong path, if you good folks can help.

Right now I am plugging away on Gtk to see where that takes me.

Thank you for your help in advance!

Sent with [ProtonMail](https://protonmail.com) Secure Email.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: GUI (tkinter) popularity and job prospects for

2020-10-26 Thread Dietmar Schwertberger

On 23.10.2020 18:52, John Pote wrote:
I've used tkinter and wxPython occasionally in the past for 1 off test 
tasks (and interest). What's the advantage of Qt? 


Qt does support mobile and touch oriented user interfaces. Also, it does 
support GUI programs on microcontrollers now on bare-metal.


Desktop development has long moved out of the focus of the Qt company. 
(This shift dates back to the time when Nokia was the owner.)
Just have a look at their start page and you know the focus. Qt company 
is living from expensive industry licenses. Providing frees solutions to 
the open source community is not the core business.


Qt still supports traditional desktop development in form of Qt Widgets, 
but there's pressure to move to QML. This is more comparable to the 
HTML/CSS/Javascript approach.
Personally I would not want to go that way for desktop applications. The 
traditional single-language approach with API and debugger seems much 
more straightforward and time-saving.


For many types of desktop applications I would just recommend wxPython, 
together with wxGlade as a GUI builder. This will provide a quick start 
and high productivity for many tasks.
That's another point: Qt Designer is recognized as one of the most 
advanced GUI builders, but when you actually want to use it with Python 
it does not really help you much. Using it is too complicated for the 
beginner or casual user and for the advanced user it's easier to avoid 
it completely.


Regards

Dietmar

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


Re: GUI (tkinter) popularity and job prospects for

2020-10-26 Thread Edmondo Giovannozzi
Il giorno venerdì 23 ottobre 2020 alle 18:55:53 UTC+2 john... ha scritto:
> On 23/10/2020 05:47, Grant Edwards wrote: 
> > 
> >> I think that commercial desktop applications with a python 
> >> compatible GUI would likely use QT or a Python binding thereof. 
> > Agreed. If you want to improve you "hirability" for GUI application 
> > development, I would probably put Qt first. Then gobject or 
> > wx. Tkinter would probably be last.
> I've used tkinter and wxPython occasionally in the past for 1 off test 
> tasks (and interest). What's the advantage of Qt? 
> 
> John

I use PyQt in research application, there is a library pyqtgraph 
(http://www.pyqtgraph.org/) based on Qt that is very fast, you can zoom and pan 
even complicated plots, it is much faster than matplotlib.

For me, the graphic makes the difference.
-- 
https://mail.python.org/mailman/listinfo/python-list


  1   2   3   4   5   6   7   8   9   10   >