Re: Why my thread can't access the global data?

2005-12-20 Thread Pelmen
your main loop already on accept when your thread change the go_on imho try to input another string after 'quit' and actually there is no need to use thread -- http://mail.python.org/mailman/listinfo/python-list

Re: Subclassing socket

2005-12-20 Thread Pelmen
imho: class new_socket(socket): def __init__(self, family=AF_INET, type=SOCK_STREAM, proto=0, _sock=None) socket.__init__(self, family=AF_INET, type=SOCK_STREAM, proto=0, _sock=None) def accept( self ): conn, addr = socket.accept() return ( new_socket(_sock=conn), add

Re: attach a pdf file to an email

2005-12-19 Thread Pelmen
here is my code for Excel outer = MIMEMultipart() outer['Subject'] = header.decode('cp1251').encode('koi8-r') outer['To'] = baseParam['mailto'] outer['From'] = baseParam['mailfrom'] outer.preamble = '' # To guarantee the message ends with a newline outer.epilogue = ''

Re: Cp1251-symbols in SOAP request

2005-12-17 Thread Pelmen
but socket will raise an exception if it'll be in cp1251 -- http://mail.python.org/mailman/listinfo/python-list

Re: Cp1251-symbols in SOAP request

2005-12-17 Thread Pelmen
thanks ... it seems to me best way will be b16encode, to prevent sax parser errors -- http://mail.python.org/mailman/listinfo/python-list

Re: Cp1251-symbols in SOAP request

2005-12-17 Thread Pelmen
as i understood, better way is base64 encoding on my side, and decoding on server side? -- http://mail.python.org/mailman/listinfo/python-list

Re: Cp1251-symbols in SOAP request

2005-12-17 Thread Pelmen
what to do, to encode it properly? UTF-8? -- http://mail.python.org/mailman/listinfo/python-list

Cp1251-symbols in SOAP request

2005-12-17 Thread Pelmen
in short >>> doc = SOAPpy.SOAPProxy('localhost:8000', 'urn:Server', encoding='cp1251') >>> doc.invoke('НомерДок'.decode('cp1251'), ()) *** Outgoing SOAP ** http://schemas.xmlsoap.org/soap/encoding/"; xmlns:SOAP-ENC="http://schemas.xmlsoap.org/s

Re: Problem with os.path

2005-12-15 Thread Pelmen
sorry? if i'm wrong? but i'm think you have to use double slash, to prevent escape-interpreting as '\n' for example -- http://mail.python.org/mailman/listinfo/python-list

Re: Can I use win32 COM object in a thread?

2005-12-14 Thread Pelmen
Sorry for post, answer was near ... just do search 2. Ixokai From: "Ixokai" <[EMAIL PROTECTED]> Mon, 9 Feb 2004 11:05:08 -0800 Basically, adodbapi uses COM, and COM and threads require a bit of care, apparently. Your webkit thing may be using a thread to handle stuff. import pythoncom python

Can I use win32 COM object in a thread?

2005-12-14 Thread Pelmen
When I try to call a method of COM object, it return error about "There wasn't 'CoInitialize' call", or if I use thread, I have to access COM object methods in other way? thanks for any help -- http://mail.python.org/mailman/listinfo/python-list

Re: Simple (?) question about print statement

2005-12-14 Thread Pelmen
sorry ... i don'understand a question from first read my previos aswer is not an aswer at all -- http://mail.python.org/mailman/listinfo/python-list

Re: Simple (?) question about print statement

2005-12-14 Thread Pelmen
>From doc: range( [start,] stop[, step]) This is a versatile function to create lists containing arithmetic progressions. It is most often used in for loops. The arguments must be plain integers. If the step argument is omitted, it defaults to 1. If the start argument is omitted, it defaults to 0

Re: Get rid of recursive call __getattr__

2005-12-14 Thread Pelmen
thanks, now all clear -- http://mail.python.org/mailman/listinfo/python-list

Re: Get rid of recursive call __getattr__

2005-12-14 Thread Pelmen
>>> class Test: def __getattr__(self, attr): print attr def foo(x): print x >>> t = Test() >>> print t __str__ Traceback (most recent call last): File "", line 1, in -toplevel- print t TypeError: 'NoneType' object is not callable what i have to

Re: Get rid of recursive call __getattr__

2005-12-14 Thread Pelmen
thanks, i found the problem -- http://mail.python.org/mailman/listinfo/python-list

Re: Get rid of recursive call __getattr__

2005-12-14 Thread Pelmen
as __repr__ for example? -- http://mail.python.org/mailman/listinfo/python-list

Re: Get rid of recursive call __getattr__

2005-12-14 Thread Pelmen
thanks, i understood my mistake i try to get attribute, that wasn't defined -- http://mail.python.org/mailman/listinfo/python-list

Re: Get rid of recursive call __getattr__

2005-12-14 Thread Pelmen
thanks, i should been read more closely -- http://mail.python.org/mailman/listinfo/python-list

Get rid of recursive call __getattr__

2005-12-14 Thread Pelmen
How can I get rid of recursive call __getattr__ inside this method, if i need to use method or property of the class? -- http://mail.python.org/mailman/listinfo/python-list