Re: MD5 module Pythonicity

2005-10-15 Thread Paul Rubin
"Fredrik Lundh" <[EMAIL PROTECTED]> writes: > > Forcing every digest module to add code to cater for just one of many > > use cases is most likely a waste of time. > here's the hash API specification, btw: > http://www.python.org/peps/pep-0247.html I agree with you and Mike that a file checksu

Re: Microsoft Hatred FAQ

2005-10-15 Thread Mike Meyer
"Jeroen Wenting" writes: >>>Q: Microsoft's Operating System is used over 90% of PCs. If that's >>>not monopoly, i don't know what is. >> They got where they are by CHEATING. That is why they are evil, not >> because they have a large market share. > no, they got their by clever marketing and

Re: Microsoft Hatred FAQ

2005-10-15 Thread George Sakkis
Keith Thompson wrote: > "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes: > > Hm... What does this have to do with Perl? > > > > Why did you post this in comp.lang.perl.misc? > > He posted this in comp.lang.python, comp.lang.perl.misc, > comp.unix.programmer, comp.lang.java.programmer, *and* > comp.

Re: Microsoft Hatred FAQ

2005-10-15 Thread John Bokma
"Jeroen Wenting" wrote: > no, they got their by clever marketing and generally having a product > that was easier to use for the average user than anything the > competition made and a lot more powerful than other products created > for their main target market. I agree with the first part of yo

Re: MS Word Outline -> reStructuredText script?

2005-10-15 Thread Franz GEIGER
Jim wrote: > Hi, > > I'm using reStructuredText as a format for some group documentation, > and often my co-workers take notes during meetings in Word's outline > mode. Does anyone already have a python script that will convert from > Word (or the Open Office file format version of a word docume

Re: Microsoft Hatred FAQ

2005-10-15 Thread Michael Heiming
In comp.os.linux.misc Peter T. Breuer <[EMAIL PROTECTED]>: > In comp.os.linux.misc Jeroen Wenting > wrote: >> Without Microsoft 90% of us would never have seen a computer more powerful >> than a ZX-81 and 90% of the rest of us would never have used only dumb >> mainframe terminals. > Uh - when

Re: MD5 module Pythonicity

2005-10-15 Thread Leandro Lameiro
Hi Fredrik (and other too). First of all, thanks for taking your time to help me. On 10/15/05, Fredrik Lundh <[EMAIL PROTECTED]> wrote: > Leandro Lameiro wrote: > > > What's wrong in having a function like the one I said, that would > > split files for you, feed md5.update and, when it is over, re

Re: Problem splitting a string

2005-10-15 Thread Steven D'Aprano
On Fri, 14 Oct 2005 21:52:07 -0700, Anthony Liu wrote: > I have this simple string: > > mystr = 'this_NP is_VL funny_JJ' > > I want to split it and give me a list as > > ['this', 'NP', 'is', 'VL', 'funny', 'JJ'] > I think the documentation does say that the > separator/delimiter can be a strin

Re: Microsoft Hatred FAQ

2005-10-15 Thread Roy Schestowitz
__/ [Xah Lee] yelled on Saturday 15 October 2005 03:01 \__ > Microsoft Hatred, FAQ > > [The world is actually round] Hmmm... 3 year-old 1-pager... PageRank 5. I sure hope it's not a troll, as some other responders suggested, because I cited that site in my blog several hours ago. Remove? leav

Re: Microsoft Hatred FAQ

2005-10-15 Thread Martin P. Hellwig
Jeroen Wenting wrote: > > Without Microsoft 90% of us would never have seen a computer more powerful > than a ZX-81 and 90% of the rest of us would never have used only dumb > mainframe terminals. At the time you "PC" guys where hacking around monochrome green and a bit lighter green screens

Re: Problem splitting a string

2005-10-15 Thread Paul Rubin
Anthony Liu <[EMAIL PROTECTED]> writes: > I do I split the string by using both ' ' and '_' as > the delimiters at once? Use re.split. -- http://mail.python.org/mailman/listinfo/python-list

Re: MD5 module Pythonicity

2005-10-15 Thread Paul Rubin
Leandro Lameiro <[EMAIL PROTECTED]> writes: > Maybe I've got a distorted impression about the importance of this. As > I'm not an experienced programmer, I'd probably trust more in your > impressions than mine. :) Good call. :) > I mean, if we all agreed that it is a common thing, a patch for thi

Re: Let My Terminal Go

2005-10-15 Thread Jorgen Grahn
On 13 Oct 2005 09:54:44 -0700, Paul Rubin wrote: > Jorgen Grahn <[EMAIL PROTECTED]> writes: >> It depends on what you mean by expensive -- web servers can fork for each >> HTTP request they get, in real-world scenarios, and get away with it. > > This is OS dependent. Forking on Windows is much mo

Re: Yes, this is a python question, and a serious one at that (moving to Win XP)

2005-10-15 Thread Jorgen Grahn
On Fri, 14 Oct 2005 12:37:25 +0200, Christophe <[EMAIL PROTECTED]> wrote: > Kenneth McDonald a écrit : >> For unfortunate reasons, I'm considering switching back to Win XP (from >> OS X) as my "main" system. Windows has so many annoyances that I can ... >> Yes, I know that Cygwin is out there,

Re: Problem splitting a string

2005-10-15 Thread Alex Martelli
Steven D'Aprano <[EMAIL PROTECTED]> wrote: ... > You can *almost* do that as a one-liner: No 'almost' about it... > L2 = [item.split('_') for item in mystr.split()] > > except that gives a list like this: > > [['this', 'NP'], ['is', 'VL'], ['funny', 'JJ']] > > which needs flattening.

Re: Problem splitting a string

2005-10-15 Thread Alex Martelli
Mike Meyer <[EMAIL PROTECTED]> wrote: ... > A third alternative is to split once, then split the substrings a > second time and stitch the results back together: > > >>> sum([x.split('_') for x in mystr.split()], []) > ['this', 'NP', 'is', 'VL', 'funny', 'JJ'] > > Which is probably slow. To ba

Re: Microsoft Hatred FAQ

2005-10-15 Thread Steven D'Aprano
I was going to sit this one out, as being obvious flame-bait, but Jeroen's post appears to be reasonable, and yet so utterly wrong that it needs to be responded to. On Sat, 15 Oct 2005 07:52:57 +0200, Jeroen Wenting wrote: >>>Q: Microsoft's Operating System is used over 90% of PCs. If that's

Re: Problem splitting a string

2005-10-15 Thread Steven D'Aprano
On Sat, 15 Oct 2005 10:51:41 +0200, Alex Martelli wrote: > Steven D'Aprano <[EMAIL PROTECTED]> wrote: >... >> You can *almost* do that as a one-liner: > > No 'almost' about it... > >> L2 = [item.split('_') for item in mystr.split()] >> >> except that gives a list like this: >> >> [['this',

Re: PyGame & Web hosts

2005-10-15 Thread SPE - Stani's Python Editor
Blender provided a web plugin with which you can program games in 3D (of course also in 2D) with Python. Unfortunately it is not actively supported anymore, but it still works. I think you can still use the old version. Download the plugin here: http://www.blender3d.org/cms/3D_web_plug-in.15.0.htm

Re: UI toolkits for Python

2005-10-15 Thread Malte Clasen
Claudio Grondi wrote: > What is that complex, that it can't be solved using an Internet Browser as a > GUI? Nothing, but session management isn't trivial with http interfaces. You have to deal with the back button of the browsers, bookmarks to pages that result from posted forms, users leaving t

Re: Problem splitting a string

2005-10-15 Thread SPE - Stani's Python Editor
Use re.split, as this is the fastest and cleanest way. However, iff you have to split a lot of strings, the best is: import re delimiters = re.compile('_| ') def split(x): return delimiters.split(x) >>> split('this_NP is_VL funny_JJ') ['this', 'NP', 'is', 'VL', 'funny', 'JJ'] Stani -- SPE - S

Re: Problem splitting a string

2005-10-15 Thread Fredrik Lundh
"SPE - Stani's Python Editor" wrote: > Use re.split, as this is the fastest and cleanest way. > However, iff you have to split a lot of strings, the best is: > > import re > delimiters = re.compile('_| ') > > def split(x): > return delimiters.split(x) or, shorter: import re split = re.

how to improve simple python shell script (to compile list of files)

2005-10-15 Thread Jari Aalto
[Keep CC, thank you] Please suggest comments how can I make this script to work from bash. Also how can I skip better the [0] argument from command line without hte extra variable i? #!/bin/bash function compile () { python -c ' import os, sys, py_compile; i

Re: how to improve simple python shell script (to compile list of files)

2005-10-15 Thread Fredrik Lundh
Jari Aalto wrote: > Please suggest comments how can I make this script to work > from bash. replace it with a call to the compileall module? $ python -mcompileall [directory...] ? $ python -mcompileall -h option -h not recognized usage: python compileall.py [-l] [-f] [-q] [-d d

Re: how to improve simple python shell script (to compile list of files)

2005-10-15 Thread Maarten van Reeuwijk
Jari Aalto wrote: > > [Keep CC, thank you] > > Please suggest comments how can I make this script to work > from bash. Also how can I skip better the [0] argument from > command line without hte extra variable i? Didn't check, but something like this? #!/bin/python import os, sys, py_compile;

Re: Comparing lists

2005-10-15 Thread Steven D'Aprano
On Sat, 15 Oct 2005 06:31:53 +0200, Christian Stapfer wrote: > "jon" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] >> >> To take the heat out of the discussion: >> >> sets are blazingly fast. > > I'd prefer a (however) rough characterization > of computational complexity in terms

Re: How to get a raised exception from other thread

2005-10-15 Thread dcrespo
Thanks for your answer, but I think that created thread in python should create a thread either on windows and linux. Can you give me Python example of how to do what I want to do? Thanks -- http://mail.python.org/mailman/listinfo/python-list

Re: Best way to handle cgi sessions

2005-10-15 Thread Derek Perriero
Christoph, I really appreciate the effort.  I've been searching for something of this magnitude for awhile.  See, I would normally use CGI::Session for the equivalent in Perl.  That is what I am trying to achieve.  I'll give that script a go and see what I can come up with.  Luckily, the data I

re:p2exe using wine/cxoffice

2005-10-15 Thread paniq
the problem you have comes from a badly wrapped imagehlp. i could solve it by starting winecfg (distributed with recent wine releases) and adding imagehlp as native,builtin. of course you need a native dll to get this working. -- http://mail.python.org/mailman/listinfo/python-list

New to Python: my impression v. Perl/Ruby

2005-10-15 Thread Stan Krajewski
Very interesting. I too am deciding between the three languages. I find Python to be the easiest to use. By far.    I find the forced indentation in Python a blessing in disguise.   It seems Python is making in-roads into the progarmming community.   With Ruby, its back to idiosyncratic and

Re: Help with creating a dict from list and range

2005-10-15 Thread Scott David Daniels
James Stroud wrote: > On Friday 14 October 2005 08:37, Steve Holden wrote: >> >>> dct = dict((x[1], x[0]) for x in enumerate(description)) To make the code a breath more obvious: >>> dct = dict((name, seq) for seq, name in enumerate(description)) has the same results. >> >>> dct >> >>{'second': 1

Re: MS Word Outline -> reStructuredText script?

2005-10-15 Thread Aahz
In article <[EMAIL PROTECTED]>, Jim <[EMAIL PROTECTED]> wrote: > >David Mertz has an article that shows reSt -> DocBook, I just need to >do the opposite. Note that this is tricky because reST has fewer features/capabilities than DocBook. More to the point, reST simply isn't designed to be machine

Re: Problem splitting a string

2005-10-15 Thread Kent Johnson
Alex Martelli wrote: > Using sum on lists is DEFINITELY slow -- avoid it like the plague. > > If you have a list of lists LOL, DON'T use sum(LOL, []), but rather > > [x for x in y for y in LOL] Should be >>> lol = [[1,2],[3,4]] >>> [x for y in lol for x in y] [1, 2, 3, 4] The outer loop comes

Re: [ANN] XPN 0.5.5 released

2005-10-15 Thread Nemesis
Mentre io pensavo ad una intro simpatica "Cousin Stanley" scriveva: [Upgrading XPN to 0.5.5 ...] [...] > files > > o custom_headers.txt > o groups_list > o server_logs.dat I'd add also config.txt ;-) > No initial configuration, downloading newsrc file, > or re-sub

Re: Overloading & Overriden

2005-10-15 Thread Scott David Daniels
Fredrik Lundh wrote: > "Iyer, Prasad C" wrote: >>...This message contains information that may be privileged or confidential >>and is the property of the Capgemini Group. It is intended only for the >>person to whom it is addressed. If you are not the intended recipient, >>you are not authorized

Re: Microsoft Hatred FAQ

2005-10-15 Thread Drazen Gemic
I find this article very much off topic. Send that to some advocacy group, please. DG -- http://mail.python.org/mailman/listinfo/python-list

Re: Microsoft Hatred FAQ

2005-10-15 Thread Rhino
"Jeroen Wenting" wrote in message news:[EMAIL PROTECTED] > > >> > >>Q: Microsoft's Operating System is used over 90% of PCs. If that's > >>not monopoly, i don't know what is. > > > > They got where they are by CHEATING. That is why they are evil, not > > because they have a large market sha

Re: Problem splitting a string

2005-10-15 Thread Kent Johnson
Steven D'Aprano wrote: > On Sat, 15 Oct 2005 10:51:41 +0200, Alex Martelli wrote: >>[ x for x in y.split('_') for y in z.split(' ') ] > > py> mystr = 'this_NP is_VL funny_JJ' > py> [x for x in y.split('_') for y in mystr.split(' ')] > Traceback (most recent call last): > File "", line 1, in ? >

Re: [ANN] XPN 0.5.5 released

2005-10-15 Thread Cousin Stanley
> I'd add also config.txt ;-) I did but failed to include it in the list I posted One small config problem that I haven't figured out how to deal with I use a dark background with white foreground text When posting a reply in the compose/edit window th

Re: Yes, this is a python question, and a serious one at that (moving to Win XP)

2005-10-15 Thread Ivan Shevanski
On 10/14/05, Peter Hansen <[EMAIL PROTECTED]> wrote: Christian Stapfer wrote:> 0.0. ... and add an item to your SendTo folder that allows> you to have Windows Explorer open a terminal window with its> current directory set to the currently displayed folder > (= "Open terminal here").Or install the

Re: XML dom question

2005-10-15 Thread George
Yes but I cannot get the if statement to work to compare the two or the replaceChild portion to work. Could someone help me with that. -- http://mail.python.org/mailman/listinfo/python-list

Re: Accessing Parallel Port in Python Error : Priviledged Instruction

2005-10-15 Thread Peter Hansen
[EMAIL PROTECTED] wrote: > When I use Pyparallel to access the parallel port in WinXP with Python > I get an error saying that this is a priviledged instruction > > Any clue ? Here's a clue: please always cut and paste the *entire actual* traceback when you report a Python error. If it's not a

Re: Microsoft Hatred FAQ

2005-10-15 Thread John Wingate
Peter T. Breuer <[EMAIL PROTECTED]> wrote: > In comp.os.linux.misc Jeroen Wenting > wrote: >> Without Microsoft 90% of us would never have seen a computer more powerful >> than a ZX-81 and 90% of the rest of us would never have used only dumb >> mainframe terminals. > > Uh - when microsoft pro

Re: How to get a raised exception from other thread

2005-10-15 Thread Peter Hansen
dcrespo wrote: > How can I get a raised exception from other thread that is in an > imported module? Define what "get" means for your purposes. It appears that you mean you want to catch the exception, but in the thread which launched the other thread in the first place. If that's true, please

Re: Comparing lists

2005-10-15 Thread Christian Stapfer
"Steven D'Aprano" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Sat, 15 Oct 2005 06:31:53 +0200, Christian Stapfer wrote: > >> "jon" <[EMAIL PROTECTED]> wrote in message >> news:[EMAIL PROTECTED] >>> >>> To take the heat out of the discussion: >>> >>> sets are blazingly fast. >>

Re: Microsoft Hatred FAQ

2005-10-15 Thread Real Gagnon
> I'd be VERY surprised if IBM predicted that there would be only 5 > COMPUTERS in *2000* - perhaps you mean 5 *manufacturers* of computers? > - unless the prediction was made a VERY long time ago. I think you are > giving a badly-mangled version of something I saw when I worked at > IBM. "I thin

Re: how to improve simple python shell script (to compile list of files)

2005-10-15 Thread Jari Aalto
"Fredrik Lundh" <[EMAIL PROTECTED]> writes: > Jari Aalto wrote: > | > Please suggest comments how can I make this script to work | > from bash. > > replace it with a call to the compileall module? > > $ python -mcompileall [directory...] Thanks, but that will not work. The files are gathered

Re: Microsoft Hatred FAQ

2005-10-15 Thread Rhino
"Real Gagnon" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > I'd be VERY surprised if IBM predicted that there would be only 5 > > COMPUTERS in *2000* - perhaps you mean 5 *manufacturers* of computers? > > - unless the prediction was made a VERY long time ago. I think you are > >

Re: Here I am again, same old arguments

2005-10-15 Thread Tim Roberts
Steven D'Aprano <[EMAIL PROTECTED]> wrote: > >Global variables aren't *entirely* bad. I use them myself, sometimes for >constants (well, pseudo-constants -- Python doesn't enforce constants) and >short, quick 'n' dirty throw away code. > >But in general, as your code gets bigger and more complicate

Re: Perl-Python-a-Day: Sorting

2005-10-15 Thread Tim Roberts
Marcin 'Qrczak' Kowalczyk <[EMAIL PROTECTED]> wrote: >Abdulaziz Ghuloum <[EMAIL PROTECTED]> writes: > >> Python FAQs contain an entry to the schwartzian transform. >> >> http://www.python.org/doc/faq/programming.html#i-want-to-do-a-complicated-sort-can-you-do-a-schwartzian-transform-in-python > >T

Re: Microsoft Hatred FAQ

2005-10-15 Thread John Bokma
Michael Heiming <[EMAIL PROTECTED]> wrote: > The only thing positive about M$ entering the market, probably > due to their ineffective programming style they pushed Intel into > producing pretty fast while cheapo CPUs. Amazing, I thought Xah Lee was the only one able to fit so much BS in one sen

Re: UI toolkits for Python

2005-10-15 Thread Stefan Behnel
Kenneth McDonald schrieb: > Is there any emerging consensus on the "best" UI for toolkit. Tk never > quite made it but from what I can see, both qt and wxWin are both doing > fairly well in general. I'm already aware of the licensing issues > surrounding qt (fwiw, I think their license fee for

Re: UI toolkits for Python

2005-10-15 Thread Stefan Behnel
Kenneth McDonald wrote: > Is there any emerging consensus on the "best" UI for toolkit. Tk never > quite made it but from what I can see, both qt and wxWin are both doing > fairly well in general. I'm already aware of the licensing issues > surrounding qt (fwiw, I think their license fee for co

Re: Microsoft Hatred FAQ

2005-10-15 Thread Peter T. Breuer
In comp.os.linux.misc John Wingate <[EMAIL PROTECTED]> wrote: > Peter T. Breuer <[EMAIL PROTECTED]> wrote: >> In comp.os.linux.misc Jeroen Wenting >> wrote: >>> Without Microsoft 90% of us would never have seen a computer more powerful >>> than a ZX-81 and 90% of the rest of us would never have

Re: Microsoft Hatred FAQ

2005-10-15 Thread John Bokma
"Martin P. Hellwig" <[EMAIL PROTECTED]> wrote: > Jeroen Wenting wrote: > >> >> Without Microsoft 90% of us would never have seen a computer more >> powerful than a ZX-81 and 90% of the rest of us would never have used >> only dumb mainframe terminals. > > At the time you "PC" guys where hacking

Re: how to improve simple python shell script (to compile list of files)

2005-10-15 Thread Chris F.A. Johnson
On 2005-10-15, Jari Aalto wrote: > > [Keep CC, thank you] > > Please suggest comments how can I make this script to work > from bash. Also how can I skip better the [0] argument from > command line without hte extra variable i? > > #!/bin/bash > > function compile () > { > pyth

Re: Jargons of Info Tech industry

2005-10-15 Thread Branimir Maksimovic
"Roedy Green" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Tue, 11 Oct 2005 11:45:03 -0400, Mike Meyer <[EMAIL PROTECTED]> wrote > or quoted : > >>Jeff Poskanzer, now *he* has a spam problem. He gets a few million >>spams a day: http://www.acme.com/mail_filtering/ >. > > It is

Re: Perl-Python-a-Day: Sorting

2005-10-15 Thread Fredrik Lundh
Tim Roberts wrote: > >This entry is obsolete: it should mention the 'key' option of the > >standard sort method. > > It should mention it, but not necessarily recommend it. > > I haven't run the numbers in Python, but in Perl, the undecorated sort is > so well-optimized that the Schwartzian transf

Re: [ANN] XPN 0.5.5 released

2005-10-15 Thread Nemesis
Mentre io pensavo ad una intro simpatica "Cousin Stanley" scriveva: >> I'd add also config.txt ;-) > > I did but failed to include it in the list I posted yes of course. > One small config problem that I haven't figured out > how to deal with > > I use a dark background wi

Re: Microsoft Hatred FAQ

2005-10-15 Thread Michael Heiming
In comp.os.linux.misc John Bokma <[EMAIL PROTECTED]>: > Michael Heiming <[EMAIL PROTECTED]> wrote: >> The only thing positive about M$ entering the market, probably >> due to their ineffective programming style they pushed Intel into >> producing pretty fast while cheapo CPUs. > Amazing, I though

Re: how to improve simple python shell script (to compile list of files)

2005-10-15 Thread Jari Aalto
"Chris F.A. Johnson" <[EMAIL PROTECTED]> writes: > On 2005-10-15, Jari Aalto wrote: >Don't indent: > > function compile () > { > python -c ' > import os, sys, py_compile; > i = 0; > for arg in sys.argv: > file = os.path.basename(arg); > dir = os.path.dirname(arg); >

Re: Microsoft Hatred FAQ

2005-10-15 Thread Michael Heiming
In comp.os.linux.misc Peter T. Breuer <[EMAIL PROTECTED]>: > In comp.os.linux.misc John Wingate <[EMAIL PROTECTED]> wrote: >> Peter T. Breuer <[EMAIL PROTECTED]> wrote: >>> In comp.os.linux.misc Jeroen Wenting >>> wrote: [..] >> Sun Microsystems was incorporated (with four employees) in February

Re: Microsoft Hatred FAQ

2005-10-15 Thread John Bokma
Michael Heiming <[EMAIL PROTECTED]> wrote: > In comp.os.linux.misc John Bokma <[EMAIL PROTECTED]>: >> Michael Heiming <[EMAIL PROTECTED]> wrote: > >>> The only thing positive about M$ entering the market, probably >>> due to their ineffective programming style they pushed Intel into >>> producing

Re: how to improve simple python shell script (to compile list of files)

2005-10-15 Thread Robert Kern
Jari Aalto wrote: > Thanks, is there equivalent to this Perl statement in Python? > >@list = @ARGV[1 .. @ARGV]; > > or something similar so that I could avoid the 1 > 1 (sys.argv) check > altogether? for arg in sys.argv[1:]: ... -- Robert Kern [EMAIL PROTECTED] "In the fields of hell

Re: Comparing lists

2005-10-15 Thread Steven D'Aprano
On Sat, 15 Oct 2005 18:17:36 +0200, Christian Stapfer wrote: >>> I'd prefer a (however) rough characterization >>> of computational complexity in terms of Big-Oh >>> (or Big-whatever) *anytime* to marketing-type >>> characterizations like this one... >> >> Oh how naive. > > Why is it that even co

Re: Microsoft Hatred FAQ

2005-10-15 Thread Michael Heiming
In comp.os.linux.misc John Bokma <[EMAIL PROTECTED]>: > Michael Heiming <[EMAIL PROTECTED]> wrote: >> In comp.os.linux.misc John Bokma <[EMAIL PROTECTED]>: >>> Michael Heiming <[EMAIL PROTECTED]> wrote: >> The only thing positive about M$ entering the market, probably due to their ineff

Re: Microsoft Hatred FAQ

2005-10-15 Thread Martin P. Hellwig
John Bokma wrote: > You mean like the lamp that keeps burning forever, like Philips has? > No more like all the hydrogen technologies that shell has in their possession for the last decades and only recently has begun to restart those projects. >> Although Commodore where never serious compet

Re: how to improve simple python shell script (to compile list offiles)

2005-10-15 Thread Fredrik Lundh
Jari Aalto wrote: > Thanks, but that will not work. The files are gathered from discrete > places really? so what is that "find" command doing in your code ? compile $(find path/to -type f -name "*.py") seems to me as if python -mcompileall path/to would do exactly what your script d

Some set operators

2005-10-15 Thread bearophileHUGS
Sometimes I suggest to add things to the language (like adding some set methods to dicts), but I've seen that I tend to forget the meaning of six set/frozenset operators: s & t s &= t s | t s |= t s ^ t s ^= t My suggestion is to remove them, and keep them only as explicit non-operator version

Re: Some set operators

2005-10-15 Thread Alex Martelli
<[EMAIL PROTECTED]> wrote: > Sometimes I suggest to add things to the language (like adding some set > methods to dicts), but I've seen that I tend to forget the meaning of > six set/frozenset operators: > > s & t s &= t > s | t s |= t > s ^ t s ^= t > > My suggestion is to remove them, and k

Re: Some set operators

2005-10-15 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: > Sometimes I suggest to add things to the language (like adding some set > methods to dicts), but I've seen that I tend to forget the meaning of > six set/frozenset operators: > > s & t s &= t > s | t s |= t > s ^ t s ^= t > > My suggestion is to remove them, and keep

Re: Microsoft Hatred FAQ

2005-10-15 Thread Matt Garrish
"Michael Heiming" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > In comp.os.linux.misc John Bokma <[EMAIL PROTECTED]>: >> Michael Heiming <[EMAIL PROTECTED]> wrote: > >>> In comp.os.linux.misc John Bokma <[EMAIL PROTECTED]>: Michael Heiming <[EMAIL PROTECTED]> wrote: >>> >

Re: Microsoft Hatred FAQ

2005-10-15 Thread Michael Heiming
In comp.os.linux.misc Matt Garrish <[EMAIL PROTECTED]>: > "Michael Heiming" <[EMAIL PROTECTED]> wrote in message [..] >> Dunno what's so BS about the possibility that the wintel mafia >> works hand in hand, M$ introduces a new OS and Intel faster CPU. > Your presumption that poor coding has anyt

Queue question

2005-10-15 Thread spinner
- A two parter newbie question I am afraid. Am I right in thinking that using something like ... item = a_queue.get() print item will not print 'item' unless or until there is an item in the queue to retrieve. Effectively stalling the thread at the .

Re: Microsoft Hatred FAQ

2005-10-15 Thread John Bokma
Michael Heiming <[EMAIL PROTECTED]> wrote: > PLONK So you think you can make points by PLONKing people? Grow up and get a life. You can learn from listening. You'll learn nothing from ploinking. Oh, and I am not amazed, since people who claim utter BS is right, plonk people who don't agree.

Re: Microsoft Hatred FAQ

2005-10-15 Thread John Bokma
"Martin P. Hellwig" <[EMAIL PROTECTED]> wrote: > John Bokma wrote: > >> You mean like the lamp that keeps burning forever, like Philips has? > > No more like all the hydrogen technologies that shell has in their > possession for the last decades and only recently has begun to restart > those pr

tkinter drawing

2005-10-15 Thread Ron Adam
I want to be able to easily create reusable shapes in Tkinter and be able to use them in mid level dialogs. So after some experimenting I've managed to get something to work. The following does pretty much what I need, but I think it can be improved on. So could anyone take a look and let me

Re: Microsoft Hatred FAQ

2005-10-15 Thread Tim Roberts
"Jeroen Wenting" wrote: > >Microsoft isn't evil, they're not a monopoly either. >If they were a monopoly they'd have 100% of the market and there'd be no >other software manufacturers at all. This is wrong. The dictionary definition of a monopoly is when a manufacturer has all or nearly all of

Re: "no variable or argument declarations are necessary."

2005-10-15 Thread Bengt Richter
On Fri, 7 Oct 2005 21:56:12 -0700, [EMAIL PROTECTED] (Alex Martelli) wrote: >Antoon Pardon <[EMAIL PROTECTED]> wrote: > ... >> >> egold = 0: >> >> while egold < 10: >> >> if test(): >> >> ego1d = egold + 1 >> >> >> > >> > Oh come on. That is a completely contrived example, >> >>

Re: Python on the Power PC

2005-10-15 Thread mhykes
I'm using the same distribution (or at least that is what I started with). Try using the following sitecustomize.py file: ## sitecustomize.py ## import sys syspath = sys.path libpath = '\\Program Files\\Python\\Lib' syspath.append(libpath+'\\lib-tk') sys.path = none sys.path = syspath

Re: Microsoft Hatred FAQ

2005-10-15 Thread John Bokma
Tim Roberts <[EMAIL PROTECTED]> wrote: > Part of their behavior really escape me. The whole thing about > browser wars confuses me. Web browsers represent a zero billion > dollar a year market. Why would you risk anything to own it? Opera seems to be making money with it. Also, Firefox gets mo

Re: Microsoft Hatred FAQ

2005-10-15 Thread David Schwartz
"Mike Meyer" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > What you call "clever marketing" the DOJ calls "monopolistic > practices". The courts agreed with the DOJ. Having had several large > PC manufacturers refuse to sell me a system without some form of > Windows because MS m

Re: Microsoft Hatred FAQ

2005-10-15 Thread David Schwartz
"Tim Roberts" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Part of their behavior really escape me. The whole thing about browser > wars confuses me. Web browsers represent a zero billion dollar a year > market. Why would you risk anything to own it? It really isn't that

Re: Microsoft Hatred FAQ (TROLL DONT REPLY)

2005-10-15 Thread steve
TROLL -- http://mail.python.org/mailman/listinfo/python-list

Re: Microsoft Hatred FAQ

2005-10-15 Thread John Bokma
"David Schwartz" <[EMAIL PROTECTED]> wrote: > > "Tim Roberts" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > >> Part of their behavior really escape me. The whole thing about >> browser wars confuses me. Web browsers represent a zero billion >> dollar a year market. Why woul

Re: Microsoft Hatred FAQ

2005-10-15 Thread joe
John Bokma <[EMAIL PROTECTED]> writes: > "David Schwartz" <[EMAIL PROTECTED]> wrote: > > > > "Tim Roberts" <[EMAIL PROTECTED]> wrote in message > > news:[EMAIL PROTECTED] > > > >> Part of their behavior really escape me. The whole thing about > >> browser wars confuses me. Web browsers repres

Re: Microsoft Hatred FAQ

2005-10-15 Thread Matt Garrish
"Tim Roberts" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > "Jeroen Wenting" wrote: >> >>Microsoft isn't evil, they're not a monopoly either. >>If they were a monopoly they'd have 100% of the market and there'd be no >>other software manufacturers at all. > > This is wrong. The

Re: Jargons of Info Tech industry

2005-10-15 Thread Bengt Richter
On Tue, 04 Oct 2005 17:14:45 GMT, Roedy Green <[EMAIL PROTECTED]> wrote: >On Tue, 23 Aug 2005 08:32:09 -0500, l v <[EMAIL PROTECTED]> wrote or quoted : > >>I think e-mail should be text only. I think that is a useful base standard, which allows easy creation of ad-hoc tools to search and extract d

Re: Queue question

2005-10-15 Thread Steve M
According to my "Python in a Nutshell": q.get(block=True) is the signature, so, as you use it above, the call will hang until something is on the queue. If block is false and the queue is empty, q.get() will raise the exception Empty. q.get_nowait is apparently synonymous with q.get(block=False)

Re: When someone from Britain speaks, Americans hear a "British accent"...

2005-10-15 Thread Bengt Richter
On Fri, 7 Oct 2005 15:28:24 -0500, Terry Hancock <[EMAIL PROTECTED]> wrote: >On Friday 07 October 2005 03:01 am, Steve Holden wrote: >> OK, so how do you account for the execresence "That will give you a >> savings of 20%", which usage is common in America? > >In America, anyway, "savings" is a c

Re: Force flushing buffers

2005-10-15 Thread Bengt Richter
On Wed, 12 Oct 2005 15:55:10 -0400, Madhusudan Singh <[EMAIL PROTECTED]> wrote: >Robert Wierschke wrote: > >> Madhusudan Singh schrieb: >>> Hi >>> >>> I have a python application that writes a lot of data to a bunch >>> of files >>> from inside a loop. Sometimes, the application h

Re: Microsoft Hatred FAQ

2005-10-15 Thread David Schwartz
"John Bokma" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > "David Schwartz" <[EMAIL PROTECTED]> wrote: >> "Tim Roberts" <[EMAIL PROTECTED]> wrote in message >> news:[EMAIL PROTECTED] >>> Part of their behavior really escape me. The whole thing about >>> browser wars confuses m

Re: Some set operators

2005-10-15 Thread Giovanni Bajo
Alex Martelli <[EMAIL PROTECTED]> wrote: > I still vaguely hope that in 3.0, where backwards incompatibilities > can be introduced, Python may shed some rarely used operators such as > these (for all types, of course). I hope there is no serious plan to drop them. There is nothing wrong in havin

Re: Microsoft Hatred FAQ

2005-10-15 Thread Greymaus
Mike Meyer wrote: > You clearly weren't paying attention to what the rest > of the microcomputer industry was doing while Gates was selling IBM > non-existent software. While IBM was introducing 16-bit processors and > DOS was doing a flat file system, Tandy was selliig systems - for a > fraction o

Re: Microsoft Hatred FAQ

2005-10-15 Thread Måns Rullgård
"David Schwartz" <[EMAIL PROTECTED]> writes: > "Mike Meyer" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > >> What you call "clever marketing" the DOJ calls "monopolistic >> practices". The courts agreed with the DOJ. Having had several large >> PC manufacturers refuse to sell me

Re: Microsoft Hatred FAQ

2005-10-15 Thread John Bokma
[EMAIL PROTECTED] wrote: > John Bokma <[EMAIL PROTECTED]> writes: > >> "David Schwartz" <[EMAIL PROTECTED]> wrote: >> > >> > "Tim Roberts" <[EMAIL PROTECTED]> wrote in message >> > news:[EMAIL PROTECTED] >> > >> >> Part of their behavior really escape me. The whole thing about >> >> browser w

Re: When someone from Britain speaks, Americans hear a "British accent"...

2005-10-15 Thread Bengt Richter
On Sat, 08 Oct 2005 07:55:59 GMT, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote: >On Fri, 07 Oct 2005 21:24:35 +1000, Steven D'Aprano ><[EMAIL PROTECTED]> declaimed the following in >comp.lang.python: > >> I think where the people are getting confused is that it is (arguably) >> acceptable to use "t

Return Text from popen

2005-10-15 Thread Casey Bralla
I know this problem has a very simple answer, but I've checked the web and I don't understand the answers that I've found. How do I return text from a standard Linux command? For example: I want to read the stdout results of a typical linux command (such as "df") into a Python variable. I've tr

Re: Microsoft Hatred FAQ

2005-10-15 Thread John Bokma
"David Schwartz" <[EMAIL PROTECTED]> wrote: > > "John Bokma" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > >> "David Schwartz" <[EMAIL PROTECTED]> wrote: > >>> "Tim Roberts" <[EMAIL PROTECTED]> wrote in message >>> news:[EMAIL PROTECTED] > Part of their behavior really

Re: Microsoft Hatred FAQ

2005-10-15 Thread John Bokma
"Matt Garrish" <[EMAIL PROTECTED]> wrote: > > "Tim Roberts" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] >> "Jeroen Wenting" wrote: >>> >>>Microsoft isn't evil, they're not a monopoly either. >>>If they were a monopoly they'd have 100% of the market and there'd be >>>no other s

  1   2   >