Re: getting quick arp request

2006-09-06 Thread kondal

> Something is limiting the TCP/IP connections from my python program at
> 10 maximum at the same time.
> I do not see this limit in my code.
> I did not bumped over the 4226 error.
>
> => Where does this limit come from.
> => How can I overcome it.

You can just edit it by creating a new key in the registry.

HKEY_LOCAL_MACHINE - SYSTEM - CurrentControlSet - Services -Tcpip -
Parameters

Create a DWORD key named "TcpNumConnections" and set the value to
00fe or 16777214.

-kondal

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


Re: 22, invalid agument error

2006-09-06 Thread kondal
> >   sockobj.bind(('',40007))
>
> tried on my N6600 with same error
>
> try using your phone's IP instead of the empty string ''
>
> tried sockobj.bind(('127.0.0.1',40007)) and did not get an error

In general sockets layer bind with null host makes it pick the address
from arp resolution and null in port makes it pick a random number as a
source port. This is reason bind call is not required for client
connections.

I think Python for S60 has some problem in sockets layer for the bind
function. Best is to remove the bind call in the client program as
people will test with this senario in general.

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


Re: How to get the "longest possible" match with Python's RE module?

2006-09-11 Thread kondal
Licheng Fang wrote:
> Basically, the problem is this:
>
> >>> p = re.compile("do|dolittle")
> >>> p.match("dolittle").group()
> 'do'
>
> Python's NFA regexp engine trys only the first option, and happily
> rests on that. There's another example:
>
> >>> p = re.compile("one(self)?(selfsufficient)?")
> >>> p.match("oneselfsufficient").group()
> 'oneself'
>
> The Python regular expression engine doesn't exaust all the
> possibilities, but in my application I hope to get the longest possible
> match, starting from a given point.
>
> Is there a way to do this in Python?

This is the way the regexp works python doesn't has anything to do with
it. It starts parsing the data with the pattern given. It returns the
matched string acording the pattern and doesn't go back to find the
other combinations.

So to get all the combinations you would probably require to give
different patterns each time.

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