RE: Generating RTF with Python

2005-03-31 Thread Tertius Cronje
I'll use http://www.tug.org/ or a smaller solution http://lout.sourceforge.net/ together with one of many Python template solutions to generate to generate reports. HTH T > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On > Behalf Of Andreas Jung > Sent: Thursda

hex string into binary format?

2005-03-31 Thread Tertius Cronje
Hi, How do I get a hexvalued string to a format recognized for binary calculation? import binascii s1 = '1C46BE3D9F6AA820' s2 = '8667B5236D89CD46' i1 = binascii.unhexlify(s1) i2 = binascii.unhexlify(s2) x = i1 ^i2 TypeError: unsupported operand type(s) for ^: 'str' and 'str' Many TIA

RE: inter threading info

2005-03-23 Thread Tertius Cronje
> -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On > Behalf Of Daniel Dittmar > Sent: Wednesday, March 23, 2005 4:46 PM > To: python-list@python.org > Subject: Re: inter threading info > > Tertius Cronje wrote: > > &g

inter threading info

2005-03-23 Thread Tertius Cronje
Hi All, Q: Is it possible for a thread on SocketServer.ThreadingTCPServer to get the socket info of *other* open thread/s and use that info to send data to the accepting client? I wrote a socketserver using SocketServer.ThreadingTCPServer. A client is connected to the server and expects multiple

RE: Static parameter count

2005-03-17 Thread Tertius Cronje
> > elif len(L) == 5: > > return struct.pack(fmt,L[0] , L[1], L[2], L[3], L[4]) > > elif len(L) == 6: > > return struct.pack(fmt,L[0] , L[1], L[2], L[3], L[4], L[5]) > > > > # etc... etc... etc ... > > return struct.pack(fmt, *L) > > Should do the trick

Static parameter count

2005-03-17 Thread Tertius Cronje
Hi all, This does not feel Pythonic. Is there a better way to do the same? Many TIA T # L = [1,2,3,4,5,6, etc] # L can contain 'n' elements # fmt is made up to each particular specification if len(L) == 0: return ''

RE: Good use for Jython

2005-03-16 Thread Tertius Cronje
> Other than being used to wrap Java classes, what other real use is > there for Jython being that Python has many other GUI toolkits > available? Also, these toolkits like Tkinter are so much better for > client usage (and faster) than Swing, so what would be the advantage > for using Jython? or I