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 =

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

2018-08-27 Thread Brett Cannon
On Fri, 24 Aug 2018 at 18:18 Mike Barnett wrote: > It’s fascinating just how many packages are being dragged out for > examination or clobbering other than the one that I asked for > assistance/help on. > > > > I see the code of conduct link in the thread. Perhaps a review would be > helpful. >

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]: #

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

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

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 =

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

2018-08-24 Thread Mike Barnett
It’s fascinating just how many packages are being dragged out for examination or clobbering other than the one that I asked for assistance/help on. I see the code of conduct link in the thread. Perhaps a review would be helpful. Unsubscribing from this mess. “Python Ideas” ?

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

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;

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

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

2018-08-24 Thread Mike Barnett
Nice Matt! Thanks for taking the time to code it up! It’s great to see examples like these. @mike From: Python-ideas On Behalf Of Matthew Einhorn Sent: Friday, August 24, 2018 7:51 PM To: python-ideas@python.org Subject: Re: [Python-ideas] A GUI for

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

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

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

2018-08-24 Thread Matthew Einhorn
Hi Mike I'm not sure this thread is python-ideas appropriate, but since the challenge is out, here it is using Kivy. The code and result is at https://gist.github.com/matham/45c4f1fbd8c3fccf6557b3b48356cd50 (image

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

2018-08-24 Thread Clément Pit-Claudel
Hi Mike, Thanks, this code is nice and short. Is adding 'if button is None: break' to the 'Read' version of your code the right way to make it exit when the main window is closed? (On my machine it enters an infinite loop after I close the main window). For comparison, I tried doing this

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

2018-08-24 Thread Mike Barnett
I should have mentioned that you need the GitHub version of the code in order to get the keyboard events. Rather than do a pip install you can download this file and put it in your project folder: https://github.com/MikeTheWatchGuy/PySimpleGUI/blob/master/PySimpleGUI.py Sorry for any

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

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
Yea, software evolves. Things get layered on top of other things. It’s kind of how software works. Perhaps the point is getting lost here on my request to comment on the overall construct and simplicity. Let’s try a different approach… How about a quick example that you code up in your

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

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:

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

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,

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

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
Liking the comments Paul! Backing up to the beginning, I know I'm far far far away from attempting to become a part of stdlib. However, that does not mean I can't set that as the target and begin to understand the path to get there. My initial post was an attempt to understand this path.

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

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

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

2018-08-24 Thread Mike Barnett
I saw this list prior to writing PySimpleGUI. My goal is for this architecture to be on that list down the road. Don’t care if it’s this package, only that something similar exist and is known in the community. There is a gaping hole between command line and a simple GUI on the screen. It’s

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.

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

[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 =

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

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.

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

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 >

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

2018-08-23 Thread Mike Barnett
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 = [ [sg.Text('Please enter your Name, Address, Phone')],

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

[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