strange sockets

2005-11-04 Thread Skink
70569 server.py 0.0409059524536 server.py 0.0409259796143 what's wrong here? thanks, skink client.py import socket, sys, struct, time HOST = 'localhost' PORT = 8080 t1 = time.time() s

Re: strange sockets

2005-11-06 Thread Skink
sockopt(socket.SOL_TCP, socket.TCP_NODELAY, 1) > > to disable Nagle. thank yuo so much, both solutions work perfect! %python client.py client.py client.py client.py init 0.00101184844971 client.py 0.000586986541748 client.py 0.000448942184448 client.py 0.000470161437988 I think that I'l

Re: strange sockets

2005-11-06 Thread Skink
Bryan, > > Sion Arrowsmith is right about what causes the delay. > Just in case your real code looks like this, I'll note: > >> len, = struct.unpack("!i", s.recv(4)) >> data = s.recv(len) yes, my mistake ;) > > > First, you almost certainly don't want to use the name 'len'. > Ought not

Re: strange sockets

2005-11-07 Thread Skink
ver.py reading 631 40 server.py reading 631 41 why? thanks, skink. -- http://mail.python.org/mailman/listinfo/python-list

Re: strange sockets

2005-11-07 Thread Skink
Steve Holden wrote: > Skink wrote: > >> Sion Arrowsmith wrote: >> >>> conn.sendall(struct.pack("!i", len(data)) + data) >>> >>> or after creating conn >>> >>> conn.setsockopt(socket.SOL_TCP, socket.TCP_NODELAY, 1) &

traceback from embedded python

2005-09-17 Thread Skink
); //fprintf(stderr, "\n"); tb_frame = PyObject_GetAttrString(tb_frame, "f_back"); //PyObject_Print(tb_frame, stderr, Py_PRINT_RAW); //fprintf(stderr, "\n"); Py_XDECREF(tmp); } Py_XDECREF(exc_type); Py_XDECREF(exc_

django's view.py as class not just methods

2006-08-25 Thread Skink
s and for subsequent calls would be served as self ? I know, I know that HttpRequest has session member and I can use it. But maybe it would be good idea to have such url ==> class.method mapping. thanks, skink -- http://mail.python.org/mailman/listinfo/python-list

Re: django's view.py as class not just methods

2006-08-26 Thread Skink
Rob Wolfe wrote: > > I didn't try it with django but maybe closure is the solution. > Try this: > > > index, detail and download functions can be mapped > in urls.py now. > Rob, thanks a lot. is gonna be good starting point skink -- http://mail.python.org/mailman/listinfo/python-list

models & editors in PyQt4

2006-08-30 Thread Skink
. What i do is: in createEditor(self, parent, option, index) i call QtGui.QColorDialog.getColor() and return None What do you think? Is it Ok? thanks, skink # import sys from PyQt4 import QtGui, QtCore class PropertyDelegate(QtGui.QItemDelegate):

Re: models & editors in PyQt4

2006-08-30 Thread Skink
our? oh, this is default Qt behavoiur: first click selects row, second select editor (for ColorProperty, IntProperty & StringProperty you can now change the value) but third click is required only for properties w/ QCombobox editor (EnumProperty & BooleanProperty) ... skink > > David > -- http://mail.python.org/mailman/listinfo/python-list

SOAPpy

2006-01-27 Thread Skink
hi, there is a soap service: http://waluty.k2.pl/ws/NBPRates.asmx the question is why when i call GetRateValue method i always get '0' result? >>> import SOAPpy >>> srv = SOAPpy.WSDL.Proxy("http://waluty.k2.pl/ws/NBPRates.asmx?WSDL";) >>> srv.GetAllCodes() 'AUD CAD CHF CYP CZK DKK EEK EUR GBP H

Re: PyQt 4.0beta1 Released

2006-04-29 Thread Skink
question: my qt4 is built with QT_NO_ACCESSIBILITY and when I try to build pyqt I got errors no such method QWidget.setAccessibleName What should I do? Rebuild qt4 without QT_NO_ACCESSIBILITY #define? My qt is 4.1.2 skink -- http://mail.python.org/mailman/listinfo/python-list

pyqt v3.* and v4.*

2006-05-02 Thread Skink
() When I run pyqt 3.14 (but with installed sip 4.4.3) I get: import qt Segmentation fault Both 3.14 and 4.0 work, but not when installed together. skink -- http://mail.python.org/mailman/listinfo/python-list

Re: pyqt v3.* and v4.*

2006-05-02 Thread Skink
Phil Thompson wrote: > > > Install the latest versions of PyQt3 and SIP. Thanks Phil! v4.0 & v3.16 work with sip 4.4.3 ;) skink -- http://mail.python.org/mailman/listinfo/python-list