Re: Init style output with python?

2007-05-06 Thread Maxim Veksler
On 5/6/07, Tina I [EMAIL PROTECTED] wrote: Maxim Veksler wrote: Is there are frame work or something in python that would allow me to do this (quickly) ? If not, ideas how I should I be getting this boring task of: 1. get screen width You can look into the 'curses' module and do

Re: Non blocking sockets with select.poll() ?

2007-05-05 Thread Maxim Veksler
of clients at the same time and do so more efficiently than the loop in your version. You can also try epollreactor instead of pollreactor, if the version of Linux you are using supports epoll, for even better performance. Thanks! Jean-Paul -- Cheers, Maxim Veksler Free as in Freedom - Do u

Init style output with python?

2007-05-05 Thread Maxim Veksler
for you print cc.BLACK_FG + see, nothing to worry about -- Cheers, Maxim Veksler Free as in Freedom - Do u GNU ? -- http://mail.python.org/mailman/listinfo/python-list

Non blocking sockets with select.poll() ?

2007-05-04 Thread Maxim Veksler
, socket.SOCK_STREAM) s.setblocking(0) s.bind(('0.0.0.0', 1)) s.listen(5) __poll = select.poll() __poll.register(s) __poll.poll() print I did not block -- Cheers, Maxim Veksler Free as in Freedom - Do u GNU ? -- http://mail.python.org/mailman/listinfo/python-list

Re: Non blocking sockets with select.poll() ?

2007-05-04 Thread Maxim Veksler
On 5/4/07, Jean-Paul Calderone [EMAIL PROTECTED] wrote: On Fri, 4 May 2007 13:04:41 +0300, Maxim Veksler [EMAIL PROTECTED] wrote: Hi, I'm trying to write a non blocking socket port listener based on poll() because select is limited to 1024 fd. Here is the code, it never gets to I did

Re: Non blocking sockets with select.poll() ?

2007-05-04 Thread Maxim Veksler
On 5/4/07, Maxim Veksler [EMAIL PROTECTED] wrote: On 5/4/07, Jean-Paul Calderone [EMAIL PROTECTED] wrote: On Fri, 4 May 2007 13:04:41 +0300, Maxim Veksler [EMAIL PROTECTED] wrote: Hi, I'm trying to write a non blocking socket port listener based on poll() because select is limited

I can't inherit from compiled classes ?

2007-04-29 Thread Maxim Veksler
I breaking wrong? Thank you, Maxim. -- Cheers, Maxim Veksler Free as in Freedom - Do u GNU ? -- http://mail.python.org/mailman/listinfo/python-list

Re: I can't inherit from compiled classes ?

2007-04-29 Thread Maxim Veksler
On 4/29/07, Marc 'BlackJack' Rintsch [EMAIL PROTECTED] wrote: In [EMAIL PROTECTED], Maxim Veksler wrote: Hello list, I'm trying to subclass socket and select, for both I get: TypeError: Error when calling the metaclass bases module.__init__() takes at most 2 arguments (3 given

Re: ulimit on open sockets ?

2007-04-14 Thread Maxim Veksler
On 4/13/07, Alex Martelli [EMAIL PROTECTED] wrote: On Apr 12, 2007, at 1:17 PM, Maxim Veksler wrote: ... Now, someone I work with suggested a simple work around Pass the list objects in groups of 1024 each time to the select.select structure. I think it's acceptable and good advice

Re: ulimit on open sockets ?

2007-04-12 Thread Maxim Veksler
On 4/10/07, Bjoern Schliessmann [EMAIL PROTECTED] wrote: Maxim Veksler wrote: I've written this code, the general idea was to listen on all 65535 port of tcp for connection. Please excuse the question: Why would anyone want to do such a manic thing (instead of, e. g., using raw sockets

Re: ulimit on open sockets ?

2007-04-12 Thread Maxim Veksler
On 4/10/07, Alex Martelli [EMAIL PROTECTED] wrote: Maxim Veksler [EMAIL PROTECTED] wrote: ValueError: filedescriptor out of range in select() Should I be using a different version of select or something? Or select typically supports 1024 FDs at most (a design limit of the underlying

ulimit on open sockets ?

2007-04-09 Thread Maxim Veksler
, Maxim Veksler Free as in Freedom - Do u GNU ? -- http://mail.python.org/mailman/listinfo/python-list

Re: low level networking in python

2007-04-06 Thread Maxim Veksler
On 4/4/07, Irmen de Jong [EMAIL PROTECTED] wrote: Maxim Veksler wrote: I'm trying to bind a non-blocking socket, here is my code: #!/usr/bin/env python import socket, select from time import sleep s_nb1 = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s_nb1

low level networking in python

2007-04-03 Thread Maxim Veksler
doesn\'t look like swigged shadow class code' source file doesn't look like swigged shadow class code error: command '/usr/bin/python' failed with exit status 1 [1] http://pylibpcap.sourceforge.net/ [2] http://py.vaults.ca/apyllo.py/126307487 -- Cheers, Maxim Veksler Free as in Freedom - Do u

Re: low level networking in python

2007-04-03 Thread Maxim Veksler
On 3 Apr 2007 08:43:57 -0700, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: On Apr 3, 10:29 am, Maxim Veksler [EMAIL PROTECTED] wrote: Hello, I wish to do some low level network stuff using python. -- Cheers, Maxim Veksler Free as in Freedom - Do u GNU ? I would assume you could

programmatically manipulation environment variables of the calling shell

2007-03-12 Thread Maxim Veksler
because python is actually a sub process of bash). Thank you, Maxim. -- Cheers, Maxim Veksler Free as in Freedom - Do u GNU ? -- http://mail.python.org/mailman/listinfo/python-list

Re: programmatically manipulation environment variables of the calling shell

2007-03-12 Thread Maxim Veksler
On 3/12/07, Tommy Nordgren [EMAIL PROTECTED] wrote: On 12 mar 2007, at 11.33, Maxim Veksler wrote: Hello list, I'm trying to write a python script that would allow me to manipulate shell variables of the calling shell. I'm trying to write some logic that would know to add

lambda functions ?

2007-02-05 Thread Maxim Veksler
) to implement the above code without using lambda I believe it would help me grasp this a bit faster then. Thank you, Maxim. -- Cheers, Maxim Veksler Free as in Freedom - Do u GNU ? -- http://mail.python.org/mailman/listinfo/python-list

Re: lambda functions ?

2007-02-05 Thread Maxim Veksler
Wow, Thank you everyone for the help. I am amazed by the motivation people have on this list to help new comers. I hope that I will be able to contribute equally some day. On 05 Feb 2007 14:22:05 -0800, Paul Rubin http://phr.cx@nospam.invalid wrote: Maxim Veksler [EMAIL PROTECTED] writes