Re: editing scripts on a mac

2007-04-29 Thread Arnaud Delobelle
On Apr 27, 5:37 pm, Tommy Grav <[EMAIL PROTECTED]> wrote: [...] > I think emacs is bundled with OS X and can be started in a terminal > window with emacs. If you want a non-terminal editor Aquaemacs > (http://aquamacs.org/) is available and easily installed on mac. Personally I prefer Carbon Emacs

Re: Memory addressing

2007-04-29 Thread Hendrik van Rooyen
"Steven D'Aprano" <[EMAIL PROTECTED]> wrote: > On Fri, 27 Apr 2007 16:07:57 -0700, castironpi wrote: > > > That's what we need: a CopyMemory() routine. > > What we _really_ need are Poke() and Peek() routines. > Yeah right! - we also need macros, then an assembler johnny like me can hack his

While we're talking about annoyances

2007-04-29 Thread Steven D'Aprano
Am I the only one who finds that I'm writing more documentation than code? I recently needed to write a function to generate a rank table from a list. That is, a list of ranks, where the rank of an item is the position it would be in if the list were sorted: alist = list('defabc') ranks = [3, 4,

Re: While we're talking about annoyances

2007-04-29 Thread GHUM
Steven, > def index(sequence): > decorated = zip(sequence, xrange(len(sequence))) > decorated.sort() > return [idx for (value, idx) in decorated] would'nt that be equivalent code? def index(sequence): return [c for _,c in sorted((b,a) for a, b in enumerate(sequence))] tested, g

Re: Tracebacks for `exec`ed code?

2007-04-29 Thread Martin v. Löwis
Adam Atlas schrieb: > Is it possible to make more traceback information available for > exceptions code dynamically run via `exec`? Normally it just says > things like "File '', line 3, in ?", which is not very > helpful. I'm looking for a way for it to show the line of source code > below it, like

Re: Asynchronous XML-RPC client library?

2007-04-29 Thread Martin v. Löwis
Jarek Zgoda schrieb: > Is there anything like that? Googling yields many articles on async > servers, but virtually nothing on clients. I have to talk to remote in > an environment that does not allow threads... My recommendation would be to use xmlrpclib, and combine it with the async framework t

Re: While we're talking about annoyances

2007-04-29 Thread Michael Hoffman
GHUM wrote: > Steven, > >> def index(sequence): >> decorated = zip(sequence, xrange(len(sequence))) >> decorated.sort() >> return [idx for (value, idx) in decorated] > > would'nt that be equivalent code? > > def index(sequence): > return [c for _,c in sorted((b,a) for a, b in >

Re: Asynchronous XML-RPC client library?

2007-04-29 Thread Jarek Zgoda
Martin v. Löwis napisał(a): >> Is there anything like that? Googling yields many articles on async >> servers, but virtually nothing on clients. I have to talk to remote in >> an environment that does not allow threads... > > My recommendation would be to use xmlrpclib, and combine it with > the

Re: Any Good tools to create CSV Files?

2007-04-29 Thread Bart Willems
Carsten Haese wrote: > You mean something like the csv module that is part of Python's standard > library? > import csv help(csv) You have to admit, the module name is not really intuitive... :) -- http://mail.python.org/mailman/listinfo/python-list

Could zipfile module process the zip data in memory?

2007-04-29 Thread 人言落日是天涯,望极天涯不见家
I made a C/S network program, the client receive the zip file from the server, and read the data into a variable. how could I process the zipfile directly without saving it into file. In the document of the zipfile module, I note that it mentions the file-like object? what does it mean? class ZipF

Re: I have a chance to do somting diffrent way not Python ?!

2007-04-29 Thread Bart Willems
anders wrote: > So basicly i like advice about interac with os, compiler etc. > Nice webblinks to read more > and do/don't things. Hello Anders, OS Support for Windows in Python is excellent. I suggest you download the latest version, and don't forget to download Mark Hammond's win32 library as

Re: Beginner Ping program

2007-04-29 Thread Bjoern Schliessmann
Linus Cohen wrote: > Actually the class ping bit is a placeholder. But why is it one? "ping" is something you do -- and not a "thing" of which you could have several copies. > I'm actually developing a module with python implementations of > most standard network/internet tools such as telnet,

Re: While we're talking about annoyances

2007-04-29 Thread BJörn Lindqvist
On 4/29/07, Steven D'Aprano <[EMAIL PROTECTED]> wrote: > To do that, I needed to generate an index table first. In the book > "Numerical Recipes in Pascal" by William Press et al there is a procedure > to generate an index table (46 lines of code) and one for a rank table > (five lines). 51 lines

Re: if __name__ == 'main': & passing an arg to a class object

2007-04-29 Thread Bart Willems
gtb wrote: > appear at the end of many examples I see. Is this to cause a .class > file to be generated? This might be obvious, but no one else mentioned it: the Python interpreter cannot execute code that it hasn't compiled yet, which is why the "if __name__ ..." code is always at the end of the

Re: Could zipfile module process the zip data in memory?

2007-04-29 Thread John Machin
On Apr 29, 9:15 pm, 人言落日是天涯,望极天涯不见家 <[EMAIL PROTECTED]> wrote: > I made a C/S network program, the client receive the zip file from the > server, and read the data into a variable. how could I process the > zipfile directly without saving it into file. > In the document of the zipfile module, I not

Re: Could zipfile module process the zip data in memory?

2007-04-29 Thread Daniel Nogradi
> I made a C/S network program, the client receive the zip file from the > server, and read the data into a variable. how could I process the > zipfile directly without saving it into file. > In the document of the zipfile module, I note that it mentions the > file-like object? what does it mean? >

Re: Could zipfile module process the zip data in memory?

2007-04-29 Thread 人言落日是天涯,望极天涯不见家
On Apr 29, 7:37 pm, "Daniel Nogradi" <[EMAIL PROTECTED]> wrote: > > I made a C/S network program, the client receive the zip file from the > > server, and read the data into a variable. how could I process the > > zipfile directly without saving it into file. > > In the document of the zipfile modu

Re: While we're talking about annoyances

2007-04-29 Thread Ben Finney
"BJörn Lindqvist" <[EMAIL PROTECTED]> writes: > On the other hand, there seem to be some progress that could be made > to reduce the amount of work in writing documentation. > Documentation in Esperanto instead of English maybe? Lojban http://www.lojban.org/> is both easier to learn world-wide th

Re: My newbie annoyances so far

2007-04-29 Thread Bjoern Schliessmann
Steven D'Aprano wrote: > There are bad programmers in every language, but RPL conditional > blocks aren't the cause of them. Once you learn how RPL works, if > statements work consistently and obviously (although maybe not to > programmers who don't get RP notation). ACK. What made me anwswer was

Re: Could zipfile module process the zip data in memory?

2007-04-29 Thread Daniel Nogradi
> > > I made a C/S network program, the client receive the zip file from the > > > server, and read the data into a variable. how could I process the > > > zipfile directly without saving it into file. > > > In the document of the zipfile module, I note that it mentions the > > > file-like object?

Re: if __name__ == 'main': & passing an arg to a class object

2007-04-29 Thread John Machin
On Apr 29, 9:32 pm, Bart Willems <[EMAIL PROTECTED]> wrote: > gtb wrote: > > appear at the end of many examples I see. Is this to cause a .class > > file to be generated? > > This might be obvious, but no one else mentioned it: the Python > interpreter cannot execute code that it hasn't compiled ye

Re: Could zipfile module process the zip data in memory?

2007-04-29 Thread Diez B. Roggisch
人言落日是天涯,望极天涯不见家 schrieb: > On Apr 29, 7:37 pm, "Daniel Nogradi" <[EMAIL PROTECTED]> wrote: >>> I made a C/S network program, the client receive the zip file from the >>> server, and read the data into a variable. how could I process the >>> zipfile directly without saving it into file. >>> In the d

Re: Could zipfile module process the zip data in memory?

2007-04-29 Thread 人言落日是天涯,望极天涯不见家
On Apr 29, 7:37 pm, "Daniel Nogradi" <[EMAIL PROTECTED]> wrote: > > I made a C/S network program, the client receive the zip file from the > > server, and read the data into a variable. how could I process the > > zipfile directly without saving it into file. > > In the document of the zipfile modu

Re: Could zipfile module process the zip data in memory?

2007-04-29 Thread 人言落日是天涯,望极天涯不见家
On Apr 29, 8:14 pm, "Daniel Nogradi" <[EMAIL PROTECTED]> wrote: > > > > I made a C/S network program, the client receive the zip file from the > > > > server, and read the data into a variable. how could I process the > > > > zipfile directly without saving it into file. > > > > In the document of

Re: Could zipfile module process the zip data in memory?

2007-04-29 Thread John Machin
On Apr 29, 9:51 pm, 人言落日是天涯,望极天涯不见家 <[EMAIL PROTECTED]> wrote: > On Apr 29, 7:37 pm, "Daniel Nogradi" <[EMAIL PROTECTED]> wrote: > > > > I made a C/S network program, the client receive the zip file from the > > > server, and read the data into a variable. how could I process the > > > zipfile dire

Re: Could zipfile module process the zip data in memory?

2007-04-29 Thread John Machin
On Apr 29, 10:14 pm, "Daniel Nogradi" <[EMAIL PROTECTED]> wrote: > > > > I made a C/S network program, the client receive the zip file from the > > > > server, and read the data into a variable. how could I process the > > > > zipfile directly without saving it into file. > > > > In the document of

Re: While we're talking about annoyances

2007-04-29 Thread Jarek Zgoda
Ben Finney napisał(a): >> On the other hand, there seem to be some progress that could be made >> to reduce the amount of work in writing documentation. >> Documentation in Esperanto instead of English maybe? > > Lojban http://www.lojban.org/> is both easier to learn world-wide > than Euro-biased

Re: Asynchronous XML-RPC client library?

2007-04-29 Thread Stefano Canepa
On 29 Apr, 07:11, Jarek Zgoda <[EMAIL PROTECTED]> wrote: > Is there anything like that? Googling yields many articles on async > servers, but virtually nothing on clients. I have to talk to remote in > an environment that does not allow threads... > > -- > Jarek Zgodahttp://jpa.berlios.de/ Why don

Re: Numbers and truth values

2007-04-29 Thread Beliavsky
On Apr 28, 4:05 pm, [EMAIL PROTECTED] (Alex Martelli) wrote: > John Nagle <[EMAIL PROTECTED]> wrote: > > > I'd have to consider that a bug. > > > Some very early FORTRAN compilers allowed you to redefine > > integer constants: > > > CALL SET(25,99) > > WRITE (6,100) 25 > >

Re: Asynchronous XML-RPC client library?

2007-04-29 Thread Jarek Zgoda
Stefano Canepa napisał(a): >> Is there anything like that? Googling yields many articles on async >> servers, but virtually nothing on clients. I have to talk to remote in >> an environment that does not allow threads... > > Why don't you try twisted (http://www.twistedmatrix.com) Because this i

Re: SEO - Search Engine Optimization - Seo Consulting

2007-04-29 Thread Dom Robinson
In article <[EMAIL PROTECTED]>, "Alvin Bruney [MVP]" says... > Please don't spam this group > A top-poster replies to a spammer. Now that world has truly gone mad(!) -- Dom Robinson Gamertag: DVDfever email: dom at dvdfever dot co dot uk /* http://DVDfever.co.uk (editor) /* 1132 DVDs,

Re: While we're talking about annoyances

2007-04-29 Thread Arnaud Delobelle
On Apr 29, 11:46 am, Michael Hoffman <[EMAIL PROTECTED]> wrote: > GHUM wrote: > > Steven, > > >> def index(sequence): > >> decorated = zip(sequence, xrange(len(sequence))) > >> decorated.sort() > >> return [idx for (value, idx) in decorated] > > > would'nt that be equivalent code? > > >

Re: SEO - Search Engine Optimization - Seo Consulting

2007-04-29 Thread Spin Dryer
On Sat, 28 Apr 2007 21:21:39 -0400, ["Alvin Bruney [MVP]" ] said :- >Please don't spam this group Top posting and without removing the spamvertised site, you are as bad as the spammer. Call yourself an MVP, that's a joke Slick. Indeed the spam was not even seen by probably many servers until you

Re: editing scripts on a mac

2007-04-29 Thread Adam Atlas
On Apr 27, 12:08 pm, Steve Holden <[EMAIL PROTECTED]> wrote: > Now, frankly, I don't think this answer is correct, since I know OS X is > a UNIX derivative, but I am loathe to involve a programming noob with vi > or something similar. So I wondered if one of the c.l.py mac users could > give brief

Re: While we're talking about annoyances

2007-04-29 Thread Paul Rubin
Steven D'Aprano <[EMAIL PROTECTED]> writes: > I recently needed to write a function to generate a rank table from a > list. That is, a list of ranks, where the rank of an item is the position > it would be in if the list were sorted: > > alist = list('defabc') > ranks = [3, 4, 5, 0, 1, 2] fst = o

Python ODBC

2007-04-29 Thread Harlin Seritt
Is there a Python odbc module that will work on Linux? I have a jdbc connection to a DB2 server. I am looking hopefully for an open source solution and not a commercial one. Thanks, Harlin -- http://mail.python.org/mailman/listinfo/python-list

Re: While we're talking about annoyances

2007-04-29 Thread Arnaud Delobelle
On Apr 29, 5:33 pm, Paul Rubin wrote: > Steven D'Aprano <[EMAIL PROTECTED]> writes: > > I recently needed to write a function to generate a rank table from a > > list. That is, a list of ranks, where the rank of an item is the position > > it would be in if the list were

Free Windows Vista Download

2007-04-29 Thread Leisure . 207
http://freewindowsvista.blogspot.com/ - Get Windows Vista for Free -- http://mail.python.org/mailman/listinfo/python-list

howto check is object a func, lambda-func or something else?

2007-04-29 Thread dmitrey
hi all, howto check is object Arg1 - a func, lambda-func - something else? I tried callable(Arg1), but callable(lambda-func) returnes False Thx, D. -- http://mail.python.org/mailman/listinfo/python-list

Re: howto check is object a func, lambda-func or something else?

2007-04-29 Thread Gregor Horvath
dmitrey schrieb: > howto check is object Arg1 > - a func, lambda-func > - something else? > > I tried callable(Arg1), but callable(lambda-func) returnes False I don't understand your problem: >>> callable(lambda:0) True Please post your relevant code. Greg -- http://mail.python.org/mailman

Re: howto check is object a func, lambda-func or something else?

2007-04-29 Thread 7stud
On Apr 29, 11:19 am, dmitrey <[EMAIL PROTECTED]> wrote: > > callable(lambda-func) returnes False > I'm not seeing that. Try this: f = lambda x: x print callable(f) ---output:-- True -- http://mail.python.org/mailman/listinfo/python-list

Re: Video: Professor of Physics Phd at Cal Tech says: 911 Inside Job

2007-04-29 Thread gDog
On Apr 28, 2:50 pm, Major Quaternion Dirt Quantum <[EMAIL PROTECTED]> wrote: > here's a question that came-up recently, > in battling with the controlled-demo advocates > at teh Promenade: > > how is it that the metal was still molten, > after weeks? snip...snip...snip... I say it's time to brin

Re: Video: Professor of Physics Phd at Cal Tech says: 911 Inside Job

2007-04-29 Thread Gordon
On Thu, 26 Apr 2007 00:33:19 GMT, "Bill Habr" <[EMAIL PROTECTED]> wrote: > ><[EMAIL PROTECTED]> wrote in message >news:[EMAIL PROTECTED] >> Cal Tech is the ELITE of ELITE in physics. >> >> If Feynman were alive, he would point his finger straight at the 911 >> criminal operators, the yank bastards

Re: List objects are un-hashable

2007-04-29 Thread Andy
Thanks Michael and Ant. -- http://mail.python.org/mailman/listinfo/python-list

Re: relative import broken?

2007-04-29 Thread Alan Isaac
"Alex Martelli" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > If you're running test1.py as your main module, then it's not part of a > package, so the relative import should indeed fail as you mention. So if I understand you, in a package, any module that I wish to make available

Re: Python ODBC

2007-04-29 Thread Jorge Mazzonelli
For ODBC connections you can try pyODBC. I didn't test it on Linux but it is said it works on both Windows and POSIX systems. pyODBC--> pyodbc.sourceforge.net The license is MIT License. You can also have a look here: http://sparcs.kaist.ac.kr/~tinuviel/python/database.html since it has various l

Re: howto check is object a func, lambda-func or something else?

2007-04-29 Thread dmitrey
Thank you, I have fixed the bug -- http://mail.python.org/mailman/listinfo/python-list

Counting

2007-04-29 Thread Andy
Hi, the file below will print all the keywords in a file and also the line # of the keyword. What I couldn't figure out is to count those keywords per line. For example - "Line #1 has 3 keywords" Can I do like - total[j] = total[j] + numwords(k) "Line number %d has %d keywords" % (j, total[j]) S

exclusive shelve open

2007-04-29 Thread castironpi
I'm trying to be safe and make sure only one python instance opens the shelf. Any ideas? -- http://mail.python.org/mailman/listinfo/python-list

Re: While we're talking about annoyances

2007-04-29 Thread Raymond Hettinger
[Steven D'Aprano] > I recently needed to write a function to generate a rank table from a > list. That is, a list of ranks, where the rank of an item is the position > it would be in if the list were sorted: > > alist = list('defabc') > ranks = [3, 4, 5, 0, 1, 2] . . . > def rank(sequence): > t

Re: mysql "rows affected"

2007-04-29 Thread Carl K
Dennis Lee Bieber wrote: > On Thu, 26 Apr 2007 18:18:57 -0700, John Nagle <[EMAIL PROTECTED]> > declaimed the following in comp.lang.python: > >> Carl K wrote: >>> using MySQLdb, I do cursor.execute("update...") >>> >>> How can I tell how many rows were affected ? >>> >>> Carl K >> cursor = d

I can't inherit from "compiled" classes ?

2007-04-29 Thread Maxim Veksler
Hello list, I'm trying to subclass socket and select, for both I get: """ TypeError: Error when calling the metaclass bases module.__init__() takes at most 2 arguments (3 given) """, I don't understand this error. Why would python try to pass 3 arguments (what are they) ? Googling for this er

Re: I can't inherit from "compiled" classes ?

2007-04-29 Thread half . italian
On Apr 29, 12:48 pm, "Maxim Veksler" <[EMAIL PROTECTED]> wrote: > Hello list, > > I'm trying to subclass socket and select, for both I get: > """ TypeError: Error when calling the metaclass bases > module.__init__() takes at most 2 arguments (3 given) """, I don't > understand this error. Why w

Re: I can't inherit from "compiled" classes ?

2007-04-29 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, Maxim Veksler wrote: > Hello list, > > I'm trying to subclass socket and select, for both I get: > """ TypeError: Error when calling the metaclass bases > module.__init__() takes at most 2 arguments (3 given) """, I don't > understand this error. Why would python try t

Re: Counting

2007-04-29 Thread James Stroud
Andy wrote: > Hi, the file below will print all the keywords in a file and also the > line # of the keyword. What I couldn't figure out is to count those > keywords per line. For example - "Line #1 has 3 keywords" > > Can I do like - > > total[j] = total[j] + numwords(k) > "Line number %d has %d

Re: exclusive shelve open

2007-04-29 Thread castironpi
On Apr 29, 2:12 pm, [EMAIL PROTECTED] wrote: > I'm trying to be safe and make sure only one python instance opens the > shelf. Any ideas? Using Windows. -- http://mail.python.org/mailman/listinfo/python-list

Re: Counting

2007-04-29 Thread James Stroud
James Stroud wrote: > Andy wrote: >> Hi, the file below will print all the keywords in a file and also the >> line # of the keyword. What I couldn't figure out is to count those >> keywords per line. For example - "Line #1 has 3 keywords" >> >> Can I do like - >> >> total[j] = total[j] + numwords(k

Re: Counting

2007-04-29 Thread James Stroud
James Stroud wrote: > James Stroud wrote: >> Andy wrote: >>> Hi, the file below will print all the keywords in a file and also the >>> line # of the keyword. What I couldn't figure out is to count those >>> keywords per line. For example - "Line #1 has 3 keywords" >>> >>> Can I do like - >>> >>> to

Re: Counting

2007-04-29 Thread rockmode
That's a short, abridged version of my code :) But, what I want is to count total# of keywords per line and print 'em. Rather than printing : The word 'and' belongs in line num: 1 The word 'del' belongs in line num: 1 The word 'from' belongs in line num: 1 I want to print " Line #1 has 3 keywords

Re: Counting

2007-04-29 Thread castironpi
On Apr 29, 2:11 pm, Andy <[EMAIL PROTECTED]> wrote: > Hi, the file below will print all the keywords in a file and also the > line # of the keyword. What I couldn't figure out is to count those > keywords per line. For example - "Line #1 has 3 keywords" > > Can I do like - > > total[j] = total[j] +

Re: Any Good tools to create CSV Files?

2007-04-29 Thread Aahz
In article <[EMAIL PROTECTED]>, Carsten Haese <[EMAIL PROTECTED]> wrote: >On Sat, 2007-04-28 at 18:55 -0700, johnny wrote: >> >> Any Good tools to create CSV Files? ReportLab only creates pdf >> files. I need something to create CSV files. > >You mean something like the csv module that is part o

opening a new tab in opera does not work

2007-04-29 Thread solstice.dhiver
hi. i am using python 2.5.1 when i run import webbrowser webbrowser.get('opera').open_new_tab("http://www.osnews.com";) i got a True after the last command but nothing happen at all in opera ! any one got that too ? i use opera 9.20 if i run in a command-line this opera -remote 'openURL(http://

Re: I can't inherit from "compiled" classes ?

2007-04-29 Thread Maxim Veksler
On 4/29/07, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: > In <[EMAIL PROTECTED]>, Maxim Veksler > wrote: > > > Hello list, > > > > I'm trying to subclass socket and select, for both I get: > > """ TypeError: Error when calling the metaclass bases > > module.__init__() takes at most 2 ar

Re: Counting

2007-04-29 Thread James Stroud
[EMAIL PROTECTED] wrote: > That's a short, abridged version of my code :) But, what I want is to > count total# of keywords per line and print 'em. Rather than > printing : > > The word 'and' belongs in line num: 1 > The word 'del' belongs in line num: 1 > The word 'from' belongs in line num: 1 >

fastest way to find the intersection of n lists of sets

2007-04-29 Thread Prateek
I have 3 variable length lists of sets. I need to find the common elements in each list (across sets) really really quickly. Here is some sample code: # Doesn't make sense to union the sets - we're going to do intersections later anyway l1 = reduce(operator.add, list(x) for x in l1) l2 = reduce(o

help in debugging file.seek, file.read

2007-04-29 Thread Prateek
I have a wierd sort of problem. I'm writing a bunch of sets to a file (each element is a fixed length string). I was originally using the built-in sets type but due to a processing issue, I had to shift to a Python implementation (see http://groups.google.com/group/comp.lang.python/browse_thread/t

Re: Video: Professor of Physics Phd at Cal Tech says: 911 Inside Job

2007-04-29 Thread Mitchell Jones
In article <[EMAIL PROTECTED]>, War Office <[EMAIL PROTECTED]> wrote: > On 28 abr, 14:15, Eric Gisse <[EMAIL PROTECTED]> wrote: > > On Apr 24, 6:13 pm, [EMAIL PROTECTED] wrote: [snip] > > I love how folks like you ask for intellectual honesty when every > > effort is made to ignore evidence tha

Re: Interrupting ftplib.storbinary()

2007-04-29 Thread billiejoex
On 26 Apr, 16:29, Florian Demmer <[EMAIL PROTECTED]> wrote: > Hi! > > I have a number of ftp uploads running in parallel using > ftplib.storbinary and threading and in case one of them fails I need > to interrupt all the others (but not exit the program completely)... > do you guys have an idea ho

Re: help in debugging file.seek, file.read

2007-04-29 Thread Prateek
Sorry, I forgot to mention - the RTH line only prints when the time taken is > 0.1 second (so that I don't pollute the output with other calls that complete normally) -- http://mail.python.org/mailman/listinfo/python-list

Re: Video: Professor of Physics Phd at Cal Tech says: 911 Inside Job

2007-04-29 Thread Michael A. Terrell
Mitchell Jones wrote: > If I seem to be ignoring you, consider the possibility > that you are in my killfile. --MJ Ditto. -- Service to my country? Been there, Done that, and I've got my DD214 to prove it. Member of DAV #85. Michael A. Terrell Central Florida -- http://mail.python.org/ma

Re: Any Good tools to create CSV Files?

2007-04-29 Thread Bart Willems
Aahz wrote: > In all fairness, the csv module is new in Python 2.3, and I'm sure I'm > not the only person still using Python 2.2 for production. That is true, on the other hand, Reportlab is made for at least Python 2.4, "although it will work with 2.3" - so he has 2.3 at least :) -- http://mail

Re: fastest way to find the intersection of n lists of sets

2007-04-29 Thread James Stroud
Prateek wrote: > I have 3 variable length lists of sets. I need to find the common > elements in each list (across sets) really really quickly. > > Here is some sample code: > > # Doesn't make sense to union the sets - we're going to do > intersections later anyway > l1 = reduce(operator.add, lis

Re: Beginner Ping program

2007-04-29 Thread Gabriel Genellina
En Sun, 29 Apr 2007 08:26:36 -0300, Bjoern Schliessmann <[EMAIL PROTECTED]> escribió: > Linus Cohen wrote: >> It will be called inettools, and the ping function is >> what I'm working on first. It should be a simple enough job to >> code in the features the Unix and DOS ping programs have(never

Re: exclusive shelve open

2007-04-29 Thread Gabriel Genellina
En Sun, 29 Apr 2007 17:13:42 -0300, <[EMAIL PROTECTED]> escribió: > On Apr 29, 2:12 pm, [EMAIL PROTECTED] wrote: >> I'm trying to be safe and make sure only one python instance opens the >> shelf. Any ideas? > Using Windows. Use the locking function in the msvcrt module to lock/unlock the file.

Re: fastest way to find the intersection of n lists of sets

2007-04-29 Thread John Nagle
James Stroud wrote: > Prateek wrote: > >> I have 3 variable length lists of sets. I need to find the common >> elements in each list (across sets) really really quickly. >> >> Here is some sample code: >> >> # Doesn't make sense to union the sets - we're going to do >> intersections later anyway >

Launching an independent Python program in a cross-platform way (including mac)

2007-04-29 Thread André
I would like to find out how I can launch an independent Python program from existing one in a cross-platform way. The result I am after is that a new terminal window should open (for io independent of the original script). The following seems to work correctly under Ubuntu and Windows ... but I

Re: fastest way to find the intersection of n lists of sets

2007-04-29 Thread Prateek
> For the above example, it's worth sorting lists_of_sets by the > length of the sets, and doing the short ones first. Thanks. I thought so - I'm doing just that using a simple Decorate- Sort-Undecorate idiom. > How big are the sets? If they're small, but you have a lot of > them, you

Re: http pipelining

2007-04-29 Thread John J. Lee
Steve Holden <[EMAIL PROTECTED]> writes: > [EMAIL PROTECTED] wrote: > > Which python module is capable of pipelining http requests? > > (I know httplib can send mulitple requests per tcp connection, but in > > a strictly serial way. ) > > > Oops, sorry, you meant sending requests in parallel, rig

Re: I can't inherit from "compiled" classes ?

2007-04-29 Thread Gabriel Genellina
En Sun, 29 Apr 2007 17:27:59 -0300, Maxim Veksler <[EMAIL PROTECTED]> escribió: > On 4/29/07, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: >> > """ > from socket import socket > import select > > class PollingSocket(socket): >pass > """ > >> `select.select()` is a function: > > I unde

Re: Launching an independent Python program in a cross-platform way (including mac)

2007-04-29 Thread André
On Apr 29, 8:32 pm, André <[EMAIL PROTECTED]> wrote: > I would like to find out how I can launch an independent Python > program from existing one in a cross-platform way. The result I am > after is that a new terminal window should open (for io independent of > the original script). > > The follo

Re: fastest way to find the intersection of n lists of sets

2007-04-29 Thread Prateek
On Apr 30, 3:48 am, James Stroud <[EMAIL PROTECTED]> wrote: > Prateek wrote: > > I have 3 variable length lists of sets. I need to find the common > > elements in each list (across sets) really really quickly. > > > Here is some sample code: > > > # Doesn't make sense to union the sets - we're goin

Re: Launching an independent Python program in a cross-platform way (including mac)

2007-04-29 Thread Prateek
On Apr 30, 4:32 am, André <[EMAIL PROTECTED]> wrote: > I would like to find out how I can launch an independent Python > program from existing one in a cross-platform way. The result I am > after is that a new terminal window should open (for io independent of > the original script). > > The follo

Re: fastest way to find the intersection of n lists of sets

2007-04-29 Thread John Nagle
Prateek wrote: >> For the above example, it's worth sorting lists_of_sets by the >>length of the sets, and doing the short ones first. > > > Thanks. I thought so - I'm doing just that using a simple Decorate- > Sort-Undecorate idiom. > > >> How big are the sets? If they're small, but y

Re: Numbers and truth values

2007-04-29 Thread Alex Martelli
Beliavsky <[EMAIL PROTECTED]> wrote: ... > > If this has changed in the Fortran 1990 standard or later, then I can > > only say I'm happy I stopped using Fortran heavily before such standards > > became widespread in commonly available compilers -- by the late '90s, > > when I was still using _

Re: Free Windows Vista Download

2007-04-29 Thread Alvin Bruney [MVP]
That's a misleading post, you should indicate that this is an evaluation copy. -- Regards, Alvin Bruney -- Shameless author plug Excel Services for .NET is coming... OWC Black book on Amazon and www.lulu.com/owc Professional VSTO 2005 - Wrox/Wi

Re: SEO - Search Engine Optimization - Seo Consulting

2007-04-29 Thread Alvin Bruney [MVP]
>Top posting Did not. I replied to the message at the bottom of the thread. >Call yourself an MVP, that's a joke Slick. Yup, I do call myself an MVP, it's not a joke either. -- Regards, Alvin Bruney -- Shameless author plug Excel Services for .

Re: relative import broken?

2007-04-29 Thread Alex Martelli
Alan Isaac <[EMAIL PROTECTED]> wrote: > "Alex Martelli" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > If you're running test1.py as your main module, then it's not part of a > > package, so the relative import should indeed fail as you mention. > > So if I understand you, > i

Re: SEO - Search Engine Optimization - Seo Consulting

2007-04-29 Thread Sherm Pendley
"Alvin Bruney [MVP]" writes: >>Top posting > Did not. I replied to the message at the bottom of the thread. Congratulations, you've now made a fool of yourself in public. Top posting has nothing to do with where your reply is placed with respect to other messages. Top posting is when you add yo

Re: Any Good tools to create CSV Files?

2007-04-29 Thread John Machin
On 30/04/2007 6:29 AM, Aahz wrote: > In article <[EMAIL PROTECTED]>, > Carsten Haese <[EMAIL PROTECTED]> wrote: >> On Sat, 2007-04-28 at 18:55 -0700, johnny wrote: >>> Any Good tools to create CSV Files? ReportLab only creates pdf >>> files. I need something to create CSV files. >> You mean some

Re: fastest way to find the intersection of n lists of sets

2007-04-29 Thread Prateek
On Apr 30, 5:08 am, John Nagle <[EMAIL PROTECTED]> wrote: > Prateek wrote: > >> For the above example, it's worth sorting lists_of_sets by the > >>length of the sets, and doing the short ones first. > > > Thanks. I thought so - I'm doing just that using a simple Decorate- > > Sort-Undecorate id

Get Mac OS X google Desktop 5 Free

2007-04-29 Thread Leisure . 208
http://macosxdesktop.blogspot.com/ - Mac OS X now compatible with google desktop 5. -- http://mail.python.org/mailman/listinfo/python-list

Re: help in debugging file.seek, file.read

2007-04-29 Thread Prateek
On Apr 30, 3:20 am, Prateek <[EMAIL PROTECTED]> wrote: > Sorry, I forgot to mention - the RTH line only prints when the time > taken is > 0.1 second (so that I don't pollute the output with other > calls that complete normally) I have some more information on this problem. Turns out the issue is w

Re: SEO - Search Engine Optimization - Seo Consulting

2007-04-29 Thread Juan T. Llibre
re: !>>>Top posting !>> Did not. I replied to the message at the bottom of the thread. !> Congratulations, you've now made a fool of yourself in public. OK, cut it out. Top or bottom posting is a user choice. No need to flame someone for using either. Juan T. Llibre, asp.net MVP asp.net faq :

Stopping pythoncom.PumpMessages in a windows service

2007-04-29 Thread Gheorghe Postelnicu
Hi, I am trying to create a windows service that will process some keyboard events. For that, i am trying to use pyHook and pythoncom, which work great in a stand-alone application. However, when in a service, the first problem I encounter is that the SvcStop part doesn't seem to be responding. An

Re: fastest way to find the intersection of n lists of sets

2007-04-29 Thread Paul Rubin
Prateek <[EMAIL PROTECTED]> writes: > The big set does stay around for a while - I've implemented an LRU > based caching algorithm on the code that does the I/O. Since the db is > transactioned, I keep one copy in the current transaction cache (which > is a simple dictionary) and one in the main re

Re: Counting

2007-04-29 Thread Andy
I pretty doubt about this - "c = line.count(k)" I might wanna recheck on that. - I think it would be obvious how to write this: for i,line in enumerate(linelist): line = line.split() for k in line: if keyword.iskeyword(k): c = line.count(k)

Re: Counting

2007-04-29 Thread Andy
James - I pretty doubt about this - "c = line.count(k)" You might wanna recheck on that. I think it would be obvious how to write this: for i,line in enumerate(linelist): line = line.split() for k in line: if keyword.iskeyword(k):

Re: fastest way to find the intersection of n lists of sets

2007-04-29 Thread Alex Martelli
Prateek <[EMAIL PROTECTED]> wrote: > > For the above example, it's worth sorting lists_of_sets by the > > length of the sets, and doing the short ones first. > > Thanks. I thought so - I'm doing just that using a simple Decorate- > Sort-Undecorate idiom. Use, instead, the DSU that is now bu

Beginner question on threads

2007-04-29 Thread Teresa Hardy
I have successfully made the threading work on a Window XP machine with quad processors but now I am trying to pass some variables around and am fighting with Lock() I have searched through several different documents and forums, some of which hint at problems with threading on Windows machines s

Re: While we're talking about annoyances

2007-04-29 Thread Alex Martelli
Arnaud Delobelle <[EMAIL PROTECTED]> wrote: ... > > >> decorated.sort() ... > > def index(sequence): > > return sorted(range(len(sequence)), key=sequence.__getitem__) ... > But really these two versions of rank are slower than the original one > (as sorting a list is O(nlogn) wher

  1   2   >