Re: HTML expect in python

2005-07-16 Thread tertius
WGW wrote: > I would like to automate some simple browser navigating using python. > Ideally, I would like a package like pyexpect, but that can handle a > browser in much the same way as pyexpect handles a terminal (tall > order!). In short, I want a macro language for a browser (I know about

Re: Recording Video with Python

2005-04-09 Thread tertius
[EMAIL PROTECTED] wrote: Is there a video module so that I can write a Linux Python script to record video coming over USB video cams? http://videocapture.sourceforge.net/ HTH T -- http://mail.python.org/mailman/listinfo/python-list

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

Re: exec function

2005-02-12 Thread tertius
[EMAIL PROTECTED] wrote: I'm a newbie to pthyon and I am creating an app with wxPython. I have 7 tables (more on the way... they are feed from a database) that need to be formatted in a certain way (DataTable() does this) and I am just looking for a cleaner way to pass all of the Grids (grid_1, gri

Re: hex notation funtion

2005-01-18 Thread tertius
tertius wrote: Hi, Is there a builtin function that will enable me to display the hex notation of a given binary string? (example below) Thanks all. -- http://mail.python.org/mailman/listinfo/python-list

hex notation funtion

2005-01-18 Thread tertius
Hi, Is there a builtin function that will enable me to display the hex notation of a given binary string? (example below) many thanks Tertius () 02 11 00 00 46 5A 1A 82 02 11 00 39 36 39 33 39 FZ.96939 0016(0010) 36 39 33 00 0A 30 33 37 34 34 39 35 38 25 DD 01 693

Re: date diff calc

2004-11-29 Thread tertius
Diez B. Roggisch wrote: > I can't imagine what could possibly be easier than subtracting two dates - in fact, most times one has to jump through much more hoops to achieve these results, e.g. in java. I'll try that. Thanks, T -- http://mail.python.org/mailman/listinfo/python-list

date diff calc

2004-11-29 Thread tertius
Hi, Is there a more pythonic way to write or do a date difference calculation? I have as input two date fields in the form '-MM-DD' TIA Terius from datetime import date bdl = '2004-11-25'.split('-') edl = '2004-11-30'.split('-') bd = date(int(bdl[0]), int(bdl[1]), int(bdl[2])) ed = date(in