Re: [Python-ideas] A GUI for beginners and experts alike

2018-08-28 Thread Jacco van Dorp
Didn't see the Qt version of the adding together with GUI yet, so here I have a minimalist version: import sys from PyQt5.QtWidgets import QWidget, QSpinBox, QLabel, QApplication, QHBoxLayout app = QApplication(sys.argv) w = QWidget() w.setLayout(QHBoxLayout()) spinOne = QSpinBox(w) spinTwo = QS

Re: [Python-ideas] A GUI for beginners and experts alike

2018-08-27 Thread Brett Cannon
@python.org> *On Behalf Of *Stephan Houben > *Sent:* Friday, August 24, 2018 9:07 PM > *To:* Chris Barker > *Cc:* Python-Ideas > > > *Subject:* Re: [Python-ideas] A GUI for beginners and experts alike > > > > > > Op za 25 aug. 2018 02:28 schreef Chris Ba

Re: [Python-ideas] A GUI for beginners and experts alike

2018-08-24 Thread Wes Turner
ipywidgets and toga* implementations of the ABC demo: | source: https://github.com/westurner/guidemo # ipywidgetsdemo/ipywidgets_abc_demo.py (.ipynb) # # ipywidgets ABC demo # - Update an output widget with the sum of two input widgets when the 'change' event fires # In[1]: # https://ipywidgets

Re: [Python-ideas] A GUI for beginners and experts alike

2018-08-24 Thread Cody Piersall
On Thu, Aug 23, 2018 at 11:59 PM Steve Barnes wrote: > There are already 2 ways of turning a python program that uses argparse > into a GUI, (Gooey for wx & Quicken for QT IIRC), with minimal > modification. There are a lot of good arguments for teaching people to > use argparse and to write their

Re: [Python-ideas] A GUI for beginners and experts alike

2018-08-24 Thread Greg Ewing
Mike Barnett wrote: Unsubscribing from this mess. “Python Ideas” ? We didn't mean to drive you away! Python discussions have a tendency to roam far and wide. It doesn't mean we're not interested in what you have to say. Any new package is naturally going to invite comparisons with similar thi

Re: [Python-ideas] A GUI for beginners and experts alike

2018-08-24 Thread Greg Ewing
Here are some PyGUI versions of the ABC Challenge. # Modal from GUI import ModalDialog, Label, TextField, Row, Column, Grid from GUI.StdButtons import DefaultButton, CancelButton from GUI.Alerts import note_alert a = TextField(width = 100) b = TextField(widt

Re: [Python-ideas] A GUI for beginners and experts alike

2018-08-24 Thread Mike Barnett
<mailto:mike_barn...@hotmail.com> From: Python-ideas On Behalf Of Stephan Houben Sent: Friday, August 24, 2018 9:07 PM To: Chris Barker Cc: Python-Ideas Subject: Re: [Python-ideas] A GUI for beginners and experts alike Op za 25 aug. 2018 02:28 schreef Chris Barker - NOAA Federal via Python

Re: [Python-ideas] A GUI for beginners and experts alike

2018-08-24 Thread Greg Ewing
Chris Barker - NOAA Federal wrote: Now that you say that, I think I’m mingling memories — there was another project that attempted to wrap TKInter, wxPython, QT .. I always thought that was ill advised. You're probably thinking of "anygui" (named in the spirit of "anydbm"). As far as I remember

Re: [Python-ideas] A GUI for beginners and experts alike

2018-08-24 Thread Stephan Houben
Op za 25 aug. 2018 02:28 schreef Chris Barker - NOAA Federal via Python-ideas : > > > Too bad all the cool kids are doing web dev these days — hard to get > help with a desktop GUI project :-( > Pywebview seems interesting, uses a platform webview to put up the UI; https://github.com/r0x0r/pywe

Re: [Python-ideas] A GUI for beginners and experts alike

2018-08-24 Thread Chris Barker - NOAA Federal via Python-ideas
> If you're talking about my PyGUI project, using it with > wPython doesn't really make sense. Now that you say that, I think I’m mingling memories — there was another project that attempted to wrap TKInter, wxPython, QT .. I always thought that was ill advised. > The goal is to provide exactly o

Re: [Python-ideas] A GUI for beginners and experts alike

2018-08-24 Thread Mike Barnett
e True: > button, values = form.ReadNonBlocking() > if button is None and values is None: > break > a, b = values > try: > output.Update(int(a) + int(b)) > except: > pass > > > > @mike > > -Original Message

Re: [Python-ideas] A GUI for beginners and experts alike

2018-08-24 Thread Chris Barker - NOAA Federal via Python-ideas
while True: button, (a,b) = form.Read() try: answer = int(a) + int(b) output.Update(answer) except: pass Whoa! You really want people to write their own event loop? That seems like a bad idea to me. If you want people to not have to think about events much, maybe lo

Re: [Python-ideas] A GUI for beginners and experts alike

2018-08-24 Thread Greg Ewing
Chris Barker via Python-ideas wrote: In fact, there was an effort along these lines a few years back: http://www.cosc.canterbury.ac.nz/greg.ewing/python_gui/ I don't know that it's seen much development lately. It hasn't, sorry to say. Turns out that writing and maintaining what is effective

Re: [Python-ideas] A GUI for beginners and experts alike

2018-08-24 Thread Matthew Einhorn
. The > answer is that the posted version blocks until some kind of form input. > Should you want to turn the program into one that polls instead of blocks, > the loop changes slightly to enable form close detection. It's basically > the same with the Read call being replaced by ReadNonBlocking. &g

Re: [Python-ideas] A GUI for beginners and experts alike

2018-08-24 Thread Clément Pit-Claudel
break > a, b = values > try: > output.Update(int(a) + int(b)) > except: > pass > > > > @mike > > -Original Message- > From: Mike Barnett > Sent: Friday, August 24, 2018 3:36 PM > To: Chris Angelico ; Python-I

Re: [Python-ideas] A GUI for beginners and experts alike

2018-08-24 Thread Mike Barnett
ssage- From: Mike Barnett Sent: Friday, August 24, 2018 3:36 PM To: Chris Angelico ; Python-Ideas Subject: RE: [Python-ideas] A GUI for beginners and experts alike So here's my alternative challenge: Take two numbers as inputs. Add them together and display them in a third field. Whene

Re: [Python-ideas] A GUI for beginners and experts alike

2018-08-24 Thread Mike Barnett
So here's my alternative challenge: Take two numbers as inputs. Add them together and display them in a third field. Whenever either input is changed, recalculate the output. This requires proper event handling, so it's less likely to create a useless one-liner that has no bearing on real-wor

Re: [Python-ideas] A GUI for beginners and experts alike

2018-08-24 Thread Chris Angelico
On Sat, Aug 25, 2018 at 5:13 AM, Mike Barnett wrote: > Here we go: > > Take 3 numbers as input (A, B, C). Add them together. Display the result in > a simple pop-up window. > > That’s a pretty typical kind of problem for the first few weeks of beginning > programming. Maybe first few days. >

Re: [Python-ideas] A GUI for beginners and experts alike

2018-08-24 Thread Mike Barnett
com> From: Chris Barker Sent: Friday, August 24, 2018 1:39 PM To: Paul Moore Cc: Mike Barnett ; Python-Ideas Subject: Re: [Python-ideas] A GUI for beginners and experts alike A couple thoughts: You're essentially writing a new API on top of tkINter, you could probably have multiple

Re: [Python-ideas] A GUI for beginners and experts alike

2018-08-24 Thread Chris Barker via Python-ideas
On Fri, Aug 24, 2018 at 10:07 AM, MRAB wrote: > A canvas can contain images, lines and shapes, which is useful for > diagrams and drawings. And the TK Canvas is kinda the "killer app" of TK. -CHB -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R

Re: [Python-ideas] A GUI for beginners and experts alike

2018-08-24 Thread Chris Barker via Python-ideas
A couple thoughts: You're essentially writing a new API on top of tkINter, you could probably have multiple "back-ends" -- i.e. be able to use the same code with wxPython or PySide behind it. In fact, there was an effort along these lines a few years back: http://www.cosc.canterbury.ac.nz/greg.e

Re: [Python-ideas] A GUI for beginners and experts alike (Mike Barnett)

2018-08-24 Thread Wes Turner
Accessibility is a very real advantage of Qt solutions. http://doc.qt.io/qt-5/accessible.html """ [...] applications usable for people with different abilities. It is important to take different people's needs into account, for example, in case of low vision, hearing, dexterity, or cognitive prob

Re: [Python-ideas] A GUI for beginners and experts alike

2018-08-24 Thread MRAB
On 2018-08-24 16:27, Mike Barnett wrote: Liking the comments Paul! [snip] It has the call information about the Text widget and all the others. Is this what you mean by a Signature? Text(Text, scale=(None, None), size=(None, None), auto_size_text=None, font=None, te

Re: [Python-ideas] A GUI for beginners and experts alike (Mike Barnett)

2018-08-24 Thread Chris Barker via Python-ideas
On Fri, Aug 24, 2018 at 8:17 AM, Barry Scott wrote: > > A graphical "hello world" in QT is only half a dozen or less lines of > > code in total, so > > meets the simplicity requirement. > > I think 2 lines is simple, 12 is not really simple, is it? > well, if all you need is a single dialog box

Re: [Python-ideas] A GUI for beginners and experts alike

2018-08-24 Thread Paul Moore
On Fri, 24 Aug 2018 at 16:27, Mike Barnett wrote: > 1. More documentation - reference docs specifically. I don't see > documentation of the call signature for sg.Text, for example. > > A little confused by this one. There are quite a bit of documentation. > Did you see the readme on the GitHub

Re: [Python-ideas] A GUI for beginners and experts alike

2018-08-24 Thread Andre Roberge
On Fri, Aug 24, 2018 at 12:42 PM Barry Scott wrote: > > > On 23 Aug 2018, at 19:49, Mike Barnett wrote: > > Python has dropped the GUI ball, at least for beginners (in my opinion) > > > snip > > I think that this is a very interesting project. Having a simple way to do > GUI's is great for beg

Re: [Python-ideas] A GUI for beginners and experts alike (Mike Barnett)

2018-08-24 Thread Barry Scott
> On 23 Aug 2018, at 23:14, Hugh Fisher wrote: > >> Date: Thu, 23 Aug 2018 18:49:48 + >> From: Mike Barnett >> >> Python has dropped the GUI ball, at least for beginners (in my opinion) >> >> While the Python language is awesomely compact, the GUI code is far from >> compact. Tkinter

Re: [Python-ideas] A GUI for beginners and experts alike

2018-08-24 Thread Barry Scott
> On 23 Aug 2018, at 19:49, Mike Barnett wrote: > > Python has dropped the GUI ball, at least for beginners (in my opinion) > > While the Python language is awesomely compact, the GUI code is far from > compact. Tkinter will create a nice looking GUI, but you’ve got to be > skilled to use

Re: [Python-ideas] A GUI for beginners and experts alike

2018-08-24 Thread Mike Barnett
op: sg.SetOptions(button_color=sg.COLOR_SYSTEM_DEFAULT) Thank you again Paul... I learn something new from every reply 😊 @mike -Original Message- From: Paul Moore Sent: Friday, August 24, 2018 11:13 AM To: mike_barn...@hotmail.com Cc: Wes Turner ; Jonathan Fine ; Python-Ideas Subje

Re: [Python-ideas] A GUI for beginners and experts alike

2018-08-24 Thread Paul Moore
On Fri, 24 Aug 2018 at 15:53, Mike Barnett wrote: > Can a few of you with the vast amount of GUI experience you have, spend 5 > minutes and run one of the examples? I don't have a "vast" amount of GUI experience. But nevertheless I gave it a go. It took less than 5 minutes (which is good). > Th

Re: [Python-ideas] A GUI for beginners and experts alike

2018-08-24 Thread Wes Turner
On Friday, August 24, 2018, Terry Reedy wrote: > On 8/24/2018 4:12 AM, Wes Turner wrote: > > There was a thread about deprecating Tk awhile back. >> > > That was an intentionally annoying troll post, not a serious proposal. > Please don't refer to it as if it were. stdlib inclusion entails year

Re: [Python-ideas] A GUI for beginners and experts alike

2018-08-24 Thread Mike Barnett
UI framework. @mike<mailto:mike_barn...@hotmail.com> From: Wes Turner Sent: Friday, August 24, 2018 4:17 AM To: Jonathan Fine Cc: Mike Barnett ; python-ideas@python.org Subject: Re: [Python-ideas] A GUI for beginners and experts alike https://docs.python-guide.org/scenarios/gui/<https://eur

Re: [Python-ideas] A GUI for beginners and experts alike

2018-08-24 Thread Terry Reedy
On 8/24/2018 4:12 AM, Wes Turner wrote: There was a thread about deprecating Tk awhile back. That was an intentionally annoying troll post, not a serious proposal. Please don't refer to it as if it were. asyncio event loop support would be great for real world apps. This is unclear. Any

Re: [Python-ideas] A GUI for beginners and experts alike

2018-08-24 Thread Wes Turner
https://docs.python-guide.org/scenarios/gui/ lists a bunch of great GUI projects for Python. https://github.com/realpython/python-guide/blob/master/docs/scenarios/gui.rst On Friday, August 24, 2018, Wes Turner wrote: > > > On Thursday, August 23, 2018, Jonathan Fine wrote: > >> Hi Mike >> >> T

[Python-ideas] A GUI for beginners and experts alike

2018-08-24 Thread Wes Turner
On Thursday, August 23, 2018, Jonathan Fine wrote: > Hi Mike > > Thank you for your prompt response. You wrote > > > Maybe we're on different planes? > > > > I'm talking about 5 lines of Python code to get a custom layout GUI on > the screen: > > > > import PySimpleGUI as sg > > > > form = sg.Fle

Re: [Python-ideas] A GUI for beginners and experts alike

2018-08-23 Thread Steve Barnes
On 24/08/2018 02:04, Mike Barnett wrote: > Wow, Thank you Steve! > > > This is exactly the kind of information I was hoping for!! > > > >> Acceptance for *what* precisely? > > That is a great question... you're right shoulda asked a specific question. > > I would like to see if become som

Re: [Python-ideas] A GUI for beginners and experts alike

2018-08-23 Thread Mike Barnett
Wow, Thank you Steve! This is exactly the kind of information I was hoping for!! > Acceptance for *what* precisely? That is a great question... you're right shoulda asked a specific question. I would like to see if become something official so that it gets out to people automatically. Pe

Re: [Python-ideas] A GUI for beginners and experts alike

2018-08-23 Thread Steven D'Aprano
Hi Mike, and welcome! On Thu, Aug 23, 2018 at 06:49:48PM +, Mike Barnett wrote: > Python has dropped the GUI ball, at least for beginners (in my opinion) Sadly I think that GUIs is one area where Python has not excelled. > While the Python language is awesomely compact, the GUI code is far

Re: [Python-ideas] A GUI for beginners and experts alike (Mike Barnett)

2018-08-23 Thread Hugh Fisher
> Date: Thu, 23 Aug 2018 18:49:48 + > From: Mike Barnett > > Python has dropped the GUI ball, at least for beginners (in my opinion) > > While the Python language is awesomely compact, the GUI code is far from > compact. Tkinter will create a nice looking GUI, but you've got to be > skilled

Re: [Python-ideas] A GUI for beginners and experts alike

2018-08-23 Thread Jonathan Fine
Hi Mike Thank you for your prompt response. You wrote > Maybe we're on different planes? > > I'm talking about 5 lines of Python code to get a custom layout GUI on the screen: > > import PySimpleGUI as sg > > form = sg.FlexForm('Simple data entry form') # begin with a blank form > > layout = [ >

Re: [Python-ideas] A GUI for beginners and experts alike

2018-08-23 Thread Mike Barnett
From: Jonathan Fine Sent: Thursday, August 23, 2018 4:14 PM To: Mike Barnett Cc: python-ideas@python.org Subject: Re: [Python-ideas] A GUI for beginners and experts alike Hi Mike Thank you for your message. I agree, in broad terms, with your statement of goals, and welcome their being discu

Re: [Python-ideas] A GUI for beginners and experts alike

2018-08-23 Thread Jonathan Fine
Hi Mike Thank you for your message. I agree, in broad terms, with your statement of goals, and welcome their being discussed here. Python has important roots are in education. We benefit from taking care of them. Here is what I take to be your statement of goals. > While the Python language is a

[Python-ideas] A GUI for beginners and experts alike

2018-08-23 Thread Mike Barnett
Python has dropped the GUI ball, at least for beginners (in my opinion) While the Python language is awesomely compact, the GUI code is far from compact. Tkinter will create a nice looking GUI, but you've got to be skilled to use it. A student in their first week of Python programming is not g