Re: Hexadecimal list conversion

2007-12-20 Thread Mark T
Gabriel Genellina [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] En Thu, 20 Dec 2007 09:30:14 -0300, Neil Webster [EMAIL PROTECTED] escribi�: I have a list which is a line from a file: ['\x003\x008\x001\x004\x007\x005\x00.\x005\x000\x002\x005\x009\x009\x00',

Re: Next float?

2007-11-21 Thread Mark T
Steven D'Aprano [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Is there a simple, elegant way in Python to get the next float from a given one? By next float, I mean given a float x, I want the smallest float larger than x. Bonus points if I can go in either direction (i.e. the

Re: how to fill many data strings from socket.recvfrom()

2007-11-03 Thread Mark T
lgwe [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I want to receive 200 udp datagrams. Each into a new data string. But I dont know how to do that, this is wrong: import socket s = socket.socket(socket.AF_INET,socket.SOCK_DGRAM) s.bind((,port)) i = 0 while i200:

Re: View XMLRPC Requests/Responses?

2007-10-15 Thread Mark T
to the screen? Thanks. Regards, Ken www.wireshark.org -Mark T. -- http://mail.python.org/mailman/listinfo/python-list

Re: slice with negative stride

2007-10-06 Thread Mark T
) mystr[8],mystr[3] ('g', 's') mystr[8:3:-1] 'gnirt' s=slice(None,3,1) s.indices(len(mystr)) # start is the beginning of the string if step is positive (0, 3, 1) mystr[0],mystr[3] ('m', 's') mystr[0:3:1] 'my ' -Mark T -- http://mail.python.org/mailman/listinfo/python-list

Re: elementtree question

2007-09-21 Thread Mark T
Gabriel Genellina [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] En Fri, 21 Sep 2007 11:49:53 -0300, Tim Arnold [EMAIL PROTECTED] escribi�: Hi, I'm using elementtree and elementtidy to work with some HTML files. For some of these files I need to enclose the body content in a

Re: Python equivalent of Perl's $/

2007-08-20 Thread Mark T
way of teaching Americans geography Ambrose Bierce (1842 - 1914) 'test\ntest2.\ntest3\ntest4.\ntest5'.split('.\n') ['test\ntest2', 'test3\ntest4', 'test5'] -Mark T. -- http://mail.python.org/mailman/listinfo/python-list

Re: Threaded Design Question

2007-08-09 Thread Mark T
sees a file, in renames it to a different extension and spins off a thread to process the contents. -Mark T. -- http://mail.python.org/mailman/listinfo/python-list

Re: passing arguments to tcpserver classes

2007-06-13 Thread Mark T
Eric Spaulding [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Is there an easy way to pass arguments to a handler class that is used by the standard TCPServer? normally -- srvr =SocketServer.TCPServer(('',port_num), TCPHandlerClass) I'd like to be able to: srvr

Re: Why can not catch the inner exception

2007-06-07 Thread Mark T
人言落日是天涯,望极天涯不见家 [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Please see the follow code, I can not catch the exception IOError raised from shutil.copyfile() , why? try: if (DEST_TYPE TYPE_FTP): fn = oname

Re: str() and repr() question

2007-04-26 Thread Mark T
adima [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi All! Sorry, my English isnt good, but get a try to describe my problem. Today we wrote next script: import os, glob, time, string files_to_test = ( J:\\BWNEW\\!Unerase\\test.test, L:\\Temp\Nick\ \test.test,

Re: Python automatic testing: mocking an imported module?

2007-03-28 Thread Mark T
Silfheed [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Heyas So we have the following situation: we have a testee.py that we want to automatically test out and verifiy that it is worthy of being deployed. We want our tester.py to test the code for testee.py without changing

Re: Python 3000 idea: reversing the order of chained assignments

2007-03-21 Thread Mark T
points to nextnode, then node is reassigned to point to nextnode, losing the original node! The refactoring below is doing the same thing. It is, however, evaluating right-to-left as you want. nextnode is place in node.next and placed in node, also losing the original value of node. -Mark T

Re: Python 3000 idea: reversing the order of chained assignments

2007-03-21 Thread Mark T
writing a 3 writing b 3 I wouldn't have expected a to be assigned first in a right-to-left parsing order. The result is the same in any case. -Mark T. -- http://mail.python.org/mailman/listinfo/python-list

Re: File Closing Problem in 2.3 and 2.4, Not in 2.5 (Final report)

2007-01-09 Thread Mark T
Gabriel Genellina [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] At Tuesday 9/1/2007 20:31, Carroll, Barry wrote: I've spent about a day investigating our too many open files error. I found the following: 1. Windows XP allows a Python 2.5 script to open 509 concurrent

Re: Python Challenge ahead [NEW] for riddle lovers

2005-04-30 Thread Mark T
pythonchallenge [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] For the riddles' lovers among you, you are most invited to take part in the Python Challenge, the first python programming riddle on the net. You are invited to take part in it at: http://www.pythonchallenge.com

Re: getting text from WinXP console

2005-03-22 Thread Mark T.
Chris Maloof [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hello, Does anyone know how I can read the ASCII text from a console window (from another application) in WinXP? It doesn't sound like a major operation, but although I can find the window via pywin32, I haven't been