Re: subprocess communication, exec()

2008-11-11 Thread Chuckk Hubbard
On Tue, Nov 11, 2008 at 9:39 PM, Jeff McNeil <[EMAIL PROTECTED]> wrote: > On Nov 11, 1:23 pm, "Chuckk Hubbard" <[EMAIL PROTECTED]> > wrote: >> If I run 'python -i subprocessclient.py' I expect to see the nice >> level of it go up 2, and the nice le

subprocess communication, exec()

2008-11-11 Thread Chuckk Hubbard
If I run 'python -i subprocessclient.py' I expect to see the nice level of it go up 2, and the nice level of the subprocess go up 1. But all I see is the nice level of the client change. What am I doing wrong? subprocessserver.py: #!/usr/bin/python2.5 import os impor

Re: Pyro "could not find NameServer"

2008-11-10 Thread Chuckk Hubbard
OK, I think I have it. The Manual says to start a Name Server "using the ns command", and I figured out that means using the pyro-ns script. On Mon, Nov 10, 2008 at 10:49 AM, Chuckk Hubbard <[EMAIL PROTECTED]> wrote: > The docs say to try to discover the URI on my own if this

Pyro "could not find NameServer"

2008-11-10 Thread Chuckk Hubbard
The docs say to try to discover the URI on my own if this happens. Could I get a hand doing that? This isn't just something I want to solve on my machine, e.g. by changing my network setup or what not; this is a program I hope to distribute and I hope my users can avoid having to deal with this, be

Re: Python suitable for Midi ?

2008-10-31 Thread Chuckk Hubbard
On Tue, Oct 28, 2008 at 7:13 PM, Derek Martin <[EMAIL PROTECTED]> wrote: > On Tue, Oct 28, 2008 at 06:54:57PM +0200, Chuckk Hubbard wrote: >> The problem I've run into is that I can't set the audio to a higher >> priority than the GUI (Tkinter). If I move the mouse

Re: Python suitable for Midi ?

2008-10-30 Thread Chuckk Hubbard
On Wed, Oct 29, 2008 at 10:32 PM, J Kenneth King <[EMAIL PROTECTED]> wrote: > > One also has access to nice-levels on unix systems. True enough, but it's not so much a problem for me, as I'm pretty okay at tuning my own system, but I believe most of the people who'd be interested in my app (if an

Re: Finding the instance reference of an object

2008-10-29 Thread Chuckk Hubbard
On Wed, Oct 29, 2008 at 5:27 PM, Dale Roberts <[EMAIL PROTECTED]> wrote: > Don't you know? There is really only *ONE* case, and, you are right, > it is Pass By Value. There is no such thing as Pass By Reference at > the physical CPU level at all, right? If there is, show it to me. Pass > By Referen

Re: Python suitable for Midi ?

2008-10-28 Thread Chuckk Hubbard
I'm writing a sequencer in Python, although it's microtonal and not MIDI. I'm using the Python bindings for the Csound API, all the timing, MIDI, OSC, etc. stuff, essentially all but the GUI capabilities, having been done by the Csound developers already. Documentation is here and there, and Csoun

Re: Finding the instance reference of an object

2008-10-27 Thread Chuckk Hubbard
I'm sorry to say I'm pretty confused by the example, but if you want something like bob = module.object() frank = module.object() and then to know that bob is bob from a list of instances, you could instead do something like: for person in listofnames: temp = module.object(person) list.

Re: tkinter question

2008-10-26 Thread Chuckk Hubbard
Hello. How about this? I changed the if statements so the coordinates are always updated, but only changed if within the right limits, otherwise updated to the existing value. Now if you drag outside the limits of one dimension, it still moves in the other dimension. Not sure if that's what you

Re: do you fail at FizzBuzz? simple prog test

2008-10-03 Thread Chuckk Hubbard
range(1,101), no? On Tue, May 20, 2008 at 4:46 PM, Sells, Fred <[EMAIL PROTECTED]> wrote: > or > for i in range(1,100): > print ('fizz','','')[i%3] + ('buzz','','','','')[i%5] or i > >> > >> > "Write a program that prints the numbers from 1 to 100. But for >> > multiples of three print "Fizz" ins

Re: Tkinter popup menu

2008-09-02 Thread Chuckk Hubbard
On Thu, Aug 28, 2008 at 3:50 AM, Carl <[EMAIL PROTECTED]> wrote: > "Chuckk Hubbard" <[EMAIL PROTECTED]> writes: > >> Right-click popup menu. None of the options that come from the >> cascades can be selected with the mouse. If you select a submenu with

Tkinter popup menu

2008-08-27 Thread Chuckk Hubbard
Right-click popup menu. None of the options that come from the cascades can be selected with the mouse. If you select a submenu with the mouse and then use the arrow keys and enter key to select an option, it works, but the menu remains on the canvas. If you click the option with the mouse, the

More than one element of list changing when only one should be

2008-06-09 Thread Chuckk Hubbard
Hello. This program is clunky, I know; I'm not a programmer, but I need to use this program, so I'm writing it. The problem: I have a cursor following the mouse that shows frequency ratios of potential notes in relation to 1/1 (something like Middle C). At any time, the user may hit "t" to move 1/

Re: More than one element of list changing when only one should be

2008-06-07 Thread Chuckk Hubbard
i.e., altering the appended list member doesn't change the copied one. -Chuckk On Sat, Jun 7, 2008 at 5:53 PM, Chuckk Hubbard <[EMAIL PROTECTED]> wrote: > Hello. > This program is clunky, I know; I'm not a programmer, but I need to > use this program, so I'm

Re: Interesting Math Problem

2008-06-05 Thread Chuckk Hubbard
On Wed, Jun 4, 2008 at 11:03 AM, BEES INC <[EMAIL PROTECTED]> wrote: > My Solution (in Python): > > # round to one decimal place and > # separate into whole and fractional parts > parts = str(round(star_sum/num_raters, 1)).split('.') > whole = int(parts[0]) > frac = int(parts[1]) > if frac < 3: >

Re: Interesting Math Problem

2008-06-05 Thread Chuckk Hubbard
On Thu, Jun 5, 2008 at 11:52 AM, Chuckk Hubbard <[EMAIL PROTECTED]> wrote: > On Wed, Jun 4, 2008 at 11:03 AM, BEES INC <[EMAIL PROTECTED]> wrote: > >> My Solution (in Python): >> >> # round to one decimal place and >> # separate into whole and frac

Re: What is wrong with my Python threading?

2008-05-21 Thread Chuckk Hubbard
On Tue, May 20, 2008 at 4:28 PM, castironpi <[EMAIL PROTECTED]> wrote: > On May 20, 8:19 am, "Chuckk Hubbard" <[EMAIL PROTECTED]> > wrote: >> #!/usr/bin/python >> >> #why doesn't this run both threads simultaneously? >> #Thanks for a

What is wrong with my Python threading?

2008-05-20 Thread Chuckk Hubbard
#!/usr/bin/python #why doesn't this run both threads simultaneously? #Thanks for any help. #Chuckk import threading import time def printesc(thrd): for i in range(10): time.sleep(1) print thrd, i def master(): thd1 = threading.Thread(target=printesc, args=(1,)) thd2

Re: Learning Python for no reason

2008-05-12 Thread Chuckk Hubbard
I'm another one pretty early in his programming education, but here's my take. Python was specifically recommended to me by a few people for a specific program I wanted to write (userspace, GUI, music). While I gradually learn more about it, I start to spend a lot of time on certain aspects I don'

Re: People still using Tkinter?

2008-05-10 Thread Chuckk Hubbard
I am, but "still" isn't the word, I just started. Good, *complete* docs seem to be hard to find, but using a combination of the free resources and going back and forth between them seems to work all right so far. -Chuckk On Sat, May 10, 2008 at 8:20 AM, Kenneth McDonald <[EMAIL PROTECTED]> wrote

Re: Python GUIs and custom controls

2008-05-08 Thread Chuckk Hubbard
I likewise don't know enough to compare between toolkits, but another one to check out might be pygame. If nothing else, it is meant to be fast and to handle 3D views. -Chuckk On Fri, May 9, 2008 at 12:10 AM, Joe P. Cool <[EMAIL PROTECTED]> wrote: > So far I have a little experience with Tkinter

Re: Surprising difference in behavior between "import blah" and "from blah import thing"

2008-05-08 Thread Chuckk Hubbard
:'( I'm confused On Fri, May 9, 2008 at 12:03 AM, offby1 <[EMAIL PROTECTED]> wrote: > Ah. So from the point of view of mut.py, "thing" and "system.thing" > are separate, unrelated variables; the former of which is initialized > from the latter when mut says "from system import thing". Thanks. >

Another MIDI question - soundfonts

2008-05-06 Thread Chuckk Hubbard
Hello. I'm writing a microtonal sequencer, and I don't want to use MIDI per se, but I'd like to be able to load standard sample banks to play. The only standard format I'm familiar with is soundfont, and it seems to be the most popular; if anyone knows of others, especially for Mac, which I believ

Re: Can I install Python 2.4 and 2.5 ?

2008-05-04 Thread Chuckk Hubbard
I have both python2.4 and python2.5 as executables, and "python" as a symbolic link to python2.4. This is the default setup if you install both from the Debian repositories, so probably with Ubuntu as well. If you like you can change "python" to point to either one (or to any other program, if you

Re: Real Time Midi File Playback - Reading and Writing midi at the same time

2008-05-04 Thread Chuckk Hubbard
Threading was recommended to me as a way to time things: http://docs.python.org/lib/timer-objects.html Dunno if that helps you. -Chuckk On Sun, May 4, 2008 at 8:11 PM, Gilly <[EMAIL PROTECTED]> wrote: > Hi > I am trying to create an application that uses some form of input to > create a midi fil

Re: Please help - Tkinter not doing anything

2008-05-04 Thread Chuckk Hubbard
Try adding: from Tkinter import * at the beginning, and you don't need "var" in front of root=Tk(), just "root = Tk()" (<-without the quotes of course) What OS are you on? Are you running "python testapp.py" or similar to make it run? -Chuckk On Sun, May 4, 2008 at 12:39 PM, Protected <[EMAI