Re: Optimize function similiar to dict.update() but adds common values

2005-12-14 Thread Gregory Piñero
OK, I ran Peter's add_freq3 and it ran four times on really large dictionaries in about 3000 seconds. So I'd say that at a minimum that's ten times faster than my original function since it ran all last night and didn't finish. Much obliged, Peter! -Greg On 12/14/05, Gregory Piñero <[EMAIL PRO

Re: ActivePython and Amara

2005-12-14 Thread Jay
really quick question, if you look at the XML doc of digg.com then you will see that there are multiple items in channel, how do i tell it to go to the next item and get that title?? title2 = rssDigg.find("//channel/item//title").text Didnt work title2 = rssDigg.find("//channel/item[1]/title"

Re: How do I bind to scrollbar?

2005-12-14 Thread James Stroud
Nicholas Shewmaker wrote: > (I apologize if this posts twice. My AVG is being fussy.) > > From what I've read, MouseWheel is a very tricky event. I have > replaced my Python tcl84.dll and tk84.dll files with those in the > ActiveTcl distribution to fix the crashes caused by the event. Then, I

Re: ActivePython and Amara

2005-12-14 Thread alex23
Jay wrote: > [T]here are multiple items in channel, how do i tell it to > go to the next item and get that title?? channel = rssDigg.find('//channel') for item in channel.findall('item'): print item.find('title').text -alex23 -- http://mail.python.org/mailman/listinfo/python-list

Re: PHP = Perl Improved

2005-12-14 Thread John Bokma
Martin Christensen <[EMAIL PROTECTED]> wrote: > Perl, too, since he doesn't seem to understand it when people tell him > to bugger off in plain English. "It" buggers off if everybody ignores it. "It" posts because it knows that its actions pisses off so many people. -- John S

Re: OO in Python? ^^

2005-12-14 Thread Alex Martelli
<[EMAIL PROTECTED]> wrote: > > those convoluted templates that were added to the language as > > an afterthought. > I don't see this in Haskell. Well, historically templates HAVE been added to Haskell "as an afterthought" (well after the rest of the language was done), and judging mostly from

Re: OO in Python? ^^

2005-12-14 Thread bonono
Alex Martelli wrote: > <[EMAIL PROTECTED]> wrote: > > > > those convoluted templates that were added to the language as > > > an afterthought. > > I don't see this in Haskell. > > Well, historically templates HAVE been added to Haskell "as an > afterthought" (well after the rest of the language wa

Re: OO in Python? ^^

2005-12-14 Thread Alex Martelli
<[EMAIL PROTECTED]> wrote: > Alex Martelli wrote: > > <[EMAIL PROTECTED]> wrote: > > > > > > those convoluted templates that were added to the language as > > > > an afterthought. > > > I don't see this in Haskell. > > > > Well, historically templates HAVE been added to Haskell "as an > > aftertho

Re: Python packages on OS X vs Windows

2005-12-14 Thread Mike Meyer
Scott David Daniels <[EMAIL PROTECTED]> writes: > BartlebyScrivener wrote: > The tough part on Windows (for the Linux/Unix/*ix bigots) is that > each program scans the command line that invoked it in its own > inimitable way. This is not really the fault of the windows command > line processor; th

Re: Python packages on OS X vs Windows

2005-12-14 Thread Kenneth McDonald
I've often found the Linux world to be like falling off a log,specifically, a log above a deep chasm with sharp rocksat the bottom :-)Linux has its place (though I tended to use FreeBSD more),but it's been several years since I've wanted to actually knowhow to manage my own system. I'd suggest that

Re: OO in Python? ^^

2005-12-14 Thread bonono
Alex Martelli wrote: > <[EMAIL PROTECTED]> wrote: > > > Alex Martelli wrote: > > > <[EMAIL PROTECTED]> wrote: > > > > > > > > those convoluted templates that were added to the language as > > > > > an afterthought. > > > > I don't see this in Haskell. > > > > > > Well, historically templates HAVE

Re: Python C/API - *arg,**kwds variable argumnents

2005-12-14 Thread [EMAIL PROTECTED]
thanks, I get it now. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python packages on OS X vs Windows

2005-12-14 Thread Kenneth McDonald
If the amount of time it saved me justified it, I wouldn't hesitate to spend250 pounds. To put it in a more measurable manner, I've found myselfspending so much time attempting to get packages compiled underUNIXes (OS X, Linux, FreeBSD, etc.) that I would have no difficultywhatsoever in spending $5

Re: quick unicode Q

2005-12-14 Thread Heiko Wundram
Erik Max Francis wrote: > Flags in the ID3 tag specify the encoding. It is not always UTF-8. > > http://www.id3.org/id3v2.4.0-structure.txt Okay... Didn't know that, and I'm pretty sure with ID3V1 this was always utf-8 in case it was unicode (which was a non-standard extension anyway). Thanks fo

Re: Online Ruby

2005-12-14 Thread Paddy
That reminds me of TclTutor: http://www.msen.com/~clif/TclTutorTour.html TclTutor is a great Tk application that teaches Tcl/Tk by having all the lessons and examples set up waiting in the app. The examples can be edited/fixed and re-executed. I still bring up TclTutor when I delve into Tcl pro

Re: set & random.choice question

2005-12-14 Thread cgriddell
Oh duh. :) Thanks for pointing out the obvious without mocking... sc -- http://mail.python.org/mailman/listinfo/python-list

Re: How to get the local mac address?

2005-12-14 Thread Frank Millman
[EMAIL PROTECTED] wrote: > Sorry that I can't help you in any way but have a question myself. Is > there an OS independent way to get this thing(regardless of how to > format it) in Python ? I know this may not matter if all you want is > Windows but there is just another thread talking about one

Re: How to get the local mac address?

2005-12-14 Thread bonono
Frank Millman wrote: > [EMAIL PROTECTED] wrote: > > Sorry that I can't help you in any way but have a question myself. Is > > there an OS independent way to get this thing(regardless of how to > > format it) in Python ? I know this may not matter if all you want is > > Windows but there is just a

Self-awareness of imported modules? Do they know where they live?

2005-12-14 Thread Martin M.
Hi, I have the following question: How can an imported module see/find the path to itself? Background: From my main script I import a module which needs a file (AppleScript) located in the same directory as the imported module. What I do not want is to tell the module the location of the AppleScr

Re: IsString

2005-12-14 Thread Donn Cave
Quoth Mike Meyer <[EMAIL PROTECTED]>: | Donn Cave <[EMAIL PROTECTED]> writes: ... |> Historically, the way I remember it, there was a time not too |> long ago when GvR and his minions sort of dismissed the idea |> that you needed to understand the reference/object model from |> the outset. I mean,

Re: Self-awareness of imported modules? Do they know where they live?

2005-12-14 Thread Heiko Wundram
Martin M. wrote: > So how can I do this? In AppleScript I would try something like "path > to me", but this does not work for imported scripts in AppleScript, as > you then only get the path to the main script. But can this be done in > Python? Can modules know where they are currently located, whe

<    1   2   3   4