Re: Design Ideals Goals Python 3 - Forest for the trees

2010-12-25 Thread flebber
On Dec 26, 4:56 pm, Alice Bevan–McGregor wrote: > > I was interested in what the design goals/philosphy was of Python 3 > > from a birds eye view, forest for the trees approach. > > I think I can safely point to the Zen of Python[1] as many of the > points therein directly apply to the simplifiati

Re: Design Ideals Goals Python 3 - Forest for the trees

2010-12-25 Thread Alice Bevan–McGregor
I was interested in what the design goals/philosphy was of Python 3 from a birds eye view, forest for the trees approach. I think I can safely point to the Zen of Python[1] as many of the points therein directly apply to the simplifiation, clarification, and goals of Python 3. Most notably:

Re: Design Ideals Goals Python 3 - Forest for the trees

2010-12-25 Thread Tim Harig
On 2010-12-26, flebber wrote: > I was hoping someone could shed some (articles, links) in regards > python 3 design ideals. I was searching guido's blog which has his > overarching view of Python from an early development perspective > http://python-history.blogspot.com/2009/01/pythons-design-phil

Design Ideals Goals Python 3 - Forest for the trees

2010-12-25 Thread flebber
Hi I was hoping someone could shed some (articles, links) in regards python 3 design ideals. I was searching guido's blog which has his overarching view of Python from an early development perspective http://python-history.blogspot.com/2009/01/pythons-design-philosophy.html . I was interested in

Re: What is the the best style and theory of writing a complier in your language

2010-12-25 Thread Steve Holden
On 12/24/2010 2:21 AM, Juha Nieminen wrote: > In comp.lang.c++ small Pox wrote: >> http://... > > You should take your religion somewhere else. And you should learn that by re-posting their links you assist spammers. -- Steve Holden +1 571 484 6266 +1 800 494 3119 PyCon 2011 Atlan

Re: *** The Jew World Order - A TUTORIAL Exposition in Banking and Economics ***

2010-12-25 Thread Jude Bloom
Why don't you take your paranoia and envy of Jews and shove it straight up your inadequate ass? On Fri, Dec 24, 2010 at 12:06 PM, small Pox wrote: -- http://mail.python.org/mailman/listinfo/python-list

Re: Trying to parse a HUGE(1gb) xml file

2010-12-25 Thread Nobody
On Sun, 26 Dec 2010 01:05:53 +, Tim Harig wrote: >> XML is typically processed sequentially, so you don't need to create a >> decompressed copy of the file before you start processing it. > > Sometimes XML is processed sequentially. When the markup footprint is > large enough it must be. Qu

Re: type(d) != type(d.copy()) when type(d).issubclass(dict)

2010-12-25 Thread John O'Hagan
On Sat, 25 Dec 2010, Steven D'Aprano wrote: > On Sat, 25 Dec 2010 15:58:35 +, Duncan Booth wrote: > > kj wrote: > >> Watch this: > > class neodict(dict): pass > >> > >> ... > >> > > d = neodict() > > type(d) > >> > >> > >> > > type(d.copy()) > >> > >> > >> > >> Bug? Feature?

Re: Python Average Salary Report

2010-12-25 Thread Katie T
On Sat, Dec 25, 2010 at 11:38 AM, czarina08 wrote: > I'm doing a market research report on the average hourly rates for > Python/Django developers. Any input on this? I do understand that it > does depend on the location, amount of experience and skills. I'd like > to hear what are the hourly rate

Re: Python Web App

2010-12-25 Thread Katie T
On Wed, Dec 22, 2010 at 9:43 PM, Sean wrote: > Anybody know where I can find a Python Development Environment in the > form of a web app for use with Chrome OS. I have been looking for a > few days and all i have been able to find is some old discussions with > python developers talking about they

Signal handler & cygwin

2010-12-25 Thread gervaz
Hi all, given the followin code snippet: import signal import time import sys import os print("{0}\n".format(os.getpid())) ContinueProcessing = True def stop(signal, frame): print("\nSignal received!\n") time.sleep(1) global ContinueProcessing ContinueProcessing = False signal.

Re: Trying to parse a HUGE(1gb) xml file

2010-12-25 Thread Tim Harig
On 2010-12-25, Adam Tauno Williams wrote: > On Sat, 2010-12-25 at 22:34 +, Nobody wrote: >> On Sat, 25 Dec 2010 14:41:29 -0500, Roy Smith wrote: >> XML is typically processed sequentially, so you don't need to create a >> decompressed copy of the file before you start processing it. > > Yep.

Re: Trying to parse a HUGE(1gb) xml file

2010-12-25 Thread Tim Harig
On 2010-12-25, Nobody wrote: > On Sat, 25 Dec 2010 14:41:29 -0500, Roy Smith wrote: >>> XML works extremely well for large datasets. > One advantage it has over many legacy formats is that there are no > inherent 2^31/2^32 limitations. Many binary formats inherently cannot > support files larger t

Re: Trying to parse a HUGE(1gb) xml file

2010-12-25 Thread BartC
"Adam Tauno Williams" wrote in message news:mailman.287.1293319780.6505.python-l...@python.org... On Sat, 2010-12-25 at 22:34 +, Nobody wrote: On Sat, 25 Dec 2010 14:41:29 -0500, Roy Smith wrote: >> XML works extremely well for large datasets. One advantage it has over many legacy formats i

I am not able to verify the integrity of python.2.5.4.msi

2010-12-25 Thread Varuna Seneviratna
Hello there! I downloaded python msi version for Windows from http://www.python.org/download/releases/2.5.4/ .At the bottom of the page it is said that "The signatures above were generated with GnuPG using release manager Martin v. Löwis's public key

Re: lxml etree question

2010-12-25 Thread Jim
On Dec 25, 5:33 am, Stefan Behnel wrote: > lxml knows about this special case, so you can write > >         {http://www.w3.org/XML/1998/namespace}lang > > and lxml will take care of using the right prefix. Stefan, thank you for the software, which has helped me a great deal. I tried that exact t

Re: Trying to parse a HUGE(1gb) xml file

2010-12-25 Thread Adam Tauno Williams
On Sat, 2010-12-25 at 22:34 +, Nobody wrote: > On Sat, 25 Dec 2010 14:41:29 -0500, Roy Smith wrote: > >> XML works extremely well for large datasets. > One advantage it has over many legacy formats is that there are no > inherent 2^31/2^32 limitations. Many binary formats inherently cannot > su

Re: How to pop the interpreter's stack?

2010-12-25 Thread Steven D'Aprano
On Fri, 24 Dec 2010 10:51:32 -0800, John Nagle wrote: > On 12/24/2010 3:24 AM, Carl Banks wrote: >> On Dec 24, 1:24 am, Steven D'Aprano> +comp.lang.pyt...@pearwood.info> wrote: > All I'm >>> suggesting is that there should be a way of reducing the boilerplate >>> needed for this idiom: >>> >>>

Re: I don't why there is no output....

2010-12-25 Thread Steven D'Aprano
On Fri, 24 Dec 2010 16:22:18 -0800, chad wrote: >> I don't get it. I was expecting to see the output from both the tty and >> cat. Instead, I see nothing. Why? > > Never mind. I figured it out. Well, don't keep us in suspenders. What was the problem? -- Steven -- http://mail.python.org/mailm

Re: How to pop the interpreter's stack?

2010-12-25 Thread Steven D'Aprano
On Sat, 25 Dec 2010 09:17:27 -0500, Robert Kern wrote: > On 12/24/10 5:14 PM, Ethan Furman wrote: > >> There are also times when I change the exception being raised to match >> what python expects from that type of object -- for example, from >> WhatEverException to KeyError for a dict-like objec

Re: type(d) != type(d.copy()) when type(d).issubclass(dict)

2010-12-25 Thread Steven D'Aprano
On Sat, 25 Dec 2010 15:58:35 +, Duncan Booth wrote: > kj wrote: > >> Watch this: >> > class neodict(dict): pass >> ... > d = neodict() > type(d) >> > type(d.copy()) >> >> >> >> Bug? Feature? Genius beyond the grasp of schlubs like me? > > Feature. I'd say it is neither

Re: How can a function find the function that called it?

2010-12-25 Thread DevPlayer
> Original Poster > I thought I'd implement it as a subclass of collections.OrderedDict > that prohibits all modifications to the dictionary after it has > been initialized. I thought the __new__() method was for customizing how objects where instantated. Where in __new__() you would get an object

Re: Trying to parse a HUGE(1gb) xml file

2010-12-25 Thread Nobody
On Sat, 25 Dec 2010 14:41:29 -0500, Roy Smith wrote: >> XML works extremely well for large datasets. One advantage it has over many legacy formats is that there are no inherent 2^31/2^32 limitations. Many binary formats inherently cannot support files larger than 2GiB or 4Gib due to the use of 32

Re: Trying to parse a HUGE(1gb) xml file

2010-12-25 Thread Stefan Sonnenberg-Carstens
Am 25.12.2010 20:41, schrieb Roy Smith: In article, Adam Tauno Williams wrote: XML works extremely well for large datasets. Barf. I'll agree that there are some nice points to XML. It is portable. It is (to a certain extent) human readable, and in a pinch you can use standard text tools

Re: Keeping track of the N largest values

2010-12-25 Thread John Nagle
On 12/25/2010 8:04 AM, Peter Otten wrote: Roy Smith wrote: I'm processing a stream of N numbers and want to keep track of the K largest. There's too many numbers in the stream (i.e. N is too large) to keep in memory at once. K is small (100 would be typical). http://docs.python.org/library/

Re: Keeping track of the N largest values

2010-12-25 Thread Paul Rubin
Roy Smith writes: >> from heapq import nlargest >> top = nlargest(K, input()) > In addition to finding the K largest values, I *also* need to do some > other processing on all the values The problem with nlargest() > is that it doesn't give me a hook to do that. def processed_input

Re: Trying to parse a HUGE(1gb) xml file

2010-12-25 Thread Roy Smith
In article , Adam Tauno Williams wrote: > XML works extremely well for large datasets. Barf. I'll agree that there are some nice points to XML. It is portable. It is (to a certain extent) human readable, and in a pinch you can use standard text tools to do ad-hoc queries (i.e. grep for a

Re: Keeping track of the N largest values

2010-12-25 Thread Roy Smith
In article , Duncan Booth wrote: > Roy Smith wrote: > > > > > I'm processing a stream of N numbers and want to keep track of the K > > largest. There's too many numbers in the stream (i.e. N is too large) > > to keep in memory at once. K is small (100 would be typical). > > ... > > Is the

Re: python-parser running Beautiful Soup only spits out one line of 10. What i have gotten wrong here?

2010-12-25 Thread John Nagle
Your program is doing what you asked it to do. It finds the first table with class 'bp_ergebnis_tab_info'. Then it ignores that results. Then it finds the first "td" item in the document, and prints the contents of that. Then it exits. What did you want it to do? Try this. It prints o

python-parser running Beautiful Soup only spits out one line of 10. What i have gotten wrong here?

2010-12-25 Thread Martin Kaspar
Hello dear Community,. I am trying to get a scraper up and running: And keep running into problems. when I try what you have i have learnedd so far I only get: Schuldaten Here is the code that I used: import urllib2 from BeautifulSoup import BeautifulSoup page = urllib2.urlopen("http://www.sch

Re: Trying to parse a HUGE(1gb) xml file

2010-12-25 Thread Tim Harig
On 2010-12-25, Steve Holden wrote: > On 12/23/2010 4:34 PM, Stefan Sonnenberg-Carstens wrote: >> For large datasets I always have huge question marks if one says "xml". >> But I don't want to start a flame war. I would agree; but, you don't always have the choice over the data format that you hav

Re: Trying to parse a HUGE(1gb) xml file

2010-12-25 Thread Adam Tauno Williams
"Steve Holden" wrote: >On 12/23/2010 4:34 PM, Stefan Sonnenberg-Carstens wrote: >> For large datasets I always have huge question marks if one says >"xml". >> But I don't want to start a flame war. >I agree people abuse the "spirit of XML" using it to transfer gigabytes >of data, How so? I th

Re: Keeping track of the N largest values

2010-12-25 Thread Robert Kern
On 12/25/10 10:42 AM, Roy Smith wrote: I'm processing a stream of N numbers and want to keep track of the K largest. There's too many numbers in the stream (i.e. N is too large) to keep in memory at once. K is small (100 would be typical). From a theoretical point of view, I should be able to

Re: Trying to parse a HUGE(1gb) xml file

2010-12-25 Thread Stefan Behnel
Steve Holden, 25.12.2010 16:55: On 12/23/2010 4:34 PM, Stefan Sonnenberg-Carstens wrote: For large datasets I always have huge question marks if one says "xml". But I don't want to start a flame war. I agree people abuse the "spirit of XML" using it to transfer gigabytes of data I keep readi

Re: Keeping track of the N largest values

2010-12-25 Thread Duncan Booth
Roy Smith wrote: > > I'm processing a stream of N numbers and want to keep track of the K > largest. There's too many numbers in the stream (i.e. N is too large) > to keep in memory at once. K is small (100 would be typical). > ... > Is there a better way to do this, either from a theoretica

Re: Keeping track of the N largest values

2010-12-25 Thread Peter Otten
Roy Smith wrote: > I'm processing a stream of N numbers and want to keep track of the K > largest. There's too many numbers in the stream (i.e. N is too large) > to keep in memory at once. K is small (100 would be typical). > > From a theoretical point of view, I should be able to do this in N

Re: What is the the best style and theory of writing a complier in your language

2010-12-25 Thread Steve Holden
On 12/23/2010 5:01 PM, small Pox wrote: > What is the the best style and theory of writing a complier in your > language > > Maybe a book will suffice. > > http://something-argumentative/ > > I want to parse the contents of the above link into hebrew audio. > > CHEERIOS > Sure you do. regared

Re: type(d) != type(d.copy()) when type(d).issubclass(dict)

2010-12-25 Thread Duncan Booth
kj wrote: > Watch this: > class neodict(dict): pass > ... d = neodict() type(d) > type(d.copy()) > > > > Bug? Feature? Genius beyond the grasp of schlubs like me? Feature. In (almost?) all cases any objects constructed by a subclass of a builtin class will be of the

Re: Trying to parse a HUGE(1gb) xml file

2010-12-25 Thread Steve Holden
On 12/23/2010 4:34 PM, Stefan Sonnenberg-Carstens wrote: > For large datasets I always have huge question marks if one says "xml". > But I don't want to start a flame war. I agree people abuse the "spirit of XML" using it to transfer gigabytes of data, but what else are they to use? regards Stev

Keeping track of the N largest values

2010-12-25 Thread Roy Smith
I'm processing a stream of N numbers and want to keep track of the K largest. There's too many numbers in the stream (i.e. N is too large) to keep in memory at once. K is small (100 would be typical). >From a theoretical point of view, I should be able to do this in N log K time. What I'm do

Re: How to pop the interpreter's stack?

2010-12-25 Thread Robert Kern
On 12/24/10 4:24 AM, Steven D'Aprano wrote: On Thu, 23 Dec 2010 22:38:05 -0800, Carl Banks wrote: OTOH, going the extra mile to hide useful information from a user is asinine. As a user, I will decide for myself how I want to use implementation-defined information, and I don't want the impleme

Re: How to pop the interpreter's stack?

2010-12-25 Thread Robert Kern
On 12/24/10 5:14 PM, Ethan Furman wrote: There are also times when I change the exception being raised to match what python expects from that type of object -- for example, from WhatEverException to KeyError for a dict-like object. So in this regard I agree with Steven. Steven isn't arguing th

Re: Python Average Salary Report

2010-12-25 Thread Alice Bevan–McGregor
Howdy! I'm doing a market research report on the average hourly rates for Python/Django developers. Any input on this? I do understand that it does depend on the location, amount of experience and skills. I'd like to hear what are the hourly rates within your area :-) Thanks! I'm a strange c

Python Average Salary Report

2010-12-25 Thread czarina08
Hi there, I'm doing a market research report on the average hourly rates for Python/Django developers. Any input on this? I do understand that it does depend on the location, amount of experience and skills. I'd like to hear what are the hourly rates within your area :-) Thanks! -- http://mail.py

Re: lxml etree question

2010-12-25 Thread Stefan Behnel
Jim, 24.12.2010 16:10: Hello, I wonder if someone knows about lxml.etree and namespaces? I want to build an ElementTree where some of the sub-elements have attributes that serialize this way. .. I've tried just comment_elet.set('xml:lang','de') and it didn't like that at all (although it t