Checking if port is in use.

2005-03-19 Thread Alex Polite

If I try to bind a socket to a port that's already in use I get this
error

"error socket.error: (98, 'Address already in use')"

Is there anyway to check in advance if a port i already taken?

alex

-- 
Alex Polite
http://flosspick.org
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Checking if port is in use.

2005-03-19 Thread Alex Polite
On lör, mar 19, 2005 at 10:12:10 -0500, Peter Hansen wrote:
> Alex Polite wrote:
> 
> You could, for example, bind to a port of "0" and that will
> auto-assign an available port for you.  Does that work
> in your case?  If not, please describe what you are really
> trying to accomplish.

I'm launching another server (non python) from python and I have to
designate which port that server should bind to.

alex

-- 
Alex Polite
http://flosspick.org
-- 
http://mail.python.org/mailman/listinfo/python-list


boolean -> DNF

2005-04-04 Thread Alex Polite
I need to transform boolean expressions to Disjunctive Normal Form.

Right now I'm using  BoolStuff[1], a small C program to this end.

I'd like to skip BoolStuff and do it all in python but I have no idea
where to start. Anyone out there with a PhD in computer science that
can give me a starting point?

alex


[1] http://www3.sympatico.ca/sarrazip/dev/boolstuff.html


-- 
Alex Polite
http://flosspick.org
-- 
http://mail.python.org/mailman/listinfo/python-list


Talking to midi devices

2007-12-03 Thread Alex Polite
I'm an old hand at python but all new to midi and audio. I just
started playing around with pygame to make something similar to
http://www.synthesiagame.com that will run under linux (and preferably
mac os x and windows).

One thing I need is a way to talk to midi devices from python. What's
my best option? I've googled this and found a plethora of choices but
none of them seem very solid in terms of documentation, maintenance,
etc.

alex

-- 
http://polite.se
-- 
http://mail.python.org/mailman/listinfo/python-list