Friday, February 12, 2010

comp.lang.python - 25 new messages in 9 topics - digest

comp.lang.python
http://groups.google.com/group/comp.lang.python?hl=en

comp.lang.python@googlegroups.com

Today's topics:

* Modifying Class Object - 5 messages, 4 authors
http://groups.google.com/group/comp.lang.python/t/fd36962c4970ac48?hl=en
* Please help with MemoryError - 10 messages, 7 authors
http://groups.google.com/group/comp.lang.python/t/6ed1981bc9821443?hl=en
* python crash on windows but not on linux - 1 messages, 1 author
http://groups.google.com/group/comp.lang.python/t/7d380bb24fe5e8b8?hl=en
* intolerant HTML parser - 1 messages, 1 author
http://groups.google.com/group/comp.lang.python/t/92752c2c44f54552?hl=en
* Configuring apache to execute python scripts using mod_python handler - 1
messages, 1 author
http://groups.google.com/group/comp.lang.python/t/77e6f8532657b390?hl=en
* MemoryError, can I use more? - 3 messages, 3 authors
http://groups.google.com/group/comp.lang.python/t/0944e954b29aa311?hl=en
* Dreaming of new generation IDE - 2 messages, 1 author
http://groups.google.com/group/comp.lang.python/t/e019614ea149e7bd?hl=en
* pyparsing wrong output - 1 messages, 1 author
http://groups.google.com/group/comp.lang.python/t/1d0719aa2f2e6e44?hl=en
* Helpp I want view page .py on apache WHAT CAN I DO??????????????? - 1
messages, 1 author
http://groups.google.com/group/comp.lang.python/t/fe344315c27e6106?hl=en

==============================================================================
TOPIC: Modifying Class Object
http://groups.google.com/group/comp.lang.python/t/fd36962c4970ac48?hl=en
==============================================================================

== 1 of 5 ==
Date: Fri, Feb 12 2010 2:27 pm
From: "Alf P. Steinbach"


* Steve Holden:
> Alf P. Steinbach wrote:
>> You may note that that Wikipedia article refers to an article that I
>> wrote about pointers in C++.
>>
> It's a broken link, referring to a non-existent server.

Yes, sorry.

It's been that way a long time, and for the same reason my C++ tutorial, the
only one linked to from the C++ FAQ, is also off-line.

However, if you're interested then copies of the "pointers" doc are likely to be
floating around (at one time some mention of it somewhere generated very high
traffic over a few weeks, people downloading the PDF, and then I almost reversed
my decision not to have ads...).


Cheers & hth.,

- Alf


== 2 of 5 ==
Date: Fri, Feb 12 2010 2:44 pm
From: Steven D'Aprano


On Fri, 12 Feb 2010 21:26:24 +0100, Alf P. Steinbach wrote:

> Yes, I do count this as a personal attack and flaming.
>
> The litmus test for that is that it says something very negative about
> the person you're debating with.

As negative as accusing somebody of intentionally lying?

Or is it only a personal attack when other people dare to disagree with
Alf P. Steinbach?


> In addition, your statement about the earlier attacks on me, is untrue,
> and your implication that it's only about attacks on me, is untrue. Both
> of which are very misleading, by the way. I'm assuming that you're
> intentionally lying.

Get over yourself. You're not so important that everyone is falling over
themselves to discredit you by intentional lying.

You do bring some technical knowledge and perspectives that is valuable to
this community, but it comes with so much spikiness, near-paranoia and
Freudian projection that it is extremely unpleasant dealing with you.

Since you first came to this community, you have displayed a remarkable
ability to take personal offence at virtually every disagreement, a
deeply paranoid viewpoint that whenever somebody contradicts your
statements they are deliberately lying, and a level of arrogance that is
outstanding even for computer science. (How sure of yourself do you have
to be to write a textbook for beginners in a language that you yourself
are a self-professed beginner in?)

I note with interest that this is not the only forum where your reaction
to disagreement is to accuse others of deliberate lying. It is a habit of
yours, and you've displayed it frequently and repeatedly. For example:

http://coding.derkeiler.com/Archive/General/comp.programming/2006-08/msg00139.html

http://www.embeddedrelated.com/usenet/embedded/show/43780-20.php

http://groups.google.am/group/comp.lang.c++/browse_thread/thread/555331f8dd594837

I'm no longer willing to tolerate the unpleasant attitudes you
display. So congratulations Alf. I've only kill-filed one other person on
this newsgroup until now. You are now the second. I may reverse it some
time in the future, but for now I'm just not interested in your paranoid
accusations that others are lying about you and your continual misuse of
the term "ad hominem" to refer to any and all criticism of your behaviour.

*plonk*


--
Steven


== 3 of 5 ==
Date: Fri, Feb 12 2010 3:47 pm
From: "Alf P. Steinbach"


* Steven D'Aprano:
> On Fri, 12 Feb 2010 21:26:24 +0100, Alf P. Steinbach wrote:
>
>> Yes, I do count this as a personal attack and flaming.
>>
>> The litmus test for that is that it says something very negative about
>> the person you're debating with.
>
> As negative as accusing somebody of intentionally lying?
>
> Or is it only a personal attack when other people dare to disagree with
> Alf P. Steinbach?

Do you mean that everybody else is allowed to get personal, but I, in return, am
not so allowed?


>> In addition, your statement about the earlier attacks on me, is untrue,
>> and your implication that it's only about attacks on me, is untrue. Both
>> of which are very misleading, by the way. I'm assuming that you're
>> intentionally lying.
>
> Get over yourself. You're not so important that everyone is falling over
> themselves to discredit you by intentional lying.

This implies something about my beliefs about my importance, that is, it is
clearly intended as an ad hominem attack.

I'm getting a bit tired of that.

> You do bring some technical knowledge and perspectives that is valuable to
> this community, but it comes with so much spikiness, near-paranoia and
> Freudian projection that it is extremely unpleasant dealing with you.
>
> Since you first came to this community, you have displayed a remarkable
> ability to take personal offence at virtually every disagreement,

That is not true.

I do take offense at pure personal attacks, though.

Personal attacks are about person, technical discussion is about technical things.

> a deeply paranoid viewpoint that whenever somebody contradicts your
> statements they are deliberately lying,

That's just stupid, sorry.

Being paranoid is not about being attacked, or about pointing out when someone's
lying.

Hello.


> and a level of arrogance that is
> outstanding even for computer science. (How sure of yourself do you have
> to be to write a textbook for beginners in a language that you yourself
> are a self-professed beginner in?)
>
> I note with interest that this is not the only forum where your reaction
> to disagreement is to accuse others of deliberate lying.

Your argument gets a bit circular.

> It is a habit of yours,

That is untrue.


> and you've displayed it frequently

No, that is untrue.


> and repeatedly.

Yes, I have repeatedly pointed when people have been lying, citing the evidence
and logic leading to that conclusion.

I wouldn't just "accuse" someone of something like that.

It's far too serious (however, above you're happy with accusing me of being
paranoid and whatever, so I conclude that you have no such qualms).


> For example:
>
> http://coding.derkeiler.com/Archive/General/comp.programming/2006-08/msg00139.html
>
> http://www.embeddedrelated.com/usenet/embedded/show/43780-20.php
>
> http://groups.google.am/group/comp.lang.c++/browse_thread/thread/555331f8dd594837

Yes, I've been on the net a long time, and consequently I have been involved in
flame wars. :-)[1]

That is no excuse for your behavior.

An extremely long thread dedicated to the notion that there are no references in
Python (which is blatantly false), coupled with personal attacks on the one
person arguing that there are. I could easily think that you were having me on.
Of course most anyone else who'd hold the rational opinion would not join the
battlefield, because it clearly wasn't and isn't about convincing or educating
anyone, but I feel that follow-ups to my articles should be answered.


Cheers & hth.,

- Alf


Notes:
[1] Like one here where some guy A objects to some other guy B's use of the
term "portable assembler" about C, where at first I try to defend B's point of
view, since it is after all one employed even by the creators of C. B sensibly
opts out of the discussion while I stay on, predictable result. Another flame
war is with some functional programming fanatic, and a third with a known troll.


== 4 of 5 ==
Date: Fri, Feb 12 2010 4:45 pm
From: Steve Holden


Alf P. Steinbach wrote:
[...]
> Of course most anyone else who'd hold the
> rational opinion would not join the battlefield, because it clearly
> wasn't and isn't about convincing or educating anyone, but I feel that
> follow-ups to my articles should be answered.
>
In other words, you must have the last word, a behavioral characteristic
I will avoid drawing the obvious conclusions about for fear of begin
accused (yet again) of making ad hominem attacks.

I suppose you will therefore be unable to resist the temptation to
respond to this. Though I'd love to be proved wrong again.

regards
Steve
--
Steve Holden +1 571 484 6266 +1 800 494 3119
PyCon is coming! Atlanta, Feb 2010 http://us.pycon.org/
Holden Web LLC http://www.holdenweb.com/
UPCOMING EVENTS: http://holdenweb.eventbrite.com/

== 5 of 5 ==
Date: Fri, Feb 12 2010 4:48 pm
From: Mark Lawrence


Alf P. Steinbach wrote:
> * Steven D'Aprano:
>> On Fri, 12 Feb 2010 21:26:24 +0100, Alf P. Steinbach wrote:
>>
>>> Yes, I do count this as a personal attack and flaming.
>>>
>>> The litmus test for that is that it says something very negative about
>>> the person you're debating with.
>>
>> As negative as accusing somebody of intentionally lying?
>>
>> Or is it only a personal attack when other people dare to disagree
>> with Alf P. Steinbach?
>
> Do you mean that everybody else is allowed to get personal, but I, in
> return, am not so allowed?
>
>
>>> In addition, your statement about the earlier attacks on me, is untrue,
>>> and your implication that it's only about attacks on me, is untrue. Both
>>> of which are very misleading, by the way. I'm assuming that you're
>>> intentionally lying.
>>
>> Get over yourself. You're not so important that everyone is falling
>> over themselves to discredit you by intentional lying.
>
> This implies something about my beliefs about my importance, that is, it
> is clearly intended as an ad hominem attack.
>
> I'm getting a bit tired of that.
>
>
>
>> You do bring some technical knowledge and perspectives that is
>> valuable to
>> this community, but it comes with so much spikiness, near-paranoia and
>> Freudian projection that it is extremely unpleasant dealing with you.
>>
>> Since you first came to this community, you have displayed a
>> remarkable ability to take personal offence at virtually every
>> disagreement,
>
> That is not true.
>
> I do take offense at pure personal attacks, though.
>
> Personal attacks are about person, technical discussion is about
> technical things.
>
>
>
>> a deeply paranoid viewpoint that whenever somebody contradicts your
>> statements they are deliberately lying,
>
> That's just stupid, sorry.
>
> Being paranoid is not about being attacked, or about pointing out when
> someone's lying.
>
> Hello.
>
>
>> and a level of arrogance that is outstanding even for computer
>> science. (How sure of yourself do you have to be to write a textbook
>> for beginners in a language that you yourself are a self-professed
>> beginner in?)
>>
>> I note with interest that this is not the only forum where your
>> reaction to disagreement is to accuse others of deliberate lying.
>
> Your argument gets a bit circular.
>
>
>
>> It is a habit of yours,
>
> That is untrue.
>
>
>> and you've displayed it frequently
>
> No, that is untrue.
>
>
>> and repeatedly.
>
> Yes, I have repeatedly pointed when people have been lying, citing the
> evidence and logic leading to that conclusion.
>
> I wouldn't just "accuse" someone of something like that.
>
> It's far too serious (however, above you're happy with accusing me of
> being paranoid and whatever, so I conclude that you have no such qualms).
>
>
>> For example:
>>
>> http://coding.derkeiler.com/Archive/General/comp.programming/2006-08/msg00139.html
>>
>>
>> http://www.embeddedrelated.com/usenet/embedded/show/43780-20.php
>>
>> http://groups.google.am/group/comp.lang.c++/browse_thread/thread/555331f8dd594837
>>
>
> Yes, I've been on the net a long time, and consequently I have been
> involved in flame wars. :-)[1]
>
> That is no excuse for your behavior.
>
> An extremely long thread dedicated to the notion that there are no
> references in Python (which is blatantly false), coupled with personal
> attacks on the one person arguing that there are. I could easily think
> that you were having me on. Of course most anyone else who'd hold the
> rational opinion would not join the battlefield, because it clearly
> wasn't and isn't about convincing or educating anyone, but I feel that
> follow-ups to my articles should be answered.
>
>
> Cheers & hth.,
>
> - Alf
>
>
> Notes:
> [1] Like one here where some guy A objects to some other guy B's use of
> the term "portable assembler" about C, where at first I try to defend
> B's point of view, since it is after all one employed even by the
> creators of C. B sensibly opts out of the discussion while I stay on,
> predictable result. Another flame war is with some functional
> programming fanatic, and a third with a known troll.

I'm intrigued by your comments over the last couple of weeks, as you
obviously know so much more about Python than people who have been
working on it and/or using it for the 20 odd years of the existence of
the language. Is it safe to assume that shortly you will be telling the
scientific community that Einstein was a complete bozo and that his
theory of relativity is crap, or that Stephen (Bob?) Hawking knows
nothing about the origins of the universe?

To put it another way, please stand up Alf, your voice is rather
muffled. And this isn't an ad hominem attack, whatever the hell that
means, I (NOTE I ) personally wish you'd bugger off and leave the
bandwidth to people who genuinely want to discuss Python, computing
algorithms, whatever.

And please do NOT bother to reply. Your pathetic smileys and/or HTH
garbage cut no ice with me. I'm quite simply staggered that the Python
community as a whole have shown far more patience than I have, otherwise
you'd have been shot down in seriously bad flames days ago.

To you, Alf, get stuffed.

To the rest of the Python community, thank you for doing a fantastic
job, I do appreciate it, and am currently in my own little way
attempting to put something back in.

Regards.

Mark Lawrence.


==============================================================================
TOPIC: Please help with MemoryError
http://groups.google.com/group/comp.lang.python/t/6ed1981bc9821443?hl=en
==============================================================================

== 1 of 10 ==
Date: Fri, Feb 12 2010 2:27 pm
From: Antoine Pitrou


Le Fri, 12 Feb 2010 17:10:01 -0500, Steve Holden a écrit :
>
> As has already been pointed out, if Python used call by reference then
> the following code would run without raising an AssertionError:
>
> def exchange(a, b):
> a, b = b, a
>
> x = 1
> y = 2
> exchange(x, y)
> assert (x == 2 and y == 1)
>
> Since function-local assignment always takes place in the function
> call's local namespace

I don't think this is related to a difference in parameter passing style.

It's just that assignment ("=") means a different thing in Python than in
non-object languages (or fake-object languages such as C++ or PHP): it
rebinds instead of mutating in-place. If it mutated, you wouldn't have
the AssertionError.

If you mutate in-place:

>>> def exchange(a, b):
... t = a[:]
... a[:] = b
... b[:] = t
...
>>> x, y = [1], [2]
>>> exchange(x, y)
>>> x, y
([2], [1])

Regards

Antoine.

== 2 of 10 ==
Date: Fri, Feb 12 2010 2:37 pm
From: Antoine Pitrou


Le Fri, 12 Feb 2010 23:12:06 +0100, Alf P. Steinbach a écrit :
>
> Steven talks about the standard meaning of "pass by reference".

See my answer to Steve's message. You can't postulate a "standard
meaning" of "pass by reference" independently of the specificities of
each language. For example a "variable" in Python means something
different than in non-object languages; it is impossible to have an
agnostic definition.

In Python and other true object languages, the operations on references
(especially assignment) don't have the same semantics as in more archaic
languages. This is no reason, IMO, to refuse using the term "pass by
reference". The state of art in computing languages evolves, and it
wouldn't be constructive to remain stuck with definitions from the 1960s.

Regards

Antoine.

== 3 of 10 ==
Date: Fri, Feb 12 2010 2:49 pm
From: "Alf P. Steinbach"


* Antoine Pitrou:
> Le Fri, 12 Feb 2010 23:12:06 +0100, Alf P. Steinbach a écrit :
>> Steven talks about the standard meaning of "pass by reference".
>
> See my answer to Steve's message. You can't postulate a "standard
> meaning" of "pass by reference" independently of the specificities of
> each language.

Agreed. See e.g. my discussion of C versus C# in the article you responded to.


> For example a "variable" in Python means something
> different than in non-object languages; it is impossible to have an
> agnostic definition.

It's possible and relatively speaking easy, but it's bound up with such a tangle
of terminological and religious issues that it's best not discussed here. :-(

But if you find/have a description that helps you understand what's going on,
and that correctly predicts the effect of code, then just Use It. :-)

After all, learning some "simpler" description would at that point just be more
work.


> In Python and other true object languages, the operations on references
> (especially assignment) don't have the same semantics as in more archaic
> languages. This is no reason, IMO, to refuse using the term "pass by
> reference". The state of art in computing languages evolves, and it
> wouldn't be constructive to remain stuck with definitions from the 1960s.

The main reason for not using that term for Python is that "pass by reference"
has the extremely strong connotation of being able to implement 'swap'.

And since there already is adequate standard terminology, why confuse things.


Cheers & hth.,

- Alf


== 4 of 10 ==
Date: Fri, Feb 12 2010 3:18 pm
From: Gib Bogle


Steven D'Aprano wrote:

> def swap(a, b):
> a, b = b, a
>
> x = 1
> y = 2
> swap(x, y)
> assert (x == 2) and (y==1)

Can't the same point be more simply made with this example:

def setval(a):
a = 12345

x = 1
setval(x)
print x

?


== 5 of 10 ==
Date: Fri, Feb 12 2010 3:26 pm
From: Steve Holden


Gib Bogle wrote:
> Steven D'Aprano wrote:
>
>> def swap(a, b):
>> a, b = b, a
>>
>> x = 1
>> y = 2
>> swap(x, y)
>> assert (x == 2) and (y==1)
>
> Can't the same point be more simply made with this example:
>
> def setval(a):
> a = 12345
>
> x = 1
> setval(x)
> print x
>
Yes, and it will doubtless be subject to exactly the same bogus refutations.

regards
Steve
--
Steve Holden +1 571 484 6266 +1 800 494 3119
PyCon is coming! Atlanta, Feb 2010 http://us.pycon.org/
Holden Web LLC http://www.holdenweb.com/
UPCOMING EVENTS: http://holdenweb.eventbrite.com/

== 6 of 10 ==
Date: Fri, Feb 12 2010 3:30 pm
From: Antoine Pitrou


Le Fri, 12 Feb 2010 23:49:38 +0100, Alf P. Steinbach a écrit :
>
> The main reason for not using that term for Python is that "pass by
> reference" has the extremely strong connotation of being able to
> implement 'swap'.

But 'swap' is so easy to write as a one-line statement that it's foolish
to want to make a Python function for it...

cheers

Antoine.


== 7 of 10 ==
Date: Fri, Feb 12 2010 3:55 pm
From: Gregory Ewing


Steven D'Aprano wrote:

> Python's calling convention already has an well-established name,
> established over thirty years ago by the distinguished computer scientist
> Barbara Liskov, namely call-by-sharing.

And she was mistaken in thinking it needed a new name.

--
Greg


== 8 of 10 ==
Date: Fri, Feb 12 2010 4:05 pm
From: rantingrick


On Feb 12, 4:10 pm, Steve Holden <st...@holdenweb.com> wrote:
> Antoine Pitrou wrote:
> > Le Fri, 12 Feb 2010 17:14:57 +0000, Steven D'Aprano a écrit :

On Feb 12, 4:10 pm, Steve Holden <st...@holdenweb.com> wrote:
> Antoine Pitrou wrote:
> > Le Fri, 12 Feb 2010 17:14:57 +0000, Steven D'Aprano a écrit :

Steve,
Why do so many of your posts come in as doubles and triples. Is this a
case of "studdering click finger" of some fault of your newsreader?

-- concerned fellow pythonista...


== 9 of 10 ==
Date: Fri, Feb 12 2010 4:31 pm
From: Robert Kern


On 2010-02-12 17:30 PM, Antoine Pitrou wrote:
> Le Fri, 12 Feb 2010 23:49:38 +0100, Alf P. Steinbach a écrit :
>>
>> The main reason for not using that term for Python is that "pass by
>> reference" has the extremely strong connotation of being able to
>> implement 'swap'.
>
> But 'swap' is so easy to write as a one-line statement that it's foolish
> to want to make a Python function for it...

Yes, but that's besides the point. The exercise at hand is to classify the
semantic behavior of the function call syntax with respect to its arguments.
Being able to implement swap() as a function is a distinguishing feature of the
kind of function call semantics that the computer science community has named
"call by reference."

--
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret it as though it had
an underlying truth."
-- Umberto Eco

== 10 of 10 ==
Date: Fri, Feb 12 2010 4:55 pm
From: Gregory Ewing


Antoine Pitrou wrote:

> It's just that assignment ("=") means a different thing in Python than in
> non-object languages (or fake-object languages such as C++ or PHP): it
> rebinds instead of mutating in-place. If it mutated, you wouldn't have
> the AssertionError.

It doesn't really have anything to do with assignment semantics.
The essence of pass-by-reference is that the formal parameter
name becomes an alias for the actual parameter in all respects.
Whatever the semantics of assignment, you can come up with
variations of the language that either do or don't support
pass-by-reference in this sense. It's an orthogonal issue.

--
Greg

==============================================================================
TOPIC: python crash on windows but not on linux
http://groups.google.com/group/comp.lang.python/t/7d380bb24fe5e8b8?hl=en
==============================================================================

== 1 of 1 ==
Date: Fri, Feb 12 2010 2:46 pm
From: Rob Williscroft


hjebbers wrote in news:2864756a-292b-4138-abfd-
3348b72b7e9a@u9g2000yqb.googlegroups.com in comp.lang.python:

> the information about the error is a windows dump.

This may help:

# http://msdn.microsoft.com/en-us/library/ms680621(VS.85).aspx

SEM_FAILCRITICALERRORS = 1
SEM_NOALIGNMENTFAULTEXCEPT = 4
SEM_NOGPFAULTERRORBOX = 4
SEM_NOOPENFILEERRORBOX = 8


import ctypes
from ctypes.wintypes import UINT

SetErrorMode = ctypes.windll.kernel32.SetErrorMode
SetErrorMode.restype = UINT
SetErrorMode.argtypes = ( UINT,)

Then putting:

SetErrorMode( SEM_FAILCRITICALERRORS | SEM_NOGPFAULTERRORBOX )

at the start of you programme, should stop the "Critical Error" dialog
box you are seeing and you may get a chance to see a traceback.

Rob.

==============================================================================
TOPIC: intolerant HTML parser
http://groups.google.com/group/comp.lang.python/t/92752c2c44f54552?hl=en
==============================================================================

== 1 of 1 ==
Date: Fri, Feb 12 2010 4:02 pm
From: Jim


I want to thank everyone for the help, which I found very useful (the
parts that I understood :-) ).

Since I think there was some question, it happens that I am working
under django and submitting a certain form triggers an html mail. I
wanted to validate the html in some of my unit tests. It is only
about 30 lines of html so I think I'll take a pass on automated html
generation, but FWIW the intolerant parser found a couple of errors.

Thanks again,
Jim

==============================================================================
TOPIC: Configuring apache to execute python scripts using mod_python handler
http://groups.google.com/group/comp.lang.python/t/77e6f8532657b390?hl=en
==============================================================================

== 1 of 1 ==
Date: Fri, Feb 12 2010 4:18 pm
From: Kev Dwyer


On Fri, 12 Feb 2010 13:08:59 -0400, Juan Carlos Rodriguez wrote:

Hello Juan Carlos,

You're better off raising this on the mod_python list, however...

Python is looking for a module called mptest, and cannot find it.

Have you created the mptest.py module? (It should contain the handler function
in your item (2)).

Is it on the python path used by the webserver? See for example the last post
at
http://forums.devshed.com/apache-development-15/installing-python-on-apache-42184.html
which shows how you can set up the path.

Cheers,

Kev

==============================================================================
TOPIC: MemoryError, can I use more?
http://groups.google.com/group/comp.lang.python/t/0944e954b29aa311?hl=en
==============================================================================

== 1 of 3 ==
Date: Fri, Feb 12 2010 4:21 pm
From: "Echavarria Gregory, Maria Angelica"


Dear group:

I am developing a program using Python 2.5.4 in windows 32 OS. The amount of data it works with is huge. I have managed to keep memory footprint low, but have found that, independent of the physical RAM of the machine, python always gives the MemoryError message when it has occupied exactly only 2.2 GB. I have tested this in 4 different machines, all with memory of 3 to 4 GB... I'm amazed.

Could any of you please help me to figure out how to change that limit? I typed help(MemoryError) and it is a class itself, but that help told me nothing I can use...

Thanks,
Angelica.


== 2 of 3 ==
Date: Fri, Feb 12 2010 4:58 pm
From: "ssteinerX@gmail.com"

On Feb 12, 2010, at 7:21 PM, Echavarria Gregory, Maria Angelica wrote:

> Dear group:
>
> I am developing a program using Python 2.5.4 in windows 32 OS. The amount of data it works with is huge. I have managed to keep memory footprint low, but have found that, independent of the physical RAM of the machine, python always gives the MemoryError message when it has occupied exactly only 2.2 GB. I have tested this in 4 different machines, all with memory of 3 to 4 GB... I'm amazed.
>
> Could any of you please help me to figure out how to change that limit? I typed help(MemoryError) and it is a class itself, but that help told me nothing I can use...

How are you determining that it has occupied "exactly only 2.2GB?"

S

== 3 of 3 ==
Date: Fri, Feb 12 2010 5:00 pm
From: Mark Lawrence


Echavarria Gregory, Maria Angelica wrote:
> Dear group:
>
> I am developing a program using Python 2.5.4 in windows 32 OS. The amount of data it works with is huge. I have managed to keep memory footprint low, but have found that, independent of the physical RAM of the machine, python always gives the MemoryError message when it has occupied exactly only 2.2 GB. I have tested this in 4 different machines, all with memory of 3 to 4 GB... I'm amazed.
>
> Could any of you please help me to figure out how to change that limit? I typed help(MemoryError) and it is a class itself, but that help told me nothing I can use...
>
> Thanks,
> Angelica.
Please check the archives for the thread Please help with MemoryError,
it was only posted a day or two back. It's a problem specific to Windows.

Kindest regards.

Mark Lawrence.


==============================================================================
TOPIC: Dreaming of new generation IDE
http://groups.google.com/group/comp.lang.python/t/e019614ea149e7bd?hl=en
==============================================================================

== 1 of 2 ==
Date: Fri, Feb 12 2010 4:35 pm
From: aahz@pythoncraft.com (Aahz)


In article <mailman.2085.1265546107.28905.python-list@python.org>,
Steve Holden <steve@holdenweb.com> wrote:
>bartc wrote:
>> "Arnaud Delobelle" <arnodel@googlemail.com> wrote in message
>> news:m28wb6ypfs.fsf@googlemail.com...
>>> "Gabriel Genellina" <gagsl-py2@yahoo.com.ar> writes:
>>>>
>>>> Note the *literal* part. If you (the programmer) is likely to know the
>>>> parameter value when writing the code, then the function is actually two
>>>> separate functions.
>>>
>>> Thanks, I understand what Steve Holden meant now.
>>
>> I've just noticed that 'literal' part. But I think I still disagree.
>>
>> For a real-world example, it means instead of having a room with a
>> light-switch in it, if I *know* I want the light on or off, I should
>> have two rooms: one with the light permanently on, and one with it
>> permanently off, and just walk into the right one.
>
>Congratulations. That has to be the most bogus analogy I've seen on
>c.l.py this year.

Aww, c'mon, it's less than two months into the year, don't be so
hyperbolic.
--
Aahz (aahz@pythoncraft.com) <*> http://www.pythoncraft.com/

"At Resolver we've found it useful to short-circuit any doubt and just
refer to comments in code as 'lies'. :-)"


== 2 of 2 ==
Date: Fri, Feb 12 2010 5:06 pm
From: aahz@pythoncraft.com (Aahz)


In article <4b743340$0$20738$426a74cc@news.free.fr>,
Bruno Desthuilliers <bruno.42.desthuilliers@websiteburo.invalid> wrote:
>
>Ever read "worst is better" ?-)

Nope -- maybe you mean "worse is better"?

http://www.jwz.org/doc/worse-is-better.html

(Nitpicking because you need the correct term to search.)
--
Aahz (aahz@pythoncraft.com) <*> http://www.pythoncraft.com/

"At Resolver we've found it useful to short-circuit any doubt and just
refer to comments in code as 'lies'. :-)"

==============================================================================
TOPIC: pyparsing wrong output
http://groups.google.com/group/comp.lang.python/t/1d0719aa2f2e6e44?hl=en
==============================================================================

== 1 of 1 ==
Date: Fri, Feb 12 2010 4:41 pm
From: "Gabriel Genellina"


En Fri, 12 Feb 2010 10:41:40 -0300, Eknath Venkataramani
<eknath.iyer@gmail.com> escribió:

> I am trying to write a parser in pyparsing.
> Help Me. http://paste.pocoo.org/show/177078/ is the code and this is
> input
> file: http://paste.pocoo.org/show/177076/ .
> I get output as:
> <generator object at 0xb723b80c>

There is nothing wrong with pyparsing here. scanString() returns a
generator, like this:

py> g = (x for x in range(20) if x % 3 == 1)
py> g
<generator object <genexpr> at 0x00E50D78>

A generator is like a function that may be suspended and restarted. It
yields one value at a time, and only runs when you ask for the next value:

py> next(g)
1
py> next(g)
4

You may use a `for` loop to consume the generator:

py> for i in g:
... print i
...
7
10
13
16
19

Once it run to exhaustion, asking for more elements always raises
StopIteration:

py> next(g)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
StopIteration

Try something like this:

results = x.scanString(filedata)
for result in results:
print result

See http://docs.python.org/tutorial/classes.html#generators

--
Gabriel Genellina


==============================================================================
TOPIC: Helpp I want view page .py on apache WHAT CAN I DO???????????????
http://groups.google.com/group/comp.lang.python/t/fe344315c27e6106?hl=en
==============================================================================

== 1 of 1 ==
Date: Fri, Feb 12 2010 5:03 pm
From: "Gabriel Genellina"


Hola!

En Fri, 12 Feb 2010 14:34:33 -0300, Juan Carlos Rodriguez
<jcquevedo84@gmail.com> escribió:

> ImportError: No module named mptest

Hay una lista en castellano sobre Python:
http://python.org.ar/pyar/ListaDeCorreo

--
Gabriel Genellina

==============================================================================

You received this message because you are subscribed to the Google Groups "comp.lang.python"
group.

To post to this group, visit http://groups.google.com/group/comp.lang.python?hl=en

To unsubscribe from this group, send email to comp.lang.python+unsubscribe@googlegroups.com

To change the way you get mail from this group, visit:
http://groups.google.com/group/comp.lang.python/subscribe?hl=en

To report abuse, send email explaining the problem to abuse@googlegroups.com

==============================================================================
Google Groups: http://groups.google.com/?hl=en

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate