Re: Defamation

2015-10-20 Thread Laura Creighton
In a message of Wed, 21 Oct 2015 10:30:35 +1100, "Steven D'Aprano" writes: >On Wed, 21 Oct 2015 01:44 am, Laura Creighton wrote: >> No, we are removing them because we want to. > >Who are "we"? You're not talking about *you and me*. Anybody who was involved in deciding whether or not to remove the

Re: What does it mean for Python to have “constants”?

2015-10-20 Thread Nagy László Zsolt
Dennis Lee Bieber writes: >> (Python does not have anything that one might consider a true constant >> -- other than the language defined singletons: None, and maybe by now >> True and False). > Python now deals with those by making the names keywords:: > > >>> True = object() > File ""

Re: 2.7.9: PhotoImage get/put

2015-10-20 Thread Randy Day
In article , em...@fenx.com says... [snip] > I have no idea why, but here are some ideas I'd try out. > So is it refreshing upon completion of the loop, or upon exit from > process()? It turns out I need to call root.update_idletasks() for my root Tk object to get it to refresh after I put t

Re: 2.7.9: PhotoImage get/put

2015-10-20 Thread Randy Day
In article , illusiontechniq...@gmail.com says... [snip] > If you want to pass arguments to a command called when a button is > clicked, you have to use 'lambda' in tkinter. Thanks. I just skimmed over lambda before now... > You can't expect a delay to happen during the mainloop() of the > pr

Re: teacher need help!

2015-10-20 Thread Ian Kelly
On Tue, Oct 20, 2015 at 11:39 AM, Michael Torrie wrote: > On 10/20/2015 10:25 AM, Storey, Geneva wrote: >> FYI-We formatted the machines, reinstalling everything, including >> Python. I works with no problems now. Confusing that this would >> happen on 3 out of 13 machines. Just letting you kno

Re: teacher need help!

2015-10-20 Thread Terry Reedy
On 10/19/2015 4:23 AM, Terry Reedy wrote: On 10/18/2015 9:32 PM, Storey, Geneva wrote: Same issue! See attached. Can I suggest you find the turtle.py module in c:\windows\system32, move it to somewhere more suitable and try the code again? This seems strange. C:/Windows/System32

Re: 2.7.9: PhotoImage get/put

2015-10-20 Thread C Smith
>> def process(): # Ordinarily this would be process(photo,wdth,hgt) >>global wdth # but I ran into problems calling it from a button If you want to pass arguments to a command called when a button is clicked, you have to use 'lambda' in tkinter. >>global hgt #command with parameters... >

What does it mean for Python to have “constants”? (was: variable scope of class objects)

2015-10-20 Thread Ben Finney
Dennis Lee Bieber writes: > (Python does not have anything that one might consider a true constant > -- other than the language defined singletons: None, and maybe by now > True and False). Python now deals with those by making the names keywords:: >>> True = object() File "", line 1

Re: Defamation

2015-10-20 Thread Steven D'Aprano
On Wed, 21 Oct 2015 01:44 am, Laura Creighton wrote: > In a message of Wed, 21 Oct 2015 00:09:18 +1100, "Steven D'Aprano" writes: >>On Tue, 20 Oct 2015 03:28 am, Laura Creighton wrote: >> >>> Actually, this one was part of a huge set of defaming articles sent a >>> year ago we were requested to re

Re: 2.7.9: PhotoImage get/put

2015-10-20 Thread Emile van Sebille
On 10/20/2015 3:05 PM, Randy Day wrote: I'm writing a simple image manipulation on a PhotoImage (tkinter), and running into an odd problem. The code below works, except for one thing: As the image is scanned, I'd like to observe the pixels getting inverted on the image (as a kind of progress bar

2.7.9: PhotoImage get/put

2015-10-20 Thread Randy Day
I'm writing a simple image manipulation on a PhotoImage (tkinter), and running into an odd problem. The code below works, except for one thing: As the image is scanned, I'd like to observe the pixels getting inverted on the image (as a kind of progress bar). What happens is that the code run

Re: variable scope of class objects

2015-10-20 Thread JonRob
Hello Luca, I very much appreciated your comments. And I understand the importance of "doing something right" (i.e. convention). This leads me to another question. Because I am interfacing with an I2C sensor I have many register definations to include (30 register addresses and 26 Variables

Re: How to rearrange array using Python?

2015-10-20 Thread Oscar Benjamin
On Tue, 20 Oct 2015 20:01 Martin Schöön wrote: It has been a while. I have mastered solving Kenken and Sudoku using Python-constraint. I still have no clue on how to tell the solver how to constrain the number of occupants in rooms: I have made up an simple example with nine persons and three ro

Re: variable scope of class objects

2015-10-20 Thread JonRob
Thanks to all who replied to my question. I received a lot of information and points of view that are very helpful. I realize some of you folks spent more that a few minutes. I really appreciate your time. Pardon me that i replied to random832's post and not the original but my original was l

Re: How to rearrange array using Python?

2015-10-20 Thread Ian Kelly
On Tue, Oct 20, 2015 at 1:26 PM, Ian Kelly wrote: > def room_size_constraint(*v): > counter = Counter(v.values()) Sorry, this should just be Counter(v), since v here is a tuple, not a dict. -- https://mail.python.org/mailman/listinfo/python-list

Re: How to rearrange array using Python?

2015-10-20 Thread Ian Kelly
On Tue, Oct 20, 2015 at 12:57 PM, Martin Schöön wrote: > It has been a while. > I have mastered solving Kenken and Sudoku using Python-constraint. > > I still have no clue on how to tell the solver how to constrain > the number of occupants in rooms: I have made up an simple example > with nine pe

Re: How to rearrange array using Python?

2015-10-20 Thread Martin Schöön
It has been a while. I have mastered solving Kenken and Sudoku using Python-constraint. I still have no clue on how to tell the solver how to constrain the number of occupants in rooms: I have made up an simple example with nine persons and three rooms. Wishes for room mates are mild in the extre

Re: teacher need help!

2015-10-20 Thread Michael Torrie
On 10/20/2015 10:25 AM, Storey, Geneva wrote: > FYI-We formatted the machines, reinstalling everything, including > Python. I works with no problems now. Confusing that this would > happen on 3 out of 13 machines. Just letting you know, all is well. > Thank you for your help! Geneva Wow that se

Re: teacher need help!

2015-10-20 Thread Storey, Geneva
FYI-We formatted the machines, reinstalling everything, including Python. I works with no problems now. Confusing that this would happen on 3 out of 13 machines. Just letting you know, all is well. Thank you for your help! Geneva Geneva Storey Fulton High School Spanish, Mathematics Bulld

Re: Defamation

2015-10-20 Thread Laura Creighton
In a message of Wed, 21 Oct 2015 00:09:18 +1100, "Steven D'Aprano" writes: >On Tue, 20 Oct 2015 03:28 am, Laura Creighton wrote: > >> Actually, this one was part of a huge set of defaming articles sent a >> year ago we were requested to remove, and did. European Law may >> require us to do so. I

RE: Re: Re: Installing pywin32.

2015-10-20 Thread ashwath
Hi Is it possible to pause and restart the file upload process to S3 AWS ? I ll be happy if you get me a solution for this, I have an account in the S3, so please help with this. Thanking you in advance. I tried with boto3 module but I couldn't do it . Thanks & Regards Ashwath B H

Re: Defamation

2015-10-20 Thread Ralf Hildebrandt
* Steven D'Aprano : > On Tue, 20 Oct 2015 03:28 am, Laura Creighton wrote: > > > Actually, this one was part of a huge set of defaming articles sent a > > year ago we were requested to remove, and did. European Law may > > require us to do so. I checked, and this article wasn't one on > > our li

Re: unsupported operand type(s) python v2.7

2015-10-20 Thread Zachary Ware
On Oct 20, 2015 4:15 AM, "ngangsia akumbo" wrote: > def n(): > return 3 * 2 > > def g(): > return 3+ 6 > > def ng(): > return n()+g() > > print ng() Much better :) -- Zach (On a phone) -- https://mail.python.org/mailman/listinfo/python-list

Re: Defamation

2015-10-20 Thread Steven D'Aprano
On Tue, 20 Oct 2015 03:28 am, Laura Creighton wrote: > Actually, this one was part of a huge set of defaming articles sent a > year ago we were requested to remove, and did. European Law may > require us to do so. I checked, and this article wasn't one on > our list, which is why we missed this

Re: Defamation

2015-10-20 Thread Ralf Hildebrandt
* Laura Creighton : > Actually, this one was part of a huge set of defaming articles sent a > year ago we were requested to remove, and did. European Law may > require us to do so. I checked, and this article wasn't one on > our list, which is why we missed this one. Note that the "next in thre

1 million new Python 3 users (next spring)

2015-10-20 Thread Terry Reedy
From a PSF mailing list, this announcement. http://ntoll.org/article/story-micropython-on-microbit Contributions invited. -- Terry Jan Reedy -- https://mail.python.org/mailman/listinfo/python-list

Re: unsupported operand type(s) python v2.7

2015-10-20 Thread ngangsia akumbo
On Tuesday, October 20, 2015 at 10:08:51 AM UTC+1, ngangsia akumbo wrote: > On Tuesday, October 20, 2015 at 10:01:44 AM UTC+1, Wolfgang Maier wrote: > > On 20.10.2015 10:44, ngangsia akumbo wrote: > > def n(): > > > 34 * 2 > > > > > > > > def g(): > > > 4 + 2 > > > > > > > Your n

Re: unsupported operand type(s) python v2.7

2015-10-20 Thread ngangsia akumbo
On Tuesday, October 20, 2015 at 10:01:44 AM UTC+1, Wolfgang Maier wrote: > On 20.10.2015 10:44, ngangsia akumbo wrote: > def n(): > > 34 * 2 > > > > > def g(): > > 4 + 2 > > > > Your n and g functions do not have an explicit return so, after doing > their calculations and t

Re: unsupported operand type(s) python v2.7

2015-10-20 Thread Wolfgang Maier
On 20.10.2015 10:44, ngangsia akumbo wrote: def n(): 34 * 2 def g(): 4 + 2 Your n and g functions do not have an explicit return so, after doing their calculations and throwing the result away, they return None. def ng(): return n() + g() ng() Trac

unsupported operand type(s) python v2.7

2015-10-20 Thread ngangsia akumbo
>>> def n(): 34 * 2 >>> def g(): 4 + 2 >>> def ng(): return n() + g() >>> ng() Traceback (most recent call last): File "", line 1, in ng() File "", line 2, in ng return n() + g() TypeError: unsupported operand type(s) for +: 'NoneType' and 'NoneType

Re: variable scope of class objects

2015-10-20 Thread Luca Menegotto
Il 20/10/2015 08:38, Nagy László Zsolt ha scritto: When you say "they have nothing to do", it is almost true but not 100%. I know it, but when it comes to eradicate an idea that comes directly from C++-like languages, you must be drastic. Nuances come after... -- Ciao! Luca -- https://mail.