[Tutor] tkinter issue in python 3

2011-08-07 Thread Khalid Al-Ghamdi
Hi all, I'm studying this tutorialabout tkinter, but it that it's code in a 2.X. I'm using the following code in python 3, but when i hit quite in the resulting widget it hangs. I've tried modifying the things I know about to

Re: [Tutor] commandline unable to read numbers?

2011-08-07 Thread Dave Angel
On 08/07/2011 01:00 AM, Steven D'Aprano wrote: Robert Sjoblom wrote: I have a quite odd problem, and I've come across it before but probably ignored it at the time because I had other concerns. I've tried googling for the answer but haven't really come closer to solving it. This is what happens:

Re: [Tutor] tkinter issue in python 3

2011-08-07 Thread Peter Otten
Khalid Al-Ghamdi wrote: > I'm studying this > tutorialabout > tkinter, but it that it's code in a 2.X. > > I'm using the following code in python 3, but when i hit quite in the > resulting widget it hangs. I've tried modifyi

Re: [Tutor] commandline unable to read numbers?

2011-08-07 Thread Peter Otten
Robert Sjoblom wrote: > I have a quite odd problem, and I've come across it before but > probably ignored it at the time because I had other concerns. I've > tried googling for the answer but haven't really come closer to > solving it. > This is what happens: > C:\[path]\nester>C:\Python32\python.

Re: [Tutor] commandline unable to read numbers? (Steven D'Aprano)

2011-08-07 Thread Robert Sjoblom
> Robert Sjoblom wrote: >> I have a quite odd problem, and I've come across it before but >> probably ignored it at the time because I had other concerns. I've >> tried googling for the answer but haven't really come closer to >> solving it. >> This is what happens: >> C:\[path]\nester>C:\Python32\

[Tutor] How to get the keys of a dict inside a dict. ValueError: too many values to unpack

2011-08-07 Thread Kayode Odeyemi
Hello all, Please I need help figuring out this permutation. I have a dict like this: x = "{'pk': 1L, 'model': 'trans', 'fields': {'updated': 2011, 'tel': 3456}", "{'pk': 2L, 'model': 'trans2', 'fields': {'updated': 2011, 'tel': 34510}"; #loop through and get the keys of each for k,v in x:

Re: [Tutor] How to get the keys of a dict inside a dict. ValueError: too many values to unpack

2011-08-07 Thread Steve Willoughby
On 07-Aug-11 08:37, Kayode Odeyemi wrote: Hello all, Please I need help figuring out this permutation. I have a dict like this: x = "{'pk': 1L, 'model': 'trans', 'fields': {'updated': 2011, 'tel': 3456}", "{'pk': 2L, 'model': 'trans2', 'fields': {'updated': 2011, 'tel': 34510}"; First of all

Re: [Tutor] How to get the keys of a dict inside a dict. ValueError: too many values to unpack

2011-08-07 Thread Knacktus
Am 07.08.2011 17:37, schrieb Kayode Odeyemi: Hello all, Please I need help figuring out this permutation. I have a dict like this: x = "{'pk': 1L, 'model': 'trans', 'fields': {'updated': 2011, 'tel': 3456}", "{'pk': 2L, 'model': 'trans2', 'fields': {'updated': 2011, 'tel': 34510}"; This is not

Re: [Tutor] How to get the keys of a dict inside a dict. ValueError: too many values to unpack

2011-08-07 Thread Steve Willoughby
On 07-Aug-11 09:17, Steve Willoughby wrote: First of all, that's not a dict. It's just a tuple of strings. so, when you say: #loop through and get the keys of each for k,v in x: You'll get one iteration, where k=the first string and v=the second. However, you ignore k and v in all the code t

Re: [Tutor] commandline unable to read numbers? (Steven D'Aprano)

2011-08-07 Thread Steven D'Aprano
Robert Sjoblom wrote: [...] > Have you tried just pressing enter without entering anything? Yes, and it goes back to "We need to know who you are, so please choose either:" The setup.py in question is the distutils.core one (from distutils.core import setup). It sounds like Peter Otten has t

Re: [Tutor] commandline unable to read numbers?

2011-08-07 Thread Robert Sjoblom
> I think you are on the right track: Python 3.2's input() has a nasty bug on > Windows (http://bugs.python.org/issue11272). If you repeat the following in > your interactive interpreter (invoked from the commmandline) > input() > 123 > '123' > > and see '123\r' instead of just '123' you are a

Re: [Tutor] gzip

2011-08-07 Thread questions anon
Thank you, I didn't realise that was all I needed. Moving on to the next problem: I would like to loop through a number of directories and decompress each *.gz file and leave them in the same folder but the code I have written only seems to focus on the last folder. Not sure where I have gone wrong