Re: Regexp problem, which pattern to use in split

2004-12-14 Thread Fredrik Lundh
Hans Almåsbakk wrote: Is there a relatively hassle-free way to get the csv module working with 2.1? The server is running Debian stable/woody, and it also seemed 2.2 can coexist with 2.1, when I checked the distro packages, if that is any help. 2.3 and 2.4 can also coexist with 2.1 (use make

Re: while 1 vs while True

2004-12-14 Thread Steve Holden
Fredrik Lundh wrote: Steve Holden wrote: It was unfortunate that so many people chose to use that for compatibility, when if they'd used the same code that the win32all extensions did they could have retained backward compatibility even across a change to constants: try: True except

Re: Emailing in Python

2004-12-14 Thread Fredrik Lundh
Philippe Reynolds wrote: I'm learning python...one of my tasks is to send out emails... I can send emails to one person at a time but not as groups Do you think you can help. Cheers Philippe Reynolds Here is the section of code: # me == the sender's email address me = '[EMAIL

Re: Help need with converting Hex string to IEEE format float

2004-12-14 Thread Fredrik Lundh
Max M wrote: Oh, programmers loves this kind stuff. You should get tons of answers. data = '80 00 00 00' import Image v = Image.fromstring(F, (1, 1), data, hex, F;32BF).getpixel((0, 0)) /F -- http://mail.python.org/mailman/listinfo/python-list

Re: gather information from various files efficiently

2004-12-14 Thread Simon Brunning
On Tue, 14 Dec 2004 10:40:56 -0500, Peter Hansen [EMAIL PROTECTED] wrote: Keith Dart wrote: Sigh, this reminds me of a discussion I had at my work once... It seems to write optimal Python code one must understand various probabilites of your data, and code according to the likely scenario.

Re: Python IDE

2004-12-14 Thread Alex Stapleton
Chris wrote: What IDE's do y'all recommend for Python? I'm using PythonWin atm, but I'd like something with more functionality. Chris Oh god we're all going to die. But er, ActiveState Komodo is quite nice IIRC (can't use it anymore as all my coding is commercial and I don't need it enough to

Re: Python IDE

2004-12-14 Thread Fuzzyman
If you're willing to pay for one, Komodo is very good. Especially for projects. Regards, Fuzzy http://www.voidspace.org.uk/atlantibots/pythonutils.html -- http://mail.python.org/mailman/listinfo/python-list

Re: Python IDE

2004-12-14 Thread Chris
What IDE's do y'all recommend for Python? I'm using PythonWin atm, but I'd like something with more functionality. Oh god we're all going to die. -chuckle- Hopefully I don't start off a full fledged war.-grin- But er, ActiveState Komodo is quite nice IIRC (can't use it anymore as all my coding

Re: Python 3.0

2004-12-14 Thread Chris
Okay, color me stupid, but what is everyone referencing when they mention Python 3.0? I didn't see any mention of it on the Python site. http://www.python.org/peps/pep-3000.html (which happens to be the first hit if you search for python 3.0 in the search box on python.org...) Okay, I feel dumb

Re: Html or Pdf to Rtf (Linux) with Python

2004-12-14 Thread Cameron Laird
In article [EMAIL PROTECTED], Axel Straschil [EMAIL PROTECTED] wrote: Hello! Sorry Cameron, I was replying, now my folloup ;-): Are you trying to convert one document in particular, or automate the process of conveting arbitrary HTML documents? I have an small CMS System where the customer

Python IDE

2004-12-14 Thread Chris
What IDE's do y'all recommend for Python? I'm using PythonWin atm, but I'd like something with more functionality. Chris -- http://mail.python.org/mailman/listinfo/python-list

Re: RegEx: find all occurances of a single character in a string

2004-12-14 Thread P
Franz Steinhaeusler wrote: given a string: st=abcdatraataza ^ ^ ^ ^ (these should be found) I want to get the positions of all single 'a' characters. (Without another 'a' neighbour) So I tried: r=re.compile('[^a]a([^a]') but this applies only for the a's, which has neighbours. So I

Re: Python IDE

2004-12-14 Thread Alex Stapleton
Why didn't you like Eclipse? Was it that the Python modules were bad, or just Eclipse in general? I use it for my Java developement and haven't had any problems with it. Just the python stuff really, I've used it for some java stuff and know plenty of people that do every day and they all

Re: do you master list comprehensions?

2004-12-14 Thread Fredrik Lundh
Steven Bethard wrote: python -m timeit -s data = [range(10) for _ in range(1000)] sum(data, []) 10 loops, best of 3: 54.2 msec per loop python -m timeit -s data = [range(10) for _ in range(1000)] [w for d in data for w in d] 100 loops, best of 3: 1.75 msec per loop The sum function

Re: do you master list comprehensions?

2004-12-14 Thread Steven Bethard
Timothy Babytch wrote: Will Stuyvesant wrote: data = [['foo','bar','baz'],['my','your'],['holy','grail']] sum(data, []) ['foo', 'bar', 'baz', 'my', 'your', 'holy', 'grail'] The second parameter passed to sum is just to overrride default initial value zero. It's worth keeping in mind that this

Re: lies about OOP

2004-12-14 Thread beliavsky
A paper finding that OOP can lead to more buggy software is at http://www.leshatton.org/IEEE_Soft_98a.html Les Hatton Does OO sync with the way we think?, IEEE Software, 15(3), p.46-54 This paper argues from real data that OO based systems written in C++ appear to increase the cost of fixing

Re: subprocess vs. proctools

2004-12-14 Thread Keith Dart
Donn Cave wrote: Keith Dart [EMAIL PROTECTED] wrote: | if exitstatus: | print good result (errorlevel of zero) | else: | print exitstatus # prints message with exit value This is indeed how the shell works, though the actual failure value is rarely of any interest. It's also in a more

Re: python gui

2004-12-14 Thread Jeff Shannon
zhao wrote: python 2.4 is released, but the gui package wxpython now is only for 2.3, how long can it can released for 2.4? This has been asked numerous times on the wxPython list in recent weeks. :) Robin Dunn is reportedly working now on updating his build environment and scripts to use

Re: lies about OOP

2004-12-14 Thread Paul McGuire
Steve Holden [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Paul McGuire wrote: Jive [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] snip But by '86, the Joy of OOP was widely known. Widely known? Errr? In 1986, object-oriented programming was barely

Re: Python 3.0

2004-12-14 Thread Fredrik Lundh
Chris [EMAIL PROTECTED] wrote: Okay, color me stupid, but what is everyone referencing when they mention Python 3.0? I didn't see any mention of it on the Python site. http://www.python.org/peps/pep-3000.html (which happens to be the first hit if you search for python 3.0 in the search

Re: pyparsing and 'keywords'

2004-12-14 Thread Berteun Damman
On Tue, 14 Dec 2004 18:39:19 GMT, Paul McGuire [EMAIL PROTECTED] wrote: If I try however to parse the String if test; testagain; fi;, it does not work, because the fi is interpreted as an expr, not as the end of the if statement, and of course, adding another fi doesn't solve this either. The

Re: pyparsing and 'keywords'

2004-12-14 Thread Paul McGuire
Berteun Damman [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hello, I'm having some problems with pyparsing, I could not find how to tell it to view certain words as keywords, i.e. not as a possible variable name (in an elegant way), for example, I have this little grammar:

Re: lies about OOP

2004-12-14 Thread Steve Holden
Paul McGuire wrote: Steve Holden [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] [some stuff] Good points all. And yes, I recall the BYTE article on Smalltalk. I guess I was just reacting mostly to the OP's statement that by '86 the Joy of OOP was widely known. He didn't say OOP all

Re: lies about OOP

2004-12-14 Thread Steve Holden
Paul McGuire wrote: Steve Holden [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] [some stuff] Good points all. And yes, I recall the BYTE article on Smalltalk. I guess I was just reacting mostly to the OP's statement that by '86 the Joy of OOP was widely known. He didn't say OOP all

Re: PyQt on MAC OS X

2004-12-14 Thread whamoo
dMichael McGarry [EMAIL PROTECTED] wrote: You must use pythonw for graphics application =) So launch the script with pythonw instead of python ;-) Thanks using pythonw did the trick. I appreciate everyone's help. ;-) Happy programming with your mac and python -- Whamoo www.rknet.it

Re: Python 3.0

2004-12-14 Thread Edward C. Jones
Chris wrote: Okay, color me stupid, but what is everyone referencing when they mention Python 3.0? I didn't see any mention of it on the Python site. http://www.python.org/peps/pep-3000.html (which happens to be the first hit if you search for python 3.0 in the search box on python.org...)

Re: Python 3.0

2004-12-14 Thread Fredrik Lundh
Edward C. Jones wrote: You are not dumb. Many search phrases are obvious if and only if you have already seen them. or typed them, in this case (did you read the subject before posting? ;-) /F -- http://mail.python.org/mailman/listinfo/python-list

Re: Automate Python-2.4 Installs on Windows

2004-12-14 Thread Michel Claveau - abstraction méta-galactique non triviale en fuite perpétuelle.
+1 Michel Claveau -- http://mail.python.org/mailman/listinfo/python-list

Re: PEP 338: Executing modules inside packages with '-m'

2004-12-14 Thread Martin Bless
[Nick Coghlan [EMAIL PROTECTED]] Python 2.4's -m command line switch only works for modules directly on sys.path. On my Windows machine this command line switch really makes my life so much easier. I appreciate -m very much. Going further as proposed in PEP 338 sounds good to me. One thing I

Re: Looking for a coder to do some work

2004-12-14 Thread Brad Clements
Sounds like a generic html based information kiosk. Anyone can do this pretty easily using embedded IE or Mozilla ActiveX control wrapped up in Venster. Just run an internal http server in another thread.. I've done this for desktop apps. Though, full-screen windows I haven't tried, but should be

Re: PythonWin Not Updating

2004-12-14 Thread It's me
It works fine here. -- It's me Chris [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I'm working on a program in PythonWin. The problem I'm running into is that after I make a code change, PythonWin doesn't always see it. Has anyone else had this problem? Chris --

RE: need some help quickly

2004-12-14 Thread Delaney, Timothy C (Timothy)
Allan Irvine wrote: Hope you can help - any thoughts welcome Here is the best place you can get help for your problem: http://www.catb.org/~esr/faqs/smart-questions.html Tim Delaney -- http://mail.python.org/mailman/listinfo/python-list

Archiving directory without external tools?

2004-12-14 Thread iamlevis3
Does Python have any internal facility for creating recursive archives of a directory? I'd like to avoid reliance on extenal tools (winzip,tar,etc). Thanks! -- http://mail.python.org/mailman/listinfo/python-list

Re: lies about OOP

2004-12-14 Thread Tomas Christiansen
projecktzero wrote: A co-worker considers himself old school in that he hasn't seen the light of OOP ... He thinks that OOP has more overhead and is slower than programs written the procedural way. He may be right, but consider the alternatives. Think of an integer. An integer is an object!

Re: Python IDE

2004-12-14 Thread Tomas
Fuzzyman [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] If you're willing to pay for one, Komodo is very good. Especially for projects. I would recomend Wing IDE over Komodo. My experience is that Wing IDE has far better code completion. And the Source Assistant feature of the

Re: Archiving directory without external tools?

2004-12-14 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: Does Python have any internal facility for creating recursive archives of a directory? I'd like to avoid reliance on extenal tools (winzip,tar,etc). import os, sys, zipfile directory = sys.argv[1] zip = zipfile. ZipFile(directory + .zip, w) for path, dirs, files

Re: How do I convert characters into integers?

2004-12-14 Thread Grant Edwards
On 2004-12-14, Markus Zeindl [EMAIL PROTECTED] wrote: I want to write a simple encrypter, but I've got a problem: How can I convert characters into integers? $ python Python 2.3.4 (#2, Aug 19 2004, 15:49:40) [GCC 3.4.1 (Mandrakelinux (Alpha 3.4.1-3mdk)] on linux2 Type help, copyright, credits

Re: How do I convert characters into integers?

2004-12-14 Thread Paul Rubin
Markus Zeindl [EMAIL PROTECTED] writes: Now I get every character with a loop: code buffer = for i in range(len(message)): ch = message[i-1:i] You mean ch = message[i] what you have does the wrong thing when i = 0. Here is the problem. I got a string with one character and I want

Re: New versions breaking extensions, etc.

2004-12-14 Thread Martin v. Löwis
Jive wrote: But it makes no difference, no? The problem is that both Python.exe and the extensions are *compiled* to link with a *particular* crt. No, that is not (really) the case. They are compiled to link with msvcrt.lib, which could, at link time, then become msvcrt.dll, msvcrt40.dll, or

Re: lies about OOP

2004-12-14 Thread Martijn Faassen
[EMAIL PROTECTED] wrote: A paper finding that OOP can lead to more buggy software is at http://www.leshatton.org/IEEE_Soft_98a.html [snip description of paper that compares C++ versus Pascal or C] What papers have scientific evidence for OOP? That's of course a good question. I'm sure also that

Re: lies about OOP

2004-12-14 Thread Paul McGuire
Roy Smith [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I think the real reason Python is a better teaching language for teaching OO concepts is because it just gives you the real core of OO: inheritence, encapsulation, and association of functions with the data they act on. C++

Re: Automate Python-2.4 Installs on Windows

2004-12-14 Thread Fredrik Lundh
Martin v. Löwis wrote: which might be great if you know how things work, but is bloody confusing if you don't. most importantly, how do you set properties? How do you know they are called properties?-) I would have thought that Additional parameters can be passed at the end of this command

Re: New versions breaking extensions, etc.

2004-12-14 Thread Jive
Robin Becker [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Cameron Laird wrote: There was no rational reason for me to upgrade to VC 7.x, but now I'm forced to by my preferred language. -- Robin Becker That's the way I feel about it too. Actually, I'm getting pushed toward

effbot ElementTree question

2004-12-14 Thread dayzman
Hi, Is anyone here familiar with ElementTree by effbot? With htmlbodyhello/body/html how is hello stored in the element tree? Which node is it under? Similarly, with: foo a href = blah blah /a bar, how is bar stored? Which node is it in? Cheers, Ming --

Re: Performance (pystone) of python 2.4 lower then python 2.3 ???

2004-12-14 Thread Dan
Lucas Hofman wrote: A 7% speed DECREASE??? According to the documentation it should be a 5% increase? I also see an 8-10% speed decrease in 2.4 (I built) from 2.3.3 (shipped w/Fedora2) in the program I'm writing (best of 3 trials each). Memory use seems to be about the same. 2.4: real

Re: lies about OOP

2004-12-14 Thread Mike Meyer
[EMAIL PROTECTED] [EMAIL PROTECTED] writes: Instead of copy and paste, I use functions for code reuse. I didn't see the light of OOP, yet. I use Python but never did anything with OOP. I just can't see what can be done with OOP taht can't be done with standart procedural programing. There

logging in omniORB for python

2004-12-14 Thread Birgit Rahm
Hello newsgroup, I work with omniORB for python and I what to log the calls, does anyone in this group know how I can do this? I use the command to initialize the ORB ORB = CORBA.ORB_init(sys.argv + [-ORBtraceLevel, 40], CORBA.ORB_ID) but I dont get a log file or a message in pythonwin output

Re: Regular Expression

2004-12-14 Thread Binu K S
You can do this without regular expressions if you like uptime='12:12:05 up 21 days, 16:31, 10 users, load average: 0.01, 0.02, 0.04' load = uptime[uptime.find('load average:'):] load 'load average: 0.01, 0.02, 0.04' load = load.split(':') load ['load average', ' 0.01, 0.02, 0.04']

Re: Regular Expression

2004-12-14 Thread Keith Dart
Michael McGarry wrote: Hi, I am horrible with Regular Expressions, can anyone recommend a book on it? Also I am trying to parse the following string to extract the number after load average. load average: 0.04, 0.02, 0.01 how can I extract this number with RE or otherwise? This particular

Re: Regular Expression

2004-12-14 Thread Michael McGarry
Binu K S wrote: You can do this without regular expressions if you like uptime='12:12:05 up 21 days, 16:31, 10 users, load average: 0.01, 0.02, 0.04' load = uptime[uptime.find('load average:'):] load 'load average: 0.01, 0.02, 0.04' load = load.split(':') load ['load average', ' 0.01, 0.02,

Regular Expression

2004-12-14 Thread Michael McGarry
Hi, I am horrible with Regular Expressions, can anyone recommend a book on it? Also I am trying to parse the following string to extract the number after load average. load average: 0.04, 0.02, 0.01 how can I extract this number with RE or otherwise? Michael --

Re: effbot ElementTree question

2004-12-14 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: Is anyone here familiar with ElementTree by effbot? With htmlbodyhello/body/html how is hello stored in the element tree? Which node is it under? Similarly, with: foo a href = blah blah /a bar, how is bar stored? Which node is it in? reposting the reply I just

Re: Iteration within re.sub()?

2004-12-14 Thread Mark McEahern
Bryant Huang wrote: Hi, Is it possible to perform iteration within the re.sub() function call? Sure. As the docs note: If repl is a function, it is called for every non-overlapping occurrence of pattern. The function takes a single match object argument, and returns the replacement string.

[OT] Re: [Boa Constr] new open source project developing with Boa Constructor

2004-12-14 Thread Stephen Waterbury
Stephen Waterbury wrote: sosman wrote: Just letting people know, I have launched a homebrew software package that is being developed with boa. http://sourceforge.net/projects/brewsta/ So, give us a hint ... does it make beer or what? :) Oops! Sorry gang. Sent my wise-ass reply to the wrong

Re: do you master list comprehensions?

2004-12-14 Thread Jeremy Bowers
On Tue, 14 Dec 2004 00:41:36 +0100, Max M wrote: Fredrik Lundh wrote: Max M wrote: I tried funnies like [[w for w in L] for L in data], That is absolutely correct. It's not a funnie at all. well, syntactically correct or not, it doesn't do what he want... Doh! *I* might not be used

Re: looking for blocking on read of a real file (not socket or pipe)

2004-12-14 Thread Peter Hansen
Steven wrote: I'm seeking a read method that will block until new data is available. Is there such a python function that does that? It may be relevant which platform(s) are of interest. Linux? Mac? Windows? All? The more cross-platform this needs to be, the less likely it exists... --

Re: lies about OOP

2004-12-14 Thread Timo Virkkala
projecktzero wrote: A co-worker considers himself old school in that he hasn't seen the light of OOP.(It might be because he's in love with Perl...but that's another story.) He thinks that OOP has more overhead and is slower than programs written the procedural way. I poked around google, but I

Re: lies about OOP

2004-12-14 Thread Paul McGuire
Jive [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] snip But by '86, the Joy of OOP was widely known. Widely known? Errr? In 1986, object-oriented programming was barely marketing-speak. Computing hardware in the mid-80's just wasn't up to the task of dealing with OO memory and

Re: Iteration within re.sub()?

2004-12-14 Thread Fredrik Lundh
Bryant Huang wrote: Ah beautiful, thank you both, Robert and Mark, for your instant and helpful responses. I understand, so the basic idea is to keep a variable that is globally accessible and call an external function to increment that variable... accessible for the callback function, that

Re: Performance (pystone) of python 2.4 lower then python 2.3 ???

2004-12-14 Thread Lucas Hofman
Istvan Albert ialbert at mailblocks.com writes: Lucas Hofman wrote: Anyone who understands what is going on? It is difficult to measure a speedup that might be well within your measurement error. Run the same pystone benchmark repeatedly and see what variation you get. Istvan.

Re: how do I peek into the next line?

2004-12-14 Thread Peter Hansen
[EMAIL PROTECTED] wrote: suppose I am reading lines from a file or stdin. I want to just peek in to the next line, and if it starts with a special character I want to break out of a for loop, other wise I want to do readline(). [snip example] Neither your description above nor your example

Re: PEP 338: Executing modules inside packages with '-m'

2004-12-14 Thread Just
In article [EMAIL PROTECTED], Fredrik Lundh [EMAIL PROTECTED] wrote: Nick Coghlan wrote: $ python -c import foo.bar arg This doesn't work. Any code protected by if __name__ == '__main__': won't run in this context (since 'foo.bar' is being imported as a module, not run as a

Re: lies about OOP

2004-12-14 Thread Jive
projecktzero [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I know this might not be the correct group to post this, but I thought I'd start here. A co-worker considers himself old school in that he hasn't seen the light of OOP. Just how old *is* his school? I saw the light in

Re: Python mascot proposal

2004-12-14 Thread Lenard Lindstrom
Steven Bethard [EMAIL PROTECTED] writes: Lenard Lindstrom wrote: Steven Bethard [EMAIL PROTECTED] writes: Brian Beck wrote: http://exogen.cwru.edu/python2.png Oooh, I like this one. Very cool! Its visually stunning. But under Windows gears show up in the DLL and batch file

Re: [dictionary] how to get key by item

2004-12-14 Thread Roy Smith
In article [EMAIL PROTECTED], Skip Montanaro [EMAIL PROTECTED] wrote: Egor i know how to get item by key ... Egor but i wonder how to get key by item Assuming your dictionary defines a one-to-one mapping, just invert it: forward = {10 : 50, 2 : 12, 4 : 43} reverse

how can I import a module without using pythonpath?

2004-12-14 Thread Phd
Hi, I'm using python 2.2, I want to import a module by referring to its relative location. The reason for this is that there is another module with the same name that's already in pythonpath( not my decision, but I got to work around it, bummer). So is there any easy way to do it? something

Re: Redirecting ./configure --prefix

2004-12-14 Thread Mark Asbach
Hi Dan, LD_LIBRARY_PATH=/some/private/dir/lib; export LD_LIBRARY_PATH LD_LIBRARY_PATH does the trick, and sys.path seems okay by default. Thanks! If you are the admin of the machine and python is not the only package installed in a non-standard directory, then editing the /etc/ld.so.conf

Re: lies about OOP

2004-12-14 Thread Alan Morgan
In article [EMAIL PROTECTED], projecktzero [EMAIL PROTECTED] wrote: I know this might not be the correct group to post this, but I thought I'd start here. A co-worker considers himself old school in that he hasn't seen the light of OOP.(It might be because he's in love with Perl...but that's

Re: how can I import a module without using pythonpath?

2004-12-14 Thread Phd
Nice, thanks so much! Doug Holton wrote: Phd wrote: Hi, I'm using python 2.2, I want to import a module by referring to its relative location. The reason for this is that there is another module with the same name that's already in pythonpath( not my decision, but I got to work around it,

Re: [dictionary] how to get key by item

2004-12-14 Thread Roy Smith
Delaney, Timothy C (Timothy) [EMAIL PROTECTED] wrote: Python will do what you tell it. Certainly it does. The problem is that sometimes what I told it to do and what I think I told it to do are two different things :-) Using Python 2.4, the above can be rewritten as a generator expression:

Re: Namespaces and the timeit module

2004-12-14 Thread David M. Cooke
Roy Smith [EMAIL PROTECTED] writes: I'm playing with the timeit module, and can't figure out how to time a function call. I tried: def foo (): x = 4 return x t = timeit.Timer (foo()) print t.timeit() and quickly figured out that the environment the timed code runs under is

RE: [dictionary] how to get key by item

2004-12-14 Thread Skip Montanaro
Tim Python will do what you tell it. In the above case, it will build a Tim list. Whoops, yeah. I called .iteritems() then forgot to use a generator expression... Skip -- http://mail.python.org/mailman/listinfo/python-list

re: A problem with list

2004-12-14 Thread Tim Henderson
Hi There are many different ways to solve the problem that you are having. The easiest if you are planning on only dealing with strings or a predictable data structure would be to do something like this: Code: ~~ #Pre: Pass in a

Re: from string to raw string

2004-12-14 Thread Dan Perl
Yeah, you're right. I got it all twisted in my mind. It's late and I must be getting tired. Thanks. Dan Brian Beck [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Dan Perl wrote: Is there a way to convert a regular string to a raw string so that one could get from '\bblah' to

Redirecting ./configure --prefix

2004-12-14 Thread Dan
I suspect this isn't specifically a Python question, but I encountered it with Python so I thought I'd ask here. I'm running Linux (Fedora 2), and just downloaded the Python 2.4 kit. I did the following from my user account: ./configure --prefix=/some/private/dir --enable-shared make

Re: looking for blocking on read of a real file (not socket or pipe)

2004-12-14 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: I doubt that the recipe you recomended will work at all in the case of different processes. To do this right file has to be open in shared mode (by both programs). Python does not support shared access. In the case of one program, but different threads probably this

RE: xsdb does XML, SQL is dead as disco :) (oops)

2004-12-14 Thread aaronwmail-usenet
Some people pointed out that bighunks of my HUGE ZIP file contained junk that could be regenerated. Thanks! It's now much smaller. Sorry for the screw up. -- Aaron Watters I wrote: xsdb does XML, SQL is dead as disco :) The xsdbXML framework provides a flexible and well defined

Re: looking for blocking on read of a real file (not socket or pipe)

2004-12-14 Thread elbertlev
I doubt that the recipe you recomended will work at all in the case of different processes. To do this right file has to be open in shared mode (by both programs). Python does not support shared access. In the case of one program, but different threads probably this will work. --

Re: Namespaces and the timeit module

2004-12-14 Thread Roy Smith
[EMAIL PROTECTED] (David M. Cooke) wrote: It seems kind of surprising that I can't time functions. Am I just not seeing something obvious? Like the documentation for Timer? :-) class Timer([stmt='pass' [, setup='pass' [, timer=timer function]]]) You can't use statements defined

Re: New versions breaking extensions, etc.

2004-12-14 Thread Jive
Martin v. Löwis [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] It's not hard-coded in the linker, but hard-coded in the import library. So if you link with msvcrt.lib (which might not be the precise name of the import library - I cannot look up the precise name right now),

Re: New versions breaking extensions, etc.

2004-12-14 Thread Robin Becker
Cameron Laird wrote: . . Part of the trick is that it demands deep understanding to detect the antisynergies that arise from the interac- tions of the DLL, registry, and filesystem schemes. I know it was only this year that I realized the whole

Re: Performance (pystone) of python 2.4 lower then python 2.3 ???

2004-12-14 Thread Mark Asbach
Hi Lucas, On a dual Xeon 3.0 Ghz: [...] Which shows a decrease in performance. Could this have anything to do with the fact that is is a dual processor box? Maybe. But my 3Gh P4/HT is also detected as a dual processor machine (Kernel 2.6), so it might be a general problem with the Xeon?

RE: Python mascot proposal

2004-12-14 Thread Doran_Dermot
Here are my suggestions: 1. A larch (nice play on early Java) 2. Shoebox in middle o' road! (totally meaningless) 3. A Python sitting in a comfy chair (indicating ease-of-use) 4. A larch All very Pythonic and non-controversial (unless you're a member of the Prevention of Cruelty to Shoeboxes

Re: uptime for Win XP?

2004-12-14 Thread Andrey Ivanov
Writting this script was harder than I initially thought due to a lack of documentation for win32all. And I still don't know what that bizzare_int value stands for (an error/status code?). [Fredrik Lundh] if I'm not mistaken, the corresponding Win32 function is called

Re: Python mascot proposal

2004-12-14 Thread Keith Dart
Dimitri Tcaciuc wrote: Yup, I was aware of the fact of Monty Python roots of the language name. However, you will probably agree that a snake is more associative. Plus, if to use some characteristic MP feature like a giant foot, I'm not positive that it won't trigger any copyright issues. I

Re: gather information from various files efficiently

2004-12-14 Thread Fernando Perez
Keith Dart wrote: Aye... the dict.keys() line creates a temporary list, and then the 'in' does a linear search of the list. Better would be: try: dict[a].append(b) except KeyError: dict[a] = [b] since you expect the key to be there most of the time, this method is most

Re: Why are tuples immutable?

2004-12-14 Thread Gerrit
Another tuple/list question. Fredrik Lundh wrote: http://www.python.org/doc/faq/general.html#why-are-there-separate-tuple-and-list-data-types Apart from historical, compatibility reasons, why is foo %s bar %s % [2, 4] illegal? I could imagine that anything accepting numerical values for

Re: lies about OOP

2004-12-14 Thread Miki Tebeka
Hello projecktzero, A co-worker considers himself old school in that he hasn't seen the light of OOP.(It might be because he's in love with Perl...but that's another story.) He thinks that OOP has more overhead and is slower than programs written the procedural way. I poked around google, but

Re: from string to raw string

2004-12-14 Thread chris . lyon
Dan Perl wrote: Yeah, you're right. I got it all twisted in my mind. It's late and I must be getting tired. Perl Twisted in the same thread, that should fool the search engines :D -- http://mail.python.org/mailman/listinfo/python-list

Re: while 1 vs while True

2004-12-14 Thread Paul Rubin
Nick Coghlan [EMAIL PROTECTED] writes: Until this code: . import pdb . pdb.True = 0 . pdb.x = Darn writeable module dictionaries . from pdb import True . True 0 . from pdb import x . x 'Darn writeable module dictionaries' If Python really does behave that way, that bug should be fixed

Re: lies about OOP

2004-12-14 Thread Peter Hansen
[EMAIL PROTECTED] wrote: I just can't see what can be done with OOP taht can't be done with standart procedural programing. Well, there's absolutely nothing you can do with OOP that can't be done with standard procedural programming (SPP). But that's hardly the point. After all, anything you can

RE: Python mascot proposal

2004-12-14 Thread EP
[EMAIL PROTECTED] wrote: Here are my suggestions: ... 4. A larch ... Anybody know what a larch looks like? Right! Well, some rather good pictures of the Larch on this website (my, stunning, the larch looks, eh?!)

Re: PIL and format conversions -- Noobie.

2004-12-14 Thread Fredrik Lundh
Ron Phillips wrote: I have a monster jpg (128 mb) that comprises a handful of colors (20 or so, max). It should never have been compressed with jpeg compression, as I understand it. It should have been a png or gif, since they are made to handle blocks of a few colors. if you compress an

Re: Html or Pdf to Rtf (Linux) with Python

2004-12-14 Thread Cameron Laird
In article [EMAIL PROTECTED], Alexander Straschil [EMAIL PROTECTED] wrote: Hello! I have to convert an HTML document to rtf with python, was just googling for an hour and did find nothing ;-( Has anybody an Idea how to convert (under Linux) an HTML or Pdf Document to Rtf? Thanks, AXEL Are you

Re: from string to raw string

2004-12-14 Thread TZOTZIOY
On 14 Dec 2004 05:11:07 -0800, rumours say that [EMAIL PROTECTED] might have written: Dan Perl wrote: Yeah, you're right. I got it all twisted in my mind. It's late and I must be getting tired. Perl Twisted in the same thread, that should fool the search engines :D Now, if only Sam Ruby

Re: Html or Pdf to Rtf (Linux) with Python

2004-12-14 Thread Axel Straschil
Hello! Sorry Cameron, I was replying, now my folloup ;-): Are you trying to convert one document in particular, or automate the process of conveting arbitrary HTML documents? I have an small CMS System where the customer has the posibility to view certain Html-Pages as Pdf, the CMS ist Python

Python 3.0

2004-12-14 Thread Chris
Okay, color me stupid, but what is everyone referencing when they mention Python 3.0? I didn't see any mention of it on the Python site. Chris -- http://mail.python.org/mailman/listinfo/python-list

RE: Python IDE

2004-12-14 Thread Doran_Dermot
If you want to spend the $35 I can recommend WingIDE. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Chris Sent: 14 December 2004 16:37 To: [EMAIL PROTECTED] Subject: Python IDE What IDE's do y'all recommend for Python? I'm using PythonWin atm, but

pyparsing and 'keywords'

2004-12-14 Thread Berteun Damman
Hello, I'm having some problems with pyparsing, I could not find how to tell it to view certain words as keywords, i.e. not as a possible variable name (in an elegant way), for example, I have this little grammar: terminator = Literal(;) expr = Word(alphas) body = Forward(); ifstat = if + body +

ANN: Python Test Environment

2004-12-14 Thread Fuzzyman
Well sort of... More a request for comments really - to see if anyone is interested in this. http://www.voidspace.org.uk/atlantibots/pythonutils.html#testenv I've created a script that will build a 'test environment'. Windoze(tm) only as it uses py2exe. It scans your Python\Lib folder and

  1   2   >