[Zope] controlling UDP socket defaulttimeout in External Method
robert rottermann
robert at redcor.ch
Sat Oct 30 01:34:05 EDT 2004
External methods must use the python zope is running under.
However from an external method you could call any script.
Is switching to Zope 2.7x no option?
Robert
Bill Seitz wrote:
> I don't suppose there's a way to run an External Method using a newer
> Python version on the same machine is there? :)
>
> robert rottermann wrote:
>
>> I can not answer that.
>> I am using Zope 2.7x wich requires Python 3.3. This python version
>> comes with timoutsocket included.
>>
>> So I never really used that library.
>>
>> Robert
>>
>> Bill Seitz wrote:
>>
>>> That server seems to be down. I got Revision 1.23 from
>>> http://www.python.or.kr/pykug/timeoutsocket
>>>
>>> I tweaked its line 142 to import SOCK_DGRAM
>>> from socket import AF_INET, SOCK_STREAM, SOCK_DGRAM
>>>
>>> Then my main function calls
>>> timeoutsocket.setDefaultSocketTimeout(5)
>>> and later
>>> uSock =
>>> timeoutsocket.timeoutsocket(timeoutsocket.AF_INET,timeoutsocket.SOCK_DGRAM)
>>>
>>>
>>> Does that make sense?
>>>
>>> robert rottermann wrote:
>>>
>>>> http://www.timo-tasi.org/python/timeoutsocket.py
>>>> HTH
>>>> Robert
>>>>
>>>> Bill Seitz wrote:
>>>>
>>>>> I am running ZoPe v2.6.2 which uses PyThon v2.1.3.
>>>>>
>>>>> I have some Python code to send data to a business partner over a
>>>>> UDP socket.
>>>>>
>>>>> I'm trying to call that code from an External Method.
>>>>>
>>>>> The socket.setdefaulttimeout() function wasn't defined until Python
>>>>> 2.3.
>>>>>
>>>>> If I want to control the timeout period for this function, how
>>>>> would I do it?
>>>>>
>>>>> _______________________________________________
>>>>> Zope maillist - Zope at zope.org
>>>>> http://mail.zope.org/mailman/listinfo/zope
>>>>> ** No cross posts or HTML encoding! **
>>>>> (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce
>>>>> http://mail.zope.org/mailman/listinfo/zope-dev )
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>
More information about the Zope
mailing list