Socket packet timing on Windows 2000

2009-06-11 Thread sanyi jiang
hi *Tim Janick,* I encountered same problem, did you ever get some resolution? Brent Jiang, -- http://mail.python.org/mailman/listinfo/python-list

Problem with apsw and garbage collection

2009-06-11 Thread Nikolaus Rath
Hi, Please consider this example: #!/usr/bin/env python import apsw import tempfile fh = tempfile.NamedTemporaryFile() conn = apsw.Connection(fh.name) # Fill the db with some data cur = conn.cursor() datafh = open("/dev/urandom", "rb") cur.execute("CREATE TABLE foo (no INT, data BLOB)") for i

Need help in Python regular expression

2009-06-11 Thread meryl
Hi, I have this regular expression blockRE = re.compile(".*RenderBlock {\w+}") it works if my source is "RenderBlock {CENTER}". But I want it to work with 1. RenderTable {TABLE} So i change the regexp to re.compile(".*Render[Block|Table] {\w+}"), but that breaks everything 2. RenderBlock (CENT

TypeError: int argument required

2009-06-11 Thread lucius
I am trying to print some values to a file (using c's printf like method). TypeError: int argument required # this works, i see value on screen print w, h, absX, absY # where result is the return value of my regular expression. w, h, absX, absY = result.group(3), result.group(4), result.group

Re: TypeError: int argument required

2009-06-11 Thread alex23
On Jun 12, 1:56 pm, lucius wrote: >  w, h, absX, absY = result.group(3), result.group(4), result.group > (5), result.group(6) > > w = 100 > h = 200 > > absX = 10.0 > absY = 20.0 Are you sure those values are ints & floats? I would expect your regexp would be returning strings... Try replacing th

Re: Need help in Python regular expression

2009-06-11 Thread Mark Tolonen
"meryl" wrote in message news:2d4d8624-043b-4f5f-ae2d-bf73bca3d...@p6g2000pre.googlegroups.com... Hi, I have this regular expression blockRE = re.compile(".*RenderBlock {\w+}") it works if my source is "RenderBlock {CENTER}". But I want it to work with 1. RenderTable {TABLE} So i change the

Re: Need help in Python regular expression

2009-06-11 Thread John S
On Jun 11, 10:30 pm, meryl wrote: > Hi, > > I have this regular expression > blockRE = re.compile(".*RenderBlock {\w+}") > > it works if my source is "RenderBlock {CENTER}". > > But I want it to work with > 1. RenderTable {TABLE} > > So i change the regexp to re.compile(".*Render[Block|Table] {\w+

Re: Specify the sorting direction for the various columns/

2009-06-11 Thread Mark Tolonen
"Oni" wrote in message news:018f4fa2-7203-4c98-a313-da5584976...@z20g2000prh.googlegroups.com... Managed to get a dictionary to sort on multiple columns using a tuple to set the sort order (see below). However how can I control that column "date" orders descending and the column "name" orders

Re: How *build* new elements and *replace* elements with xml.dom.minidom ?

2009-06-11 Thread Stefan Behnel
Johannes Bauer wrote: > Stefan Behnel schrieb: > >>> So I need to build hyperlinks (a elements) with href attribute and >>> replace the text elements (numbers) somehow. >> Try lxml.html instead. It makes it really easy to do these things. For >> example, you can use XPath to find all table cells t

Re: Need help in Python regular expression

2009-06-11 Thread meryl
On Jun 11, 9:41 pm, "Mark Tolonen" wrote: > "meryl" wrote in message > > news:2d4d8624-043b-4f5f-ae2d-bf73bca3d...@p6g2000pre.googlegroups.com... > > > > > > > Hi, > > > I have this regular expression > > blockRE = re.compile(".*RenderBlock {\w+}") > > > it works if my source is "RenderBlock {CEN

Re: Specify the sorting direction for the various columns/

2009-06-11 Thread Mike Kazantsev
On Thu, 11 Jun 2009 18:54:56 -0700 (PDT) Oni wrote: > Managed to get a dictionary to sort on multiple columns using a tuple > to set the sort order (see below). However how can I control that > column "date" orders descending and the column "name" orders > ascending. ... > bob = entries > bob.sor

Re: Win32 stdin redirection

2009-06-11 Thread lynvie
Thanks for the additional info! I had no idea this was an old Windows problem... I'm using Windows XP and I'm up-to-date on all my patches. The good news is I can invoke the script correctly now, thanks to your help! On Jun 11, 4:25 pm, Tim Harig wrote: > On 2009-06-11, Tim Harig wrote: > > >

EOF problem with ENTER

2009-06-11 Thread Prasoon
I am new to python I have written the following program in python.It is the solution of problem ETF in SPOJ. #Euler Totient Function from math import sqrt def etf(n): i,res =2,n while(i*i<=n): if(n%i==0): res-=res/i while(n%i==0): n/=i i+=1

Re: EOF problem with ENTER

2009-06-11 Thread Chris Rebert
On Thu, Jun 11, 2009 at 11:17 PM, Prasoon wrote: > I am new to python > I have written the following program in python.It is the solution of > problem ETF in SPOJ. > > > #Euler Totient Function > > from math import sqrt > def etf(n): >   i,res =2,n >   while(i*i<=n): >      if(n%i==0): >  

Re: FW: [Tutor] Multi-Threading and KeyboardInterrupt

2009-06-11 Thread Graham Dumpleton
On Jun 12, 3:35 pm, Dennis Lee Bieber wrote: > On Thu, 11 Jun 2009 08:44:24 -0500, "Strax-Haber, Matthew (LARC-D320)" > declaimed the following in > gmane.comp.python.general: > > > I sent this to the Tutor mailing list and did not receive a response. > > Perhaps one of you might be able to offer

Re: EOF problem with ENTER

2009-06-11 Thread Prasoon
On Jun 12, 11:28 am, Chris Rebert wrote: > On Thu, Jun 11, 2009 at 11:17 PM, Prasoon wrote: > > I am new to python > > I have written the following program in python.It is the solution of > > problem ETF in SPOJ. > > > #Euler Totient Function > > > from math import sqrt > > def etf(n): > >

Re: EOF problem with ENTER

2009-06-11 Thread Prasoon
On Jun 12, 11:28 am, Chris Rebert wrote: > On Thu, Jun 11, 2009 at 11:17 PM, Prasoon wrote: > > I am new to python > > I have written the following program in python.It is the solution of > > problem ETF in SPOJ. > > > #Euler Totient Function > > > from math import sqrt > > def etf(n): > >

<    1   2