Re: [FAQ] "Best" GUI toolkit for python

2016-10-19 Thread Paul Rubin
pozz writes: > Is there a visual GUI builder for Tkinter? Not that I know of. I haven't felt I needed one. I generally draw my intended UI on paper and then use the Tk grid layout gadget. > Could you explain better what do you mean with "industrial-looking > UI"? Something that doesn't have

Re: function call questions

2016-10-19 Thread Frank Millman
wrote in message news:5506e4d8-bd1d-4e56-8d1b-f71fa8293...@googlegroups.com... 在 2016年10月19日星期三 UTC+8下午3:17:18,Peter Otten写道: chenyong20...@gmail.com wrote: > 在 2016年10月19日星期三 UTC+8上午11:46:28,MRAB写道: >> On 2016-10-19 03:15, chenyong20...@gmail.com wrote: >> > Thanks Peter and Anssi for your ki

Re: function call questions

2016-10-19 Thread chenyong20000
在 2016年10月19日星期三 UTC+8下午3:17:18,Peter Otten写道: > chenyong20...@gmail.com wrote: > > > 在 2016年10月19日星期三 UTC+8上午11:46:28,MRAB写道: > >> On 2016-10-19 03:15, chenyong20...@gmail.com wrote: > >> > Thanks Peter and Anssi for your kind help. Now I'm ok with the first > >> > question. But the second questi

Re: [FAQ] "Best" GUI toolkit for python

2016-10-19 Thread Demosthenes Koptsis
I have the book already. Thank you Michael Regards, Dim On 10/20/2016 01:30 AM, Michael Torrie wrote: On 10/19/2016 01:13 PM, Demosthenes Koptsis wrote: Did you suggest PySide than PyQt...? Only that I'm using it right now, but I'm making sure my code will run with PyQt. I don't see a h

Re: Converting the keys of a dictionary from numeric to string

2016-10-19 Thread Paul Rubin
pozz writes: > I have a dictionary where the keys are numbers: ... Python 2.7.5: >>> mydict = { 1: 1000, 2: 1500, 3: 100 } >>> keydict = { 1: "apples", 2: "nuts", 3: "tables" } >>> newdict = dict((keydict[k],v) for k,v in mydict.items()) >>> print newdict {'tables': 100, 'nut

Converting the keys of a dictionary from numeric to string

2016-10-19 Thread pozz
I have a dictionary where the keys are numbers: mydict = { 1: 1000, 2: 1500, 3: 100 } I would like to convert keys from number to string representation: mydict = { "apples": 1000, "nuts": 1500, "tables": 100 } Of course, somewhere I have the association between key-numbers and key-strings, ma

Re: [FAQ] "Best" GUI toolkit for python

2016-10-19 Thread Michael Torrie
On 10/19/2016 01:13 PM, Demosthenes Koptsis wrote: > Did you suggest PySide than PyQt...? Only that I'm using it right now, but I'm making sure my code will run with PyQt. I don't see a huge benefit of PySide except for the source code license (LGPL so you can use it without fee in a proprietary

Pyro4 now with remote iterators

2016-10-19 Thread Irmen de Jong
Hi, I have just released Pyro4 version 4.49; https://pypi.python.org/pypi/Pyro4 (super short description: it is a library that allows you to transparently call methods on objects that are running on other machines, as if they were local) Pyro now also supports remote iterators. This means you c

Re: Inplace shuffle function returns none

2016-10-19 Thread Sayth Renshaw
Hi Chris I read this last night and thought i may have woken with a frightfully witty response. I didnt however. Thanks :-) -- https://mail.python.org/mailman/listinfo/python-list

Re: [FAQ] "Best" GUI toolkit for python

2016-10-19 Thread Demosthenes Koptsis
Thanks Michael, now i have a clear look about Py GUIs. Did you suggest PySide than PyQt...? I want to start with a Python Qt Framework. On 10/19/2016 09:43 PM, Michael Torrie wrote: On 10/19/2016 12:18 PM, Demosthenes Koptsis wrote: I thought PyQt was supported by Qt company... I don't thi

Re: [FAQ] "Best" GUI toolkit for python

2016-10-19 Thread Michael Torrie
On 10/19/2016 12:18 PM, Demosthenes Koptsis wrote: > I thought PyQt was supported by Qt company... I don't think so. PyQt is a commercial product of Riverbank Computing. It's dual-licensed under the GPL and a proprietary license you can buy. Riverbank may have had a relationship with Trolltech ba

Re: Python-based monads essay part 2

2016-10-19 Thread Marko Rauhamaa
Chris Angelico : > On Thu, Oct 20, 2016 at 3:51 AM, Marko Rauhamaa wrote: >> >> def print(world, text, cont): >> return cont(World(past=world, offset=text)) >> >> def print_x_then_y(world, x, y, cont): >> return print(world, x, lambda world2: print(world2, y, cont)) >> > [

Re: [FAQ] "Best" GUI toolkit for python

2016-10-19 Thread Demosthenes Koptsis
I thought PyQt was supported by Qt company... There is also an official book by Prentice Hall: Rapid GUI Programming with Python and Qt (Prentice Hall Open Source Software Development) https://www.amazon.com/Programming-Python-Prentice-Software-Development/dp/0132354187/ref=sr_1_1?ie=UTF8&qid

Re: Python-based monads essay part 2

2016-10-19 Thread Chris Angelico
On Thu, Oct 20, 2016 at 3:51 AM, Marko Rauhamaa wrote: > Chris Angelico : >> Okay. Now let's suppose that, instead of "73" in the first step, you >> have "ask the user for an integer". Are you allowed to eliminate this >> prompt, since the result of it cannot possibly affect anything? And if >> no

Re: Button Widget and Key Binding Problem

2016-10-19 Thread Wildman via Python-list
On Wed, 19 Oct 2016 04:39:03 +0100, MRAB wrote: > The 'bind' method passes an 'event' object when it calls; the 'command' > callback doesn't. > > You don't care about the 'event' object anyway, so you can just define a > single method with a default argument that you ignore: > > def load_

Re: Python-based monads essay part 2

2016-10-19 Thread Marko Rauhamaa
Chris Angelico : > Okay. Now let's suppose that, instead of "73" in the first step, you > have "ask the user for an integer". Are you allowed to eliminate this > prompt, since the result of it cannot possibly affect anything? And if > not, why not? I would guess yes; that's how Python works as wel

Re: how to evaluate a ast tree and change Add to Multiply ?

2016-10-19 Thread Jerry Hill
On Wed, Oct 12, 2016 at 5:55 AM, meInvent bbird wrote: > i just expect to > rewrite + become multiply > by edit the example in the link provided This seems to work. You need to define visit_BinOp instead of visit_Num (since you want to mess with the binary operations, not the numbers). Then,in

Re: Python-based monads essay part 2

2016-10-19 Thread Chris Angelico
On Wed, Oct 19, 2016 at 9:26 AM, Gregory Ewing wrote: > The things being reasoned about -- the actions -- are > not themselves functions, but that doesn't mean there's > any cheating going on. Would you say it was cheating > to perform algebraic manipulations on an expression > involving numbers o

Re: Python GUI application embedding a web browser - Options?

2016-10-19 Thread Paul Moore
On Wednesday, 19 October 2016 13:54:09 UTC+1, Mark Summerfield wrote: > > Since the application is a web app have you looked at: > https://github.com/r0x0r/pywebview + https://github.com/dddomodossola/remi > or at > https://flexx.readthedocs.io/en/stable/ > These basically wrap the platform's web

Re: Python GUI application embedding a web browser - Options?

2016-10-19 Thread Mark Summerfield
On Wednesday, October 19, 2016 at 11:08:15 AM UTC+1, Paul Moore wrote: > I'm looking to write a GUI application in Python (to run on Windows, using > Python 3.5). The application is just a relatively thin wrapper around a > browser - it's presenting an existing web application, just in its own w

Re: [FAQ] "Best" GUI toolkit for python

2016-10-19 Thread Mark Summerfield
On Tuesday, October 18, 2016 at 9:09:46 PM UTC+1, Demosthenes Koptsis wrote: > My favorite GUIs are PyQt and wxPython. > > I prefer PyQt than PySide because PySide seem to me like an abandoned > project. [snip] It does seem that PySide 1 isn't making any visible progress. However, PySide 2 for

Re: Python GUI application embedding a web browser - Options?

2016-10-19 Thread Paul Moore
On 19 October 2016 at 12:10, Phil Thompson wrote: > The Chrome-based QWebEngineView (http://doc.qt.io/qt-5/qwebengineview.html) > is fully supported by PyQt. Nice. Thanks for the pointer. Looks like the various bits of advice I found on the web are a little out of date, is all. Cheers, Paul --

Re: How can I copy one excel file data to another excel file by excluding hidden rows content using Python

2016-10-19 Thread Karim
On 19/10/2016 11:30, Kishore JK wrote: I need to copy one excel file data into another excel file by excluding rows which were hidden in source excel file. https://i.stack.imgur.com/NPUK6.png As shown in the image, from the source excel file, I need to copy the data of row numbers 116,135 and

Re: Python GUI application embedding a web browser - Options?

2016-10-19 Thread Vincent Vande Vyvre
Le 19/10/2016 à 12:07, Paul Moore a écrit : I'm looking to write a GUI application in Python (to run on Windows, using Python 3.5). The application is just a relatively thin wrapper around a browser - it's presenting an existing web application, just in its own window rather than in a standard

Re: Python GUI application embedding a web browser - Options?

2016-10-19 Thread Phil Thompson
On 19 Oct 2016, at 11:07 am, Paul Moore wrote: > > I'm looking to write a GUI application in Python (to run on Windows, using > Python 3.5). The application is just a relatively thin wrapper around a > browser - it's presenting an existing web application, just in its own window > rather than

Python GUI application embedding a web browser - Options?

2016-10-19 Thread Paul Moore
I'm looking to write a GUI application in Python (to run on Windows, using Python 3.5). The application is just a relatively thin wrapper around a browser - it's presenting an existing web application, just in its own window rather than in a standard browser window. I'm looking for advice on a g

How can I copy one excel file data to another excel file by excluding hidden rows content using Python

2016-10-19 Thread Kishore JK
I need to copy one excel file data into another excel file by excluding rows which were hidden in source excel file. https://i.stack.imgur.com/NPUK6.png As shown in the image, from the source excel file, I need to copy the data of row numbers 116,135 and 139 and exclude all the remaining rows w

Re: Inplace shuffle function returns none

2016-10-19 Thread Chris Angelico
On Wed, Oct 19, 2016 at 6:01 PM, Sayth Renshaw wrote: > Ok i think i do understand it. I searched the python document for in-place > functions but couldn't find a specific reference. > > Is there a particular part in docs or blog that covers it? Or is it > fundamental to all so not explicitly tr

Re: Inplace shuffle function returns none

2016-10-19 Thread Ben Finney
Sayth Renshaw writes: > Ok i think i do understand it. I searched the python document for > in-place functions but couldn't find a specific reference. They aren't a separate kind of function. A function can do anything Python code can do; indeed, most Python programs do just about everything t

Re: Inplace shuffle function returns none

2016-10-19 Thread Peter Otten
Steve D'Aprano wrote: > On Wed, 19 Oct 2016 07:25 am, Sayth Renshaw wrote: > >> So why can't i assign the result slice to a variable b? >> >> It just keeps getting none. > > Of course you can assign the result slice to b. You just have to do it the > right way. > > You keep getting None becaus

Re: function call questions

2016-10-19 Thread Peter Otten
chenyong20...@gmail.com wrote: > 在 2016年10月19日星期三 UTC+8上午11:46:28,MRAB写道: >> On 2016-10-19 03:15, chenyong20...@gmail.com wrote: >> > Thanks Peter and Anssi for your kind help. Now I'm ok with the first >> > question. But the second question still confused me. Why "it seems that >> > after root =

Re: Inplace shuffle function returns none

2016-10-19 Thread Sayth Renshaw
Ok i think i do understand it. I searched the python document for in-place functions but couldn't find a specific reference. Is there a particular part in docs or blog that covers it? Or is it fundamental to all so not explicitly treated in one particular page? Thanks Sayth -- https://mail.