Re: custom Tkinter ListBox selectMode

2005-07-03 Thread Eric Brunel
On Fri, 1 Jul 2005 20:19:20 -0400, Ron Provost <[EMAIL PROTECTED]> wrote: > Hello, > > I've written a simple GUI which contains a listbox to hold some information. > I've found that the click-selection schemes provided by Tkinter are > insufficient for my needs. Essentiall I need to impletement a

RE: Determining actual elapsed (wall-clock) time

2005-07-03 Thread Coates, Steve (ACHE)
> -Original Message- > From: Roy Smith [mailto:[EMAIL PROTECTED] > Sent: 02 July 2005 21:22 > To: python-list@python.org > Subject: Re: Determining actual elapsed (wall-clock) time > If you get the UTC time, daylight savings time doesn't enter > the equation. > If the system clock is r

Re: Folding in vim

2005-07-03 Thread Andrea Griffini
On Sun, 3 Jul 2005 22:42:17 -0500, Terry Hancock <[EMAIL PROTECTED]> wrote: >It seems to be that it isn't robust against files >with lots of mixed tabs and spaces. My suggestion is: - never ever use tabs; tabs were nice when they had a de-facto meaning (tabbing to next 8-space boundary) nowd

Re: Folding in vim

2005-07-03 Thread Ron Adam
Terry Hancock wrote: > On Saturday 02 July 2005 10:35 pm, Terry Hancock wrote: > >>I tried to load a couple of different scripts to >>automatically fold Python code in vim, but none of them >>seems to do a good job. >> >>I've tried: >>python_fold.vim by Jorrit Wiersma >>http://www.vim.org/sc

Host resolution problems with socket module

2005-07-03 Thread Jacob Lee
I'm getting a rather bizarre error while using the socket module. If I start out disconnected from the net and then connect while the program or interpreter session is open, I do not always gain the ability to resolve or connect to hosts by name. Here is the problematic scenario: >>> from socket

Embedding performance.

2005-07-03 Thread amit
Hello, Is there any kind of performance differences to the different ways of embedding python? PyEval_EvalCode() PyRun_SimpleFile() PyObject_CallObject() Thanks Amit -- http://mail.python.org/mailman/listinfo/python-list

Re: Favorite non-python language trick?

2005-07-03 Thread Devan L
Okay, maybe that was too restrictive, reduce can *usually* be replaced with sum. Sorry about that. -- http://mail.python.org/mailman/listinfo/python-list

Re: Proposal: reducing self.x=x; self.y=y; self.z=z boilerplate code

2005-07-03 Thread Bengt Richter
On Mon, 04 Jul 2005 02:50:07 GMT, [EMAIL PROTECTED] (Bengt Richter) wrote: >On Sun, 03 Jul 2005 22:07:30 GMT, Ron Adam <[EMAIL PROTECTED]> wrote: > >>Bengt Richter wrote: >> >> >>class foo(object): >> x = 1 >> y = 2 >> z = 3 >> def __init__(self,x=x,y=y,z=z): >> save_these

Re: What are the other options against Zope?

2005-07-03 Thread godwin
You understood my request correctly. I thank u for pointing me to cherrypy. -- http://mail.python.org/mailman/listinfo/python-list

Re: map/filter/reduce/lambda opinions and background unscientific mini-survey

2005-07-03 Thread Robert Kern
Erik Max Francis wrote: > Ron Adam wrote: > >>So you are saying that anything that has a 1% use case should be >>included as a builtin function? >> >>I think I can find a few hundred other functions in the library that are >>used more than ten times as often as reduce. Should those be builtins

Re: What are the other options against Zope?

2005-07-03 Thread godwin
Actually i want to create a "google" like web interface to any rdbms and search as we all do it in google.That would be great isn't it. Thank u for your queries. -- http://mail.python.org/mailman/listinfo/python-list

Re: map/filter/reduce/lambda opinions and background unscientific mini-survey

2005-07-03 Thread Steven D'Aprano
Mike Meyer wrote: > Steven D'Aprano <[EMAIL PROTECTED]> writes: > >>I don't object to adding sum and product to the language. I don't object >>to adding zip. I don't object to list comps. Functional, er, functions >>are a good thing. We should have more of them, not less. > > > Yes, but where s

Re: map/filter/reduce/lambda opinions and background unscientific mini-survey

2005-07-03 Thread Erik Max Francis
Ron Adam wrote: > So you are saying that anything that has a 1% use case should be > included as a builtin function? > > I think I can find a few hundred other functions in the library that are > used more than ten times as often as reduce. Should those be builtins too? > > This is a practica

Re: map/filter/reduce/lambda opinions and background unscientificmini-survey

2005-07-03 Thread Steven D'Aprano
Carl Banks wrote: > The shamelessness with which you inflated the verbosity of the latter > is hilarious. [snip] > [ x**2 + y**2 for (x,y) in izip(xlist,ylist) ] > > Now there's no longer much advantage in conciseness for the map version > (seeing that you'd have to define a function to pass to

Re: Folding in vim

2005-07-03 Thread Terry Hancock
On Saturday 02 July 2005 10:35 pm, Terry Hancock wrote: > I tried to load a couple of different scripts to > automatically fold Python code in vim, but none of them > seems to do a good job. > > I've tried: > python_fold.vim by Jorrit Wiersma > http://www.vim.org/scripts/script.php?script_id=

Re: math.nroot [was Re: A brief question.]

2005-07-03 Thread Steven D'Aprano
Tom Anderson wrote about NaNs: > > (Remember, a NaN is just an illusionary placeholder, not a number.) > > If you think it's illusionary, i invite you to inspect the contents of > my variables - i have a real, live NaN trapped in one of them! No you don't. You have a flag that says "This calcu

Re: map/filter/reduce/lambda opinions and background unscientific mini-survey

2005-07-03 Thread Ron Adam
Erik Max Francis wrote: > Ron Adam wrote: > >> Each item needs to stand on it's own. It's a much stronger argument >> for removing something because something else fulfills it's need and >> is easier or faster to use than just saying we need x because we have y. >> >> In this case sum and prod

Re: math.nroot [was Re: A brief question.]

2005-07-03 Thread Steven D'Aprano
James Dennett wrote: > > Yes: 5^2 + -2^2 is 29, however you write it. > > *If* you take -2 as a number, but not if you take the number > as 2 and the unary minus as an operator with lower precedence > than exponentiation. [snip] > Not in this respect. However, the question is whether that's >

Re: math.nroot [was Re: A brief question.]

2005-07-03 Thread Steven D'Aprano
George Sakkis wrote: > "Tom Anderson" <[EMAIL PROTECTED]> wrote: > > >>>But NaNs are _not_ things. >> >>I disagree. A NaN _is_ a thing; it's not a floating-point number, for >>sure, but it is a symbol which means "there is no answer", or "i don't >>know", and as such, it should follow the univers

Re: Proposal: reducing self.x=x; self.y=y; self.z=z boilerplate code

2005-07-03 Thread Bengt Richter
On Sun, 03 Jul 2005 22:07:30 GMT, Ron Adam <[EMAIL PROTECTED]> wrote: >Bengt Richter wrote: > >> What if parameter name syntax were expanded to allow dotted names as binding >> targets in the local scope for the argument or default values? E.g., >> >> def foometh(self, self.x=0, self.y=0): pa

Re: Assigning to None (was Re: Question about Python)

2005-07-03 Thread Bengt Richter
On Mon, 04 Jul 2005 09:11:19 +1000, Steven D'Aprano <[EMAIL PROTECTED]> wrote: >On Sun, 03 Jul 2005 19:19:05 +, Bengt Richter wrote: > >> On Sun, 03 Jul 2005 11:47:07 +1000, Steven D'Aprano <[EMAIL PROTECTED]> >> wrote: >> >>>On Fri, 01 Jul 2005 12:59:20 -0400, François Pinard wrote: >>> >>>

Re: map/filter/reduce/lambda opinions and background unscientific mini-survey

2005-07-03 Thread Erik Max Francis
Ron Adam wrote: > Each item needs to stand on it's own. It's a much stronger argument for > removing something because something else fulfills it's need and is > easier or faster to use than just saying we need x because we have y. > > In this case sum and product fulfill 90% (estimate of cour

Re: Escaping commas within parens in CSV parsing?

2005-07-03 Thread William Park
felciano <[EMAIL PROTECTED]> wrote: > Thanks for all the postings. I can't change delimiter in the source > itself, so I'm doing it temporarily just to handle the escaping: > > def splitWithEscapedCommasInParens(s, trim=False): > pat = re.compile(r"(.+?\([^\(\),]*?),(.+?\).*)") > w

Re: map/filter/reduce/lambda opinions and background unscientific mini-survey

2005-07-03 Thread Ron Adam
Steven D'Aprano wrote: > On Sun, 03 Jul 2005 19:31:02 +, Ron Adam wrote: > > >>First on removing reduce: >> >>1. There is no reason why reduce can't be put in a functional module > > > Don't disagree with that. > > >>or >>you can write the equivalent yourself. It's not that hard to do,

Re: looping over a big file

2005-07-03 Thread Peter Hansen
Michael Hoffman wrote: > Mike Meyer wrote: >> Guido has made a pronouncement on open vs. file. I think he prefers >> open for opening files, and file for type testing, but may well be >> wrong. I don't think it's critical. > > He has said that open() may be used for things other than files in the

Re: What are the other options against Zope?

2005-07-03 Thread Some Fred
On Sun, 03 Jul 2005 19:38:28 -0500, phil <[EMAIL PROTECTED]> wrote: >Anyway, thanks Terry, I still don't know what Zope is but I need to >accept that it's just a toolkit and I'm not gonna know until >I dig in and as long as my web needs are simple, I probably won't. Actually, I found playing with

Re: What are the other options against Zope?

2005-07-03 Thread phil
> I did already post a serious reply, but now I'm afraid I've been > trolled. :-P > I hope you did not think I was dissing your response, because I certainly was not and in fact recognized your response as a sincere effort to enlighten. To whomever I directed sarcasm I apologize. My frustrat

Re: map/filter/reduce/lambda opinions and background unscientific mini-survey

2005-07-03 Thread Erik Max Francis
Mike Meyer wrote: > I'd say that removing functions is a bad thing. On the other hand, I'd > say moving them from builtins to the standard library when Python has > functionality that covers most of the use cases for them is a good > thing. We all can pretty much guess that map, filter, and reduc

Re: looping over a big file

2005-07-03 Thread Michael Hoffman
Mike Meyer wrote: > Roy Smith <[EMAIL PROTECTED]> writes: > >>The "right" way to do this is: >> >>for line in file ("filename"): >> whatever >> >>The file object returned by file() acts as an iterator. Each time through >>the loop, another line is read and returned (I'm sure there is some >>b

FIBVORTEX MANAGED FOREX MINI ACCOUNT

2005-07-03 Thread Fibvortex
The Fibvortex is now offering Managed Mini Forex Accounts with NO Management Fee! Receive the same benefits as our regular managed account at a fraction of the price. You will designate the number of lots to be executed on your behalf for each trade. You will have 24 access to our Forex Chart Ro

Re: map/filter/reduce/lambda opinions and background unscientific mini-survey

2005-07-03 Thread Mike Meyer
Steven D'Aprano <[EMAIL PROTECTED]> writes: > I don't object to adding sum and product to the language. I don't object > to adding zip. I don't object to list comps. Functional, er, functions > are a good thing. We should have more of them, not less. Yes, but where should they go? Adding functions

Re: map/filter/reduce/lambda opinions and background unscientificmini-survey

2005-07-03 Thread Erik Max Francis
Christopher Subich wrote: > Interesting; could you post an example of this? Whenever I try to think > of that, I come up with unwieldly syntax for the functional case. In > purely functional code the results of map/filter/etc would probably be > directly used as arguments to other functions,

Re: Determining actual elapsed (wall-clock) time

2005-07-03 Thread Aahz
In article <[EMAIL PROTECTED]>, Peter Hansen <[EMAIL PROTECTED]> wrote: > >I would like to determine the "actual" elapsed time of an operation >which could take place during a time change, in a platform-independent >manner (at least across Linux/Windows machines). > >Using time.time() doesn't ap

Re: map/filter/reduce/lambda opinions and background unscientific mini-survey

2005-07-03 Thread Steven Bethard
Christopher Subich wrote: > One caevat that I just noticed, though -- with the for-solution, you do > need to be careful about whether you're using a generator or list if you > do not set an explicit initial value (and instead use the first value of > 'sequence' as the start). The difference is

Re: General questions about embedding Python.

2005-07-03 Thread George Sakkis
"amit" <[EMAIL PROTECTED]> wrote: > Hello, > > I am currently studying how to embedd python. I am developing a > graphical C++ application. My goal is to embedd python script that will > control some kind of animation. > I have some questions about python embedding: Others will probably answer y

Re: map/filter/reduce/lambda opinions and background unscientificmini-survey

2005-07-03 Thread Christopher Subich
Carl Banks wrote: > > Christopher Subich wrote: >>I've heard this said a couple times now -- how can listcomps not >>completely replace map and filter? > If you're doing heavy functional programming, listcomps are > tremendously unwieldy compared to map et al. Interesting; could you post an examp

Re: map/filter/reduce/lambda opinions and background unscientific mini-survey

2005-07-03 Thread Steven D'Aprano
On Sun, 03 Jul 2005 19:31:02 +, Ron Adam wrote: > First on removing reduce: > > 1. There is no reason why reduce can't be put in a functional module Don't disagree with that. > or > you can write the equivalent yourself. It's not that hard to do, so it > isn't that big of a deal to not

Jython from CVS

2005-07-03 Thread Sébastien Ramage
Somebody can help me to recompile Jython from the CVS file ? thank --- other question : No python browser plugins avaible? Seb -- http://mail.python.org/mailman/listinfo/python-list

Re: math.nroot [was Re: A brief question.]

2005-07-03 Thread George Sakkis
"Tom Anderson" <[EMAIL PROTECTED]> wrote: > > But NaNs are _not_ things. > > I disagree. A NaN _is_ a thing; it's not a floating-point number, for > sure, but it is a symbol which means "there is no answer", or "i don't > know", and as such, it should follow the universal rules which apply to > al

Re: Assigning to None (was Re: Question about Python)

2005-07-03 Thread Steven D'Aprano
On Sun, 03 Jul 2005 19:19:05 +, Bengt Richter wrote: > On Sun, 03 Jul 2005 11:47:07 +1000, Steven D'Aprano <[EMAIL PROTECTED]> wrote: > >>On Fri, 01 Jul 2005 12:59:20 -0400, François Pinard wrote: >> >>> [Peter Hansen] Mike Meyer wrote: > Yes. I once grabbed an old program that did

General questions about embedding Python.

2005-07-03 Thread amit
Hello, I am currently studying how to embedd python. I am developing a graphical C++ application. My goal is to embedd python script that will control some kind of animation. I have some questions about python embedding: 1) Is there a good text book or other resource on embedding/extending? (

Re: looping over a big file

2005-07-03 Thread Mike Meyer
Roy Smith <[EMAIL PROTECTED]> writes: > The "right" way to do this is: > > for line in file ("filename"): >whatever > > The file object returned by file() acts as an iterator. Each time through > the loop, another line is read and returned (I'm sure there is some > block-level buffering goin

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

2005-07-03 Thread Paul Boddie
Mike Holmans <[EMAIL PROTECTED]> wrote in message news:<[EMAIL PROTECTED]>... > Some of those sonorous slow talkers from the South, and majestic bass > African-Americans like James Earl Jones or Morgan Freeman, have far > more gravitas than any English accent can: to us, such people sound > monumen

Re: Thoughts on Guido's ITC audio interview

2005-07-03 Thread Paul Boddie
D H <[EMAIL PROTECTED]> wrote in message news:<[EMAIL PROTECTED]>... > Dave Benjamin wrote: > > Someone in the audience surprised everyone by mentioning an actual project > > attempting this, called javaclass: > > Sounds like it really is converting java classes to python classes, Yes, it is conv

Re: looping over a big file

2005-07-03 Thread Roy Smith
Jp Calderone <[EMAIL PROTECTED]> wrote: > Yes, but you need to do it like this: > > fileIter = iter(big_file) > for line in fileIter: > line_after = fileIter.next() That's better than the solution I posted. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python for everything?

2005-07-03 Thread Mike Meyer
Joseph Garvin <[EMAIL PROTECTED]> writes: > Mike Meyer wrote: > >>You wind up >>having to invoke the function through your data object, and then pass >>the data object in - sort of as an explicit "self". >> > Yeah, and us pythonists hate explicit self! ;) Except the explicit self is on the method

Re: Proposal: reducing self.x=x; self.y=y; self.z=z boilerplate code

2005-07-03 Thread Ron Adam
Bengt Richter wrote: > What if parameter name syntax were expanded to allow dotted names as binding > targets in the local scope for the argument or default values? E.g., > > def foometh(self, self.x=0, self.y=0): pass > > would have the same effect as > > def foometh(self, self.y=0, se

Re: Python concurrent tasking frameworks?

2005-07-03 Thread Michael Sparks
Chris Stiles wrote: > I was wondering if anyone had a list of the various (presuming more than > one) > Python tasking frameworks? I know of Twisted already, but I'm really > looking > for something along the lines of a task/thread pool type of arrangement. The Kamaelia framework might or might

Re: looping over a big file

2005-07-03 Thread Jp Calderone
On Sun, 3 Jul 2005 23:52:12 +0200, martian <[EMAIL PROTECTED]> wrote: >Hi, > >I've a couple of questions regarding the processing of a big text file >(16MB). > >1) how does python handle: > >> for line in big_file: > >is big_file all read into memory or one line is read at a time or a buffer >is us

Re: looping over a big file

2005-07-03 Thread Roy Smith
"martian" <[EMAIL PROTECTED]> wrote: > 1) how does python handle: > > > for line in big_file: > > is big_file all read into memory or one line is read at a time or a buffer > is used or ...? The "right" way to do this is: for line in file ("filename"): whatever The file object returned by f

looping over a big file

2005-07-03 Thread martian
Hi, I've a couple of questions regarding the processing of a big text file (16MB). 1) how does python handle: > for line in big_file: is big_file all read into memory or one line is read at a time or a buffer is used or ...? 2) is it possible to advance lines within the loop? The following doe

Re: map/filter/reduce/lambda opinions and backgroundunscientificmini-survey

2005-07-03 Thread Scott David Daniels
Jp Calderone wrote: > Suggesting people can "like it or lump it" is a disservice to everyone. However, when people start with "why is this so" and rather than listen for information, try to argue that they are right, that behavior is a disservice to the group. Preparing a cogent argument to convi

Re: Favorite non-python language trick?

2005-07-03 Thread Jp Calderone
On Sun, 03 Jul 2005 15:40:38 -0500, Rocco Moretti <[EMAIL PROTECTED]> wrote: >Jp Calderone wrote: >> On Fri, 01 Jul 2005 15:02:10 -0500, Rocco Moretti >> <[EMAIL PROTECTED]> wrote: >> >>> >>> I'm not aware of a language that allows it, but recently I've found >>> myself wanting the ability to trans

Re: What are the other options against Zope?

2005-07-03 Thread Peter Hansen
Florian Lindner wrote: >>>Peter Hansen wrote: [Zope] doesn't include database interfaces other than to its own ZODB. > > Ok, you're right. But I don't really think it makes a difference to install > them afterwards. Probably not, but until the OP sheds more light on what this "companies

Re: How do you program in Python?

2005-07-03 Thread Peter Hansen
James wrote: > Peter Hansen wrote: >>I edit in the Scite window, hit Alt-Tab (under Windows XP) to change >>focus to the cmd console (and instantly all my modified files are >>saved), press the Cursor Up key to retrieve the previous command (which >>is generally the name of my script, or a command

Re: map/filter/reduce/lambda opinions and background unscientificmini-survey

2005-07-03 Thread Carl Banks
Christopher Subich wrote: > Carl Banks wrote: > > > Listcomps et al. cannot do everything map, lambda, filter, and reduce > > did. Listcomps are inferior for functional programming. But, you see, > > functional is not the point. Streamlining procedural programs is the > > point, and I'd say li

Re: math.nroot [was Re: A brief question.]

2005-07-03 Thread Tim Peters
... [Tom Anderson] > So, is there a way of generating and testing for infinities and NaNs > that's portable across platforms and versions of python? Not that I know of, and certainly no simple way. > If not, could we perhaps have some constants in the math module for them? See PEP 754 for this.

Re: What are the other options against Zope?

2005-07-03 Thread Florian Lindner
Peter Hansen wrote: > Florian Lindner wrote: >> Peter Hansen wrote: >>>[Zope] doesn't include >>>database interfaces other than to its own ZODB. >> >> That's not correct. Zope2 includes DB interfaces to MySQL, PostGre, ODBC >> and many others. > > It actually *includes* them? I thought those we

Re: map/filter/reduce/lambda opinions and background unscientificmini-survey

2005-07-03 Thread Carl Banks
Steven D'Aprano wrote: > On Sun, 03 Jul 2005 08:14:28 -0700, Scott David Daniels wrote: > > > egbert wrote: > >> On Sat, Jul 02, 2005 at 08:26:31PM -0700, Devan L wrote: > >> > >>>Also, map is easily replaced. > >>>map(f1, sequence) == [f1(element) for element in sequence] > >> > >> How do you re

Re: Favorite non-python language trick?

2005-07-03 Thread Rocco Moretti
Jp Calderone wrote: > On Fri, 01 Jul 2005 15:02:10 -0500, Rocco Moretti > <[EMAIL PROTECTED]> wrote: > >> >> I'm not aware of a language that allows it, but recently I've found >> myself wanting the ability to transparently replace objects. > > > Smalltalk supports this with the "become" messa

Re: How do you program in Python?

2005-07-03 Thread Mike Meyer
anthonyberet <[EMAIL PROTECTED]> writes: > My question isn't as all-encompassing as the subject would suggest... > > I am almost a Python newbie, but I have discovered that I don't get > along with IDLE, as i can't work out how to run and rerun a routine > without undue messing about. > > What I w

Re: Python for everything?

2005-07-03 Thread Joseph Garvin
Mike Meyer wrote: >You wind up >having to invoke the function through your data object, and then pass >the data object in - sort of as an explicit "self". > > > Yeah, and us pythonists hate explicit self! ;) -- http://mail.python.org/mailman/listinfo/python-list

Re: Python for everything?

2005-07-03 Thread Joseph Garvin
Larry Bates wrote: >poorly. When new version of Python ships, you just learn what is new. >If you try to keep up with C, C++, Visual Basic, ... it gets to be >impossible. > >Hope information helps. > >Larry Bates > > > Huh? Part of C++'s problem is that it takes too long for obvious good stuff

Re: website catcher

2005-07-03 Thread Mike Meyer
"jwaixs" <[EMAIL PROTECTED]> writes: > If I should put the parsedwebsites in, for example, a tablehash it will > be at least 5 times faster than just putting it in a file that needs to > be stored on a slow harddrive. Memory is a lot faster than harddisk > space. And if there would be a lot of peo

Re: How do you program in Python?

2005-07-03 Thread Michael Linnemann
Am Sun, 03 Jul 2005 13:40:04 -0400 schrieb Peter Hansen: > I do all my work using Scite (a nice free editor that was built to > demonstrate the Scintilla plugin that can also be used in Python > programs through things like the StructuredTextControl in wxPython), > with the auto-save-on-loss-of

Re: Accepted Summer of Code proposals

2005-07-03 Thread Terry Reedy
"Peter Decker" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] >> Is it right that two Wax proposals were accepted? > > Or that Wax is being promoted over Dabo, which wraps wxPython just as > elegantly in its UI tier, and which is further along (more controls > supported) than Wax, i

Re: Python concurrent tasking frameworks?

2005-07-03 Thread George Sakkis
"Chris Stiles" <[EMAIL PROTECTED]> wrote: > Hi -- > > I was wondering if anyone had a list of the various (presuming more than one) > Python tasking frameworks? I know of Twisted already, but I'm really looking > for something along the lines of a task/thread pool type of arrangement. I > see th

Re: math.nroot [was Re: A brief question.]

2005-07-03 Thread James Dennett
Tom Anderson wrote: > On Sun, 3 Jul 2005, George Sakkis wrote: > >> "Tom Anderson" <[EMAIL PROTECTED]> wrote: >> > And finally, does Guido know something about arithmetic that i > don't, or > is this expression: > > -1.0 ** 0.5 > > Evaluated wrongly? No

Re: need to get an index for an item in a list

2005-07-03 Thread nephish
Hey, thanks, this has worked out for me. i am trying to do as much of this as possible in IDLE because it lets me know on the fly what is messed up. thanks for your help shawn <>< -- http://mail.python.org/mailman/listinfo/python-list

Re: What are the other options against Zope?

2005-07-03 Thread Mike Meyer
Christopher Subich <[EMAIL PROTECTED]> writes: > That, and the file format definitely isn't robust to bit-rot that > happened too often on FAT16/32 filesystems. >From where I sit, the critical difference between the registry and a set of .ini files (or Unix rc files) is that the registry requires

Re: Accepted Summer of Code proposals

2005-07-03 Thread Peter Decker
On 7/3/05, Robert Kern <[EMAIL PROTECTED]> wrote: > I would suggest not speculating on biased or malicious intentions. It is > possible that no one applied with a proposal to work on Dabo, or that > such a proposal was poorly written, or that the author had too little > experience, or any number o

Re: A Policy for Inclusion in the Standard Library: was Modules forinclusion in standard library?

2005-07-03 Thread Terry Reedy
"Colin J. Williams" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Terry Reedy wrote: >> >> A couple of times, Guido has given his general policy as generally >> useful; >> best-of-breed, tested and accepted by the community; and backed by a >> developer who will adapt it and its

Re: Determining actual elapsed (wall-clock) time

2005-07-03 Thread Bengt Richter
On Sat, 2 Jul 2005 19:44:19 -0400, Tim Peters <[EMAIL PROTECTED]> wrote: >[Peter Hansen] >> Hmmm... not only that, but at least under XP the return value of >> time.time() _is_ UTC. At least, it's entirely unaffected by the >> daylight savings time change, or (apparently) by changes in time zone.

Re: math.nroot [was Re: A brief question.]

2005-07-03 Thread Tom Anderson
On Mon, 4 Jul 2005, Steven D'Aprano wrote: > On Sun, 03 Jul 2005 15:46:35 +0100, Tom Anderson wrote: > >> I think there would be a lot less confusion over the alleged inaccuracy of >> floating point if everyone wrote in hex - indeed, i believe that C99 has >> hex floating-point literals. C has alw

Re: How do you program in Python?

2005-07-03 Thread James
Peter Hansen wrote: > anthonyberet wrote: > > What I would really like is something like an old-style BASIC > > interpreter, in which I could list, modify and test-run sections of > > code, to see the effects of tweaks, without having to save it each time, > > or re-typing it over and over (I hav

Re: Proposal: reducing self.x=x; self.y=y; self.z=z boilerplate code

2005-07-03 Thread Bengt Richter
On Sat, 02 Jul 2005 13:50:25 GMT, "Andrew Koenig" <[EMAIL PROTECTED]> wrote: >"Ralf W. Grosse-Kunstleve" <[EMAIL PROTECTED]> wrote in message >news:[EMAIL PROTECTED] > >>class grouping: >> >>def __init__(self, .x, .y, .z): >># real code right here > >> Emulation using exis

Re: need to get an index for an item in a list

2005-07-03 Thread Peter Hansen
Roy Smith wrote: > That being said, index() isn't isn't going to work if there are duplicate > lines in the file; it'll return the index of the first one. It will still work, if you are willing to do a bit of work to help it: >>> l = range(10) + [5] >>> l [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 5] >>>

Re: Accepted Summer of Code proposals

2005-07-03 Thread Robert Kern
Peter Decker wrote: > On 7/2/05, Reinhold Birkenfeld <[EMAIL PROTECTED]> wrote: > >>A.M. Kuchling wrote: >> >>>For anyone who's interested: the Python wiki now contains a list of the >>>PSF-mentored proposals that were accepted for Google's Summer of Code: >>> http://wiki.python.org/moin/Summ

Re: need to get an index for an item in a list

2005-07-03 Thread Roy Smith
In article <[EMAIL PROTECTED]>, Peter Hansen <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > i need to be able to get the index for an item in a list. > > > any ideas? > > Fire up the interactive interpreter and learn to use it to help > yourself. In this case, the most useful thing

Re: Accepted Summer of Code proposals

2005-07-03 Thread Peter Hansen
Peter Decker wrote: > On 7/2/05, Reinhold Birkenfeld <[EMAIL PROTECTED]> wrote: >>Is it right that two Wax proposals were accepted? > > Or that Wax is being promoted over Dabo "Promoted"? Do you know if any Dabo proposals were even made? And how good the proposals were? The money goes to thos

Re: need to get an index for an item in a list

2005-07-03 Thread Roy Smith
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] wrote: > hey there, > i need to be able to get the index for an item in a list. > the list is a list of lines read from a text file. > > like this: > > file = open("/home/somefile.text", "r") > lines = file.readlines() > file.close() > > now, i

Re: map/filter/reduce/lambda opinions and background unscientific mini-survey

2005-07-03 Thread Ron Adam
Erik Max Francis wrote: > Ron Adam wrote: >> I'm just estimating, but I think that is the gist of adding those two >> in exchange for reduce. Not that they will replace all of reduce use >> cases, but that sum and product cover most situations and can be >> implemented more efficiently than u

Re: need to get an index for an item in a list

2005-07-03 Thread Peter Hansen
[EMAIL PROTECTED] wrote: > i need to be able to get the index for an item in a list. > any ideas? Fire up the interactive interpreter and learn to use it to help yourself. In this case, the most useful thing might be to know about the dir() builtin method, which you can use on a list like so:

Re: math.nroot [was Re: A brief question.]

2005-07-03 Thread Tom Anderson
On Sun, 3 Jul 2005, Tim Peters wrote: > [Fredrik Johansson] > I'd rather like to see a well implemented math.nthroot. 64**(1/3.0) gives 3.9996, and this error could be avoided. > > [Steven D'Aprano] >> math.exp(math.log(64)/3.0) >>> 4.0 >>> >>> Success!!! > > None of this

Re: PIL question: keeping metadata

2005-07-03 Thread Jarek Zgoda
Ilpo Nyyssönen napisał(a): >>>Is there any way of keeping this info in PIL? >> >>I don't think so... when I investigated in the past, I think I >>discovered that the PIL can't write EXIF data (I might be wrong, >>though, or my information might be outdated). > > There is this: > > http://mail.py

Re: Accepted Summer of Code proposals

2005-07-03 Thread Peter Decker
On 7/2/05, Reinhold Birkenfeld <[EMAIL PROTECTED]> wrote: > A.M. Kuchling wrote: > > For anyone who's interested: the Python wiki now contains a list of the > > PSF-mentored proposals that were accepted for Google's Summer of Code: > > http://wiki.python.org/moin/SummerOfCode > > Is it right

Re: Assigning to None (was Re: Question about Python)

2005-07-03 Thread Bengt Richter
On Sun, 03 Jul 2005 11:47:07 +1000, Steven D'Aprano <[EMAIL PROTECTED]> wrote: >On Fri, 01 Jul 2005 12:59:20 -0400, François Pinard wrote: > >> [Peter Hansen] >>> Mike Meyer wrote: >>> > Yes. I once grabbed an old program that did assignments to None. But >>> > that's always been a bad idea. >> >

need to get an index for an item in a list

2005-07-03 Thread nephish
hey there, i need to be able to get the index for an item in a list. the list is a list of lines read from a text file. like this: file = open("/home/somefile.text", "r") lines = file.readlines() file.close() now, i want to see if a certain string is == to one of the lines and if so, i need to k

Re: Using regular expressions in internet searches

2005-07-03 Thread Jp Calderone
On 3 Jul 2005 10:49:03 -0700, [EMAIL PROTECTED] wrote: >What is the best way to use regular expressions to extract information >from the internet if one wants to search multiple pages? Let's say I >want to search all of www.cnn.com and get a list of all the words that >follow "Michael." > >(1) Is P

Re: math.nroot [was Re: A brief question.]

2005-07-03 Thread Tom Anderson
On Sun, 3 Jul 2005, George Sakkis wrote: > "Tom Anderson" <[EMAIL PROTECTED]> wrote: > And finally, does Guido know something about arithmetic that i don't, or is this expression: -1.0 ** 0.5 Evaluated wrongly? >>> >>> No, it is evaluated according to the rules of pre

Re: How do you program in Python?

2005-07-03 Thread [EMAIL PROTECTED]
anthonyberet wrote: > My question isn't as all-encompassing as the subject would suggest... > > I am almost a Python newbie, but I have discovered that I don't get > along with IDLE, as i can't work out how to run and rerun a routine > without undue messing about. > > What I would really like is

Re: Using regular expressions in internet searches

2005-07-03 Thread MyHaz
Python would be good for this, but if you just want a chuck an rumble solution might be. bash $wget -r --ignore-robots -l 0 -c -t 3 http://www.cnn.com/ bash $ grep -r "Micheal.*" ./www.cnn.com/* Or you could do a wget/python mix like import sys import re sys.os.command("wget -r --ignore-robots

Re: map/filter/reduce/lambda opinions and background unscientificmini-survey

2005-07-03 Thread Jp Calderone
On Sun, 03 Jul 2005 14:43:14 -0400, Peter Hansen <[EMAIL PROTECTED]> wrote: >Steven D'Aprano wrote: >> Frankly, I find this entire discussion very surreal. Reduce etc *work*, >> right now. They have worked for years. If people don't like them, nobody >> is forcing them to use them. Python is being

Re: Inheriting from object

2005-07-03 Thread Bengt Richter
On Sat, 02 Jul 2005 12:26:49 -0700, Scott David Daniels <[EMAIL PROTECTED]> wrote: >Bengt Richter wrote: >> On Thu, 30 Jun 2005 08:54:31 -0700, Scott David Daniels <[EMAIL PROTECTED]> >> wrote: >>>Or, perhaps: >>>class foo(object): >>>def __init__(self, *args, **kwargs): >>>

Re: map/filter/reduce/lambda opinions and background unscientificmini-survey

2005-07-03 Thread Peter Hansen
Steven D'Aprano wrote: > Frankly, I find this entire discussion very surreal. Reduce etc *work*, > right now. They have worked for years. If people don't like them, nobody > is forcing them to use them. Python is being pushed into directions which > are *far* harder to understand than map and reduc

Re: Using regular expressions in internet searches

2005-07-03 Thread Diez B. Roggisch
[EMAIL PROTECTED] wrote: > What is the best way to use regular expressions to extract information > from the internet if one wants to search multiple pages? Let's say I > want to search all of www.cnn.com and get a list of all the words that > follow "Michael." > > (1) Is Python the best language

Re: map/filter/reduce/lambda opinions and background unscientificmini-survey

2005-07-03 Thread Christopher Subich
Scott David Daniels wrote: > egbert wrote: >> How do you replace >> map(f1,sequence1, sequence2) >> especially if the sequences are of unequal length ? >> >> I didn't see it mentioned yet as a candidate for limbo, >> but the same question goes for: >> zip(sequence1,sequence2) > > OK, you guys are

Re: map/filter/reduce/lambda opinions and background unscientificmini-survey

2005-07-03 Thread Christopher Subich
Carl Banks wrote: > Listcomps et al. cannot do everything map, lambda, filter, and reduce > did. Listcomps are inferior for functional programming. But, you see, > functional is not the point. Streamlining procedural programs is the > point, and I'd say listcomps do that far better, and without

C parser with spark

2005-07-03 Thread Sébastien Boisgérault
Hi, Has anybody already implemented a full ANSI C parser with John Aycock's spark module ? (spark : http://pages.cpsc.ucalgary.ca/~aycock/spark/) Cheers, SB -- http://mail.python.org/mailman/listinfo/python-list

Using regular expressions in internet searches

2005-07-03 Thread mike . ceravolo
What is the best way to use regular expressions to extract information from the internet if one wants to search multiple pages? Let's say I want to search all of www.cnn.com and get a list of all the words that follow "Michael." (1) Is Python the best language for this? (Plus is it time-efficient?

  1   2   >