[Tutor] Bit-level field extraction

2006-05-15 Thread Terry Carroll
I want to see if I'm reinventing a wheel here, or maybe doing it unpythonically. I need to extract from a byte (i.e., a one-character string) a field of an certain number of bits. For example, a certain byte of an MP3 frame header has the format xxxVVxxx, where the value of VV (00, 01, 10 or 11)

Re: [Tutor] Running Java process doesn't return to subprocess.call

2006-05-15 Thread Danny Yoo
On Mon, 15 May 2006, Jerome Jabson wrote: > I'm running a Java process from my python script using the subprocess > module. But there seems to be some problem with the return code to > subprocess and the Java program is just hanging waiting for something. Hi Jerome, I see that you're using s

Re: [Tutor] Python challenge

2006-05-15 Thread Sean Perry
David Holland wrote: > I looked at this and got stuck on the first one :- Thanks for this. I missed it the first time it showed up on this list. Kinda fun and reminds me why I love python. Four lines in the interactive interpreter and most of the challenges are solved. __

Re: [Tutor] laying out a menu widget inside a frame

2006-05-15 Thread Zubin Wadia
Hi Michael, root.config(relief=RIDGE, bg="lightblue", bd=3) doesn't seem to work I'm not sure if the menu() widget can be packed in a frame container?? Thanks --zubin >Hi Zubin, >there is a typo in your code, it should be > >master.config(menu=menubar) > >but this does not seem to be your

Re: [Tutor] laying out frames

2006-05-15 Thread Zubin Wadia
Thats great, thanks Michael for the examples, I'll tinker with grid() and place(). Cheers! --zubin > On Mon, 15 May 2006 15:42:48 -0400 (EDT) > "Zubin Wadia" <[EMAIL PROTECTED]> wrote: > >> Hello Everyone, >> >> Another basic question in regard to frame layouts with Tkinter. >> >> I want to creat

Re: [Tutor] laying out frames

2006-05-15 Thread Michael Lange
On Mon, 15 May 2006 15:42:48 -0400 (EDT) "Zubin Wadia" <[EMAIL PROTECTED]> wrote: > Hello Everyone, > > Another basic question in regard to frame layouts with Tkinter. > > I want to create a basic quadrant of frames but am not able to follow the > logic to do so, whats the right way or an easier

Re: [Tutor] laying out frames

2006-05-15 Thread Zubin Wadia
Hello Everyone, Another basic question in regard to frame layouts with Tkinter. I want to create a basic quadrant of frames but am not able to follow the logic to do so, whats the right way or an easier way to control layout of frames and wigets. A pixel approach would be nice (where by you can s

[Tutor] Running Java process doesn't return to subprocess.call

2006-05-15 Thread Jerome Jabson
Hello, I'm running a Java process from my python script using the subprocess module. But there seems to be some problem with the return code to subprocess and the Java program is just hanging waiting for something. If I run the Java program from shell it terminates normally and if run the same pro

Re: [Tutor] Nested list comprehensions

2006-05-15 Thread Wolfram Kraus
Kent Johnson wrote: > John Fouhy wrote: > >>On 15/05/06, Kent Johnson <[EMAIL PROTECTED]> wrote: >> >>>You can come pretty close with generators, though it hurts to think >>>about what is actually going on behind the scenes here: >>> >>>In [1]: import itertools >>> >>>In [2]: def fibs(): >>>..

Re: [Tutor] Nested list comprehensions

2006-05-15 Thread Kent Johnson
John Fouhy wrote: > On 15/05/06, Kent Johnson <[EMAIL PROTECTED]> wrote: >> You can come pretty close with generators, though it hurts to think >> about what is actually going on behind the scenes here: >> >> In [1]: import itertools >> >> In [2]: def fibs(): >> ...: yield 0 >> ...:

Re: [Tutor] Nested list comprehensions

2006-05-15 Thread Kent Johnson
John Fouhy wrote: > Hmm, do you know an easy way to check how much memory python is using? > My HDD was swapping like crazy by the end of that.. Use Windows Task Manager or top for a rough estimate...or try one of these: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/286222 http://www.so

Re: [Tutor] Database topic now fixed

2006-05-15 Thread Alan Gauld
>Does that mean you will soon fix the tutor.tgz :-) > Thanks for all the hard work you put into this. I updated the PDF. zip and tgz files at the same time I uploaded the fixed database topic, but before I made the additional fixes Bob suggested Alan G.