Re: How to use images at the bachground?

2006-07-12 Thread sreekant
pipehappy wrote: hi all, how to get out of the python shell which is executing a command? how to use images in the background of a page in Tkinter? on Unix, ctrl-c or ctrl-d may do the job. on Windows, ctrl-z will do Hi I presume you meant putting a image as a background for a Tkinter

Re: threading troubles

2006-07-12 Thread sreekant
Oh dear. For the time being I will leave it with fork and leave it at that. Ta sree You may be missing nothing. If I recall correctly a similar problem was once reported on the pygtk-list. Some investigation showed that some programs couldn't be reliably run from a thread, using os.system.

Re: threading troubles

2006-07-11 Thread sreekant
I decided in the end to use fork and all is well. Thanks sree -- http://mail.python.org/mailman/listinfo/python-list

Re: Is there a limit to os.popen()?

2006-07-11 Thread sreekant
kr = string.strip(os.popen('make kernelrelease').read()) If make is being executed, I presume that the python script has rw access to the location. How about x=os.system(make kernelrelease my_report 21 ) kr=open(my_report).read() Just a blind throw. Good luck sree --

Re: threading troubles

2006-07-11 Thread sreekant
Piet van Oostrum wrote: sreekant [EMAIL PROTECTED] (S) wrote: S I decided in the end to use fork and all is well. But how are you doing the callback then? From your code it looks like the callback is called after the external command finishes. The callback would then be called

threading troubles

2006-07-10 Thread sreekant
Hi folks What am I doing wrong in the following? I just want to run fluidsynth in the background. # class MyThread(threading.Thread): def __init__(self, cmd, callback): self.__cmd = cmd self.__callback = callback

Re: Howto or Tutorial for tokenize module for a newbie?

2006-07-10 Thread sreekant
TY wrote: Hi, Can someone point me to a Howto or Tutorial for tokenize module for a newbie? I read the documentation but it doesn't have a lot of info... Thanks! Hi there I don't know if I got your requirement. But I used a own version of tokenizer which can use more than one

Re: threading troubles

2006-07-10 Thread sreekant
Hi there I tried as advised. Now the function gets called only after I hit quit button which calls gtk.main_quit() at which point, the ui stays on but not responsive, while the fluidsynth runs in the fg, then ui disappears as the fluidsynth finishes and presumably the thread dies. xc =

Announcement : Octavia

2006-07-07 Thread sreekant
Hi folks I just released a text to midi converter. Have a look at http://sourceforge.net/projects/octavia http://sourceforge.net/project/showfiles.php?group_id=171815 It uses a text description of music and runs the body of the music source file in python, leaving full facilities of python in

problems with midi programming in python

2006-07-05 Thread sreekant
Hi folks I hope someone here might be able to help. I scavenged some info and even code from the net and am trying to write a module that reads a text file and spits out a midi file. So far I managed to make it work to the level of reading a text file with appropriate notes, octaves,

Re: problems with midi programming in python

2006-07-05 Thread sreekant
to sreekant UNDER_SCORE At Yahoo DhoTT Com Thanks sree Here's a snippit which does work: def intToVarNumber(x): Convert INT to a variable length MIDI value. lst = chr(x 0x7f) while 1: x = x 7 if x: lst = chr((x 0x7f

Re: problems with midi programming in python

2006-07-05 Thread sreekant
Simon Forman wrote: Not related to your actual question, but note: if len(result) == 0: empty lists test as False, so this can just be if not result: and result[len(result)-1] -= 128 you can index lists with negative ints, backwards from the end of the