"Steve Holden" <[EMAIL PROTECTED]> wrote:
> PS: Revision question: How many objects of type NoneType are there?
You ask the damnesd Questions.
There must be millions of the little buggers out there, with the population
shifting incessantly as instances of the interpreter are started, and die..
"Steve Holden" wrote:
> Steven D'Aprano wrote:
> [...]
> >
> > Forth method: create identical gazelles, then modify them:
> >
> > list_of_beasties = [Gazelle(defaults) for i in xrange(1000)]
> > for i, beastie in enumerate(xrange(1000)):
> > list_of_beasties[i] = modify(beastie)
> >
> N
jim-on-linux wrote:
> On Wednesday 18 April 2007 17:02, Tim Golden
> wrote:
>> jim-on-linux wrote:
>>> python help,
>>>
>>> A client is using win xp home.
>>>
>>> my program contains;
>>>shutil.copyfile(n, 'prn')
>>>
>>> This runs fine on win xp pro but they are
>>> getting the following trac
Dear all,
I'm looking into launching python in parallel using MPI. There are many
projects already doing this but I would like to understand how this can
be done in a portable way.
For instance, is it possible to launch myscript.py (which calls MPI_Init
through an extension module) like:
mpir
On 2007-04-19, Steve Holden <[EMAIL PROTECTED]> wrote:
> Antoon Pardon wrote:
>> On 2007-04-19, Steve Holden <[EMAIL PROTECTED]> wrote:
>>> Michael Bentley wrote:
On Apr 19, 2007, at 4:11 AM, Antoon Pardon wrote:
> On 2007-04-19, Michael Bentley <[EMAIL PROTECTED]> wrote:
>>> [...] T
On 2007-04-19, Wayne Brehaut <[EMAIL PROTECTED]> wrote:
> On 19 Apr 2007 10:54:20 GMT, Antoon Pardon <[EMAIL PROTECTED]>
> wrote:
>
>>On 2007-04-19, Michael Bentley <[EMAIL PROTECTED]> wrote:
>>>
>>> On Apr 19, 2007, at 4:11 AM, Antoon Pardon wrote:
>>>
On 2007-04-19, Michael Bentley <[EMAIL P
On 2007-04-19, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> On Apr 19, 6:54 am, Antoon Pardon <[EMAIL PROTECTED]> wrote:
>> I don't know how you come to the conclusion that it is a mathematical
>> absurdity but consider this: If you find that common usage propagates
>> something that is incorrect
On 2007-04-20, Nigel Rowe <[EMAIL PROTECTED]> wrote:
> On Thu, 19 Apr 2007 19:11, Antoon Pardon wrote in comp.lang.python:
>> On 2007-04-19, Michael Bentley <[EMAIL PROTECTED]> wrote:
>
>
>
>>> The learning curve is rather steep IMO, but worth it.
>>
>> Just a throw in remark, that you may ignore
In <[EMAIL PROTECTED]>, John Nagle wrote:
> Many cases are easy. If a smart compiler sees
>
> for i in range(n) :
> ... # something
>
> and there are no other assignments to "i", then it's clear that
> "i" can be represented as an integer, without "boxing" into a
> general ob
Hi,
I am facing an issue in daemonizing a thread using setDaemon method.
Here is my code-
import time
from threading import Thread
class MThread(Thread):
def run(self):
f = open('/tmp/t.log', 'w')
for i in range(10):
f.write('Iteration %d\n' % i)
time.
On Apr 20, 2:03 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> Hi,
>
> Red hat 4 comes with python 2.3, and I am trying to upgrade to python
> 2.4. So I download and compile the source of python2.4.
>
> But as I run it I get the following error, can you please tell me how
> to fix it?
>
> # /
In <[EMAIL PROTECTED]>, Alex Martelli wrote:
> Jorgen Grahn <[EMAIL PROTECTED]> wrote:
>
>> As a C and C++ programmer (not a C/C++ programmer), I have to say that
>
> Yeah, I wonder, what's C divided by C++ -- maybe about 0.731...?
Isn't it 1 unless `C` is 0? The increment happens after the di
In <[EMAIL PROTECTED]>, Isaac
Rodriguez wrote:
> But the truth is that C++ and Java made a decision to do that for a
> reason, and the times when you have to work around those language
> features come once in a blue moon; they are the exception, not the
> rule, and you don't implement features in
En Fri, 20 Apr 2007 00:41:04 -0300, Alex Martelli <[EMAIL PROTECTED]> escribió:
> Jorgen Grahn <[EMAIL PROTECTED]> wrote:
>
>> As a C and C++ programmer (not a C/C++ programmer), I have to say that
>
> Yeah, I wonder, what's C divided by C++ -- maybe about 0.731...?
C/C++ == 1 most of the time (b
Antoon Pardon schreef:
> On 2007-04-19, Wayne Brehaut <[EMAIL PROTECTED]> wrote:
>> So the remark that " a steep learning curve means that the subject is
>> easily familiarized and that the learning period is short" is
>> completely incorrect on two points (i.e., all points that are
>> relevant): f
Antoon Pardon wrote:
>> a) In English, "learning curve" is not restricted to a mathematical
>> plot--Webster's also defines it as "the course of progress made in
>> learning something". In that context, adding the adjective steep
>> ("extremely or excessively high...STEEP implies such sharpness of
Morning Steve,
That stuff looks mighty promising, I did play around with the toString()
function yesterday but couldn't get the damned thing working. The syntax has
me a little muddled, perhaps you can help out on this by taking a look at my
code.
#!/usr/bin/python
import dbus
bus = db
Antoon Pardon wrote:
> On 2007-04-19, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>> On Apr 19, 6:54 am, Antoon Pardon <[EMAIL PROTECTED]> wrote:
>>> I don't know how you come to the conclusion that it is a mathematical
>>> absurdity but consider this: If you find that common usage propagates
>>>
I am trying to implement Domain Keys
(http://domainkeys.sourceforge.net/) in Python.
In Perl I would just use Crypt:RSA which has a sign
method with an armour option which generates exactly
what I want but I can't find a way of doing this in
Python.
I tried this:
from M2Crypto import RSA
key = R
Marc 'BlackJack' Rintsch wrote:
> In <[EMAIL PROTECTED]>, John Nagle wrote:
>
>> Many cases are easy. If a smart compiler sees
>>
>> for i in range(n) :
>> ... # something
>>
>> and there are no other assignments to "i", then it's clear that
>> "i" can be represented as an intege
On 2007-04-20, Roel Schroeven <[EMAIL PROTECTED]> wrote:
> Antoon Pardon schreef:
>> On 2007-04-19, Wayne Brehaut <[EMAIL PROTECTED]> wrote:
>>> So the remark that " a steep learning curve means that the subject is
>>> easily familiarized and that the learning period is short" is
>>> completely inc
On 2007-04-20, Steve Holden <[EMAIL PROTECTED]> wrote:
> Antoon Pardon wrote:
>> On 2007-04-19, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>>> On Apr 19, 6:54 am, Antoon Pardon <[EMAIL PROTECTED]> wrote:
I don't know how you come to the conclusion that it is a mathematical
absurdity but
On 20 Apr, 07:02, Neil Hodgson <[EMAIL PROTECTED]> wrote:
> Adam Olsen:
>
> > To solve this I propose Python's unicode type using UTF-16 should have
> > gaps in its index, allowing it to only expose complete unicode scalar
> > values. Iteration would produce surrogate pairs rather than
> > individ
Nigel Rowe a écrit :
> On Thu, 19 Apr 2007 19:11, Antoon Pardon wrote in comp.lang.python:
>> On 2007-04-19, Michael Bentley <[EMAIL PROTECTED]> wrote:
>
>
>
>>> The learning curve is rather steep IMO, but worth it.
>> Just a throw in remark, that you may ignore if you wish, but a steep
>> lear
On 20 Apr, 09:21, Antoon Pardon <[EMAIL PROTECTED]> wrote:
>
> Indeed I have no wish to bow before common usage.
Then nobody will understand you properly if you start referring to a
"steep learning curve" when in their terminology you actually mean a
"shallow learning curve". Certainly, this discu
Stephen M. Gava wrote:
> On Thu, 19 Apr 2007 06:09:33 -0700, kyosohma wrote:
>
> > On Apr 19, 6:29 am, "Stephen M. Gava" <[EMAIL PROTECTED]>
> > wrote:
> >> Hi all,
> >>
> >> I prefer using tkinter to wxpython (so sue me :) and i need to display
> >> a lot of html in a particular app. does anyone
[EMAIL PROTECTED] wrote:
> This one gets the order wrong. With
>
> def test():
> L = 1, 2, 3, 'a', 4, 'a', 5, 'a', 6, 'a'
> it1, it2 = xsplitter(L, lambda x: x == 'a')
> print it1.next()
> print it2.next()
> print it1.next()
> print it2.next()
> print it1.next()
>
Ramashish Baranwal schrieb:
> Hi,
>
> I am facing an issue in daemonizing a thread using setDaemon method.
> Here is my code-
>
> import time
> from threading import Thread
>
> class MThread(Thread):
> def run(self):
> f = open('/tmp/t.log', 'w')
> for i in range(10):
>
Look at:
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/466298
it handles most of the logic of combining IP ranges.
Eddie
--
http://mail.python.org/mailman/listinfo/python-list
Antoon Pardon wrote:
> On 2007-04-20, Steve Holden <[EMAIL PROTECTED]> wrote:
>> Antoon Pardon wrote:
>>> On 2007-04-19, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
On Apr 19, 6:54 am, Antoon Pardon <[EMAIL PROTECTED]> wrote:
> I don't know how you come to the conclusion that it is a math
"Steve Holden" <[EMAIL PROTECTED]> wrote:
> Perhaps in Belgium they prefer climbing mountains over walking up and
> down gentle hills?
Mountains ? Hills ? In Belgium ??
Its not called the battlefield of Europe for nothing...
- Hendrik
--
http://mail.python.org/mailman/listinfo/python-
I am having problems with os.rename on AIX
The source file definately exists and the target file does not.
However the rename always generates an OSerror exception. I can do
the rename via a mv statement at the AIX command line with no problem.
How can I get more info what the cause of the OSE
On 2007-04-20, Steve Holden <[EMAIL PROTECTED]> wrote:
> Antoon Pardon wrote:
>> On 2007-04-20, Steve Holden <[EMAIL PROTECTED]> wrote:
>>> Antoon Pardon wrote:
On 2007-04-19, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> On Apr 19, 6:54 am, Antoon Pardon <[EMAIL PROTECTED]> wrote:
>>
Hello,
I need to implement timeout for execute method in Mysql queries. I am using
MySQLdb.
I have tried it:
signal.signal(signal.SIGALRM,handler)
signal.alarm(1)
cursor.execute(sql)
signal.alarm(0)
But handler is never executed. In other example (changing cursor.execute by
time
Antoon Pardon schrieb:
> On 2007-04-19, Steve Holden <[EMAIL PROTECTED]> wrote:
>> Antoon Pardon wrote:
>>> On 2007-04-19, Steve Holden <[EMAIL PROTECTED]> wrote:
Michael Bentley wrote:
> On Apr 19, 2007, at 4:11 AM, Antoon Pardon wrote:
>
>> On 2007-04-19, Michael Bentley <[EMAIL
On Apr 19, 2007, at 11:00 PM, Alex Martelli wrote:
> Alan Isaac <[EMAIL PROTECTED]> wrote:
>
>> currently documented behavior:
>> "objects of different types always compare unequal".
>
> Where is that documented? URL please?
>
1.0 == 1
> True
type(1.0), type(1)
> (, )
>
Isn't this an
On 20 huhti, 14:34, [EMAIL PROTECTED] (Eddie Corns) wrote:
> Look at:http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/466298
> it handles most of the logic of combining IP ranges.
>
> Eddie
I'm getting error:
Traceback (most recent call last):
File "ipr.py", line 5, in
x = ipv4.IP4Ra
Hi,
we have one to add:
the french speaking python days
http://journees.afpy.org/
2/3 June - Paris - France
Regards
On 19 Apr 2007 18:43:23 -0700, TechVenue Eventmaster <[EMAIL PROTECTED]>
wrote:
FYI All,
International Python user groups events calendar:
http://TechVenue.com/Calendars/Pyt
Thanks for that Carsten,
I've given that a go and I still get similar results to what I've seen in the
past whereby it prints a couple of elements I would expect to see but other
which I'm not sure about, and what seems to be ALOT of blank characters.
6e
555 5 5
On 2007-04-20, Diez B. Roggisch <[EMAIL PROTECTED]> wrote:
>> So if you have the choice between a steep or a shalow income curve
>> you will prefer the shalow curve because a steep curve makes you
>> think about verticale clifs and such?
>>
>> The analogy with a walk is just silly because curves a
On Apr 20, 2007, at 9:22 AM, Antoon Pardon wrote:
> Well if you want to do it that way, nobody can stop you, but people
> in the habit of processing numbers usually put the time on the X-axis
> like in time spend learning or exercising and put the other value
> on the Y-axis.
>
> That is because
Stephen M. Gava wrote:
> Hi all,
>
> I prefer using tkinter to wxpython (so sue me :) and i need to display a
> lot of html in a particular app. does anyone know if one of the existing
> add on tk html widgets have been wrapped for tkinter already?
>
> TIA for any reply,
> Stephen
PySol has an
Hendrik van Rooyen schreef:
> "Steve Holden" <[EMAIL PROTECTED]> wrote:
>
>
>> Perhaps in Belgium they prefer climbing mountains over walking up and
>> down gentle hills?
>
> Mountains ? Hills ? In Belgium ??
>
> Its not called the battlefield of Europe for nothing...
I'm not sure if th
"Ramashish Baranwal" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I was also wondering about "daemonizing" a thread, but I interpreted
> that it would daemonize the process which it didn't. I think setDaemon
> should be renamed to setDetached or something similar.
Neither is pa
Jarek Zgoda wrote:
> I am not a hacker, just a software developer, but I'd have no problems
> in either installing PyGTK on Ubuntu box (sudo apt-get install
> python-gtk2, but it's installed by default anyway) or on Windows XP
> machine (double click on installer icon). "Simple user" is not an idio
[EMAIL PROTECTED] a écrit :
> Hello. Please tell me whether this feature request is sane (and not
> done before) for python so it can be posted to the python-dev mailing
> list. I should say first that I am not a professional programmer with
> too much technical knowledge.
>
> I would like to have
On Apr 19, 9:05 pm, Steve Holden <[EMAIL PROTECTED]> wrote:
> 7stud wrote:
> > On Apr 19, 1:38 pm, Tyler <[EMAIL PROTECTED]> wrote:
>
> [after quoting umpteen lines of code]
>
>
>
>
>
> > You can do this:
>
> > ---
> > class MyFrame(wx.Frame):
>
> > ..
> > ..
> > ..
> > def OnSubmit(self, event
[EMAIL PROTECTED] wrote:
> On Apr 20, 12:06 am, Steve Holden <[EMAIL PROTECTED]> wrote:
>> [EMAIL PROTECTED] wrote:
[about httplib problems]
>>
>> If so, would it be a usable workaround just to use the 2.4 httplib for
>> that one program?
>>
>
> Thanks. Can you please tell me how can I 'borrow' a
orangeDinosaur wrote:
> Hi,
>
> I am exploring the possibility of using python as a replacement of
> MATLAB when I leave school. So, I've been playing with matplotlib and
> have run into some weird behavior after recently installing python
> 2.5.1 and matplotlib 0.90 on my Windows XP machine. Her
Tommy Grav <[EMAIL PROTECTED]> wrote:
> On Apr 19, 2007, at 11:00 PM, Alex Martelli wrote:
>
> > Alan Isaac <[EMAIL PROTECTED]> wrote:
> >
> >> currently documented behavior:
> >> "objects of different types always compare unequal".
> >
> > Where is that documented? URL please?
> >
> 1.0 ==
Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote:
> In <[EMAIL PROTECTED]>, Isaac
> Rodriguez wrote:
>
> > But the truth is that C++ and Java made a decision to do that for a
> > reason, and the times when you have to work around those language
> > features come once in a blue moon; they are th
On Apr 20, 3:21 am, Ramashish Baranwal <[EMAIL PROTECTED]>
wrote:
> On Apr 20, 2:03 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
>
> > Hi,
>
> > Red hat 4 comes with python 2.3, and I am trying to upgrade to python
> > 2.4. So I download and compile the source of python2.4.
>
> > But as I run
"Michael Hoffman" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>> Neither is particularly intuitive; it just depends whether you are more
>> familiar with the Posix terminology or the Java one. I personally prefer
>> detached but there is little chance of a name change now.
>
> Wh
Richard Brodie wrote:
> "Michael Hoffman" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
>
>>> Neither is particularly intuitive; it just depends whether you are more
>>> familiar with the Posix terminology or the Java one. I personally prefer
>>> detached but there is little chanc
On Apr 20, 12:06 am, Steve Holden <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] wrote:
> > On Apr 19, 2:39 pm, Steve Holden <[EMAIL PROTECTED]> wrote:
> >> [EMAIL PROTECTED] wrote:
> >>> Hi,
> >>> I have the following code which send/receive HTTP request/response:
> >>># where sampleUrl is '12
On Fri, 2007-04-20 at 14:39 +0100, Robert Rawlins - Think Blue wrote:
> Thanks for that Carsten,
>
> I've given that a go and I still get similar results to what I've seen in the
> past whereby it prints a couple of elements I would expect to see but other
> which I'm not sure about, and what se
[EMAIL PROTECTED] wrote:
> On Apr 19, 9:05 pm, Steve Holden <[EMAIL PROTECTED]> wrote:
>> 7stud wrote:
>>> On Apr 19, 1:38 pm, Tyler <[EMAIL PROTECTED]> wrote:
>> [after quoting umpteen lines of code]
>>
>>
>>
>>
>>
>>> You can do this:
>>> ---
>>> class MyFrame(wx.Frame):
>>> ..
>>> ..
>>> ..
>>>
Thanks Tim for resopnding,
I appreciate the help.
I convinced the client to install Linux on 4
machines rather than upgrade from xp home to XP
Pro, and more machines to come if the like it.
jim-on-linux
On Friday 20 April 2007 03:22, you wrote:
> jim-on-linux wrote:
> > On Wednesday 18 April
=?iso-8859-1?q?Pekka_J=E4rvinen?= <[EMAIL PROTECTED]> writes:
>On 20 huhti, 14:34, [EMAIL PROTECTED] (Eddie Corns) wrote:
>> Look at:http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/466298
>> it handles most of the logic of combining IP ranges.
>>
>> Eddie
>I'm getting error:
>Traceback (m
Antoon Pardon <[EMAIL PROTECTED]> wrote:
> On 2007-04-20, Max Erickson <[EMAIL PROTECTED]> wrote:
>>
>> If we are being pedantic about describing a curve that shows the
>> progress of a person in learning a topic, there is no arguing
>> with you, a steep curve describes fast uptake and is a good
>
On 2007-04-20, Paul Boddie <[EMAIL PROTECTED]> wrote:
> On 20 Apr, 15:22, Antoon Pardon <[EMAIL PROTECTED]> wrote:
>> On 2007-04-20, Diez B. Roggisch <[EMAIL PROTECTED]> wrote:
>>
>> > Which is nonsense. The goal is to go from A - ignorance - to B -
>> > knowledge - which both lie on the X-Axis.
>>
Richard Brodie wrote:
> "Ramashish Baranwal" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
>
>> I was also wondering about "daemonizing" a thread, but I interpreted
>> that it would daemonize the process which it didn't. I think setDaemon
>> should be renamed to setDetached or som
> The thoughts of the inventor of Python on "Adding Optional Static
> Typing to Python" are at
> http://www.artima.com/weblogs/viewpost.jsp?thread=86641
> . I wonder if the idea will be implemented in Python 3.0.
No. He says it in another newer post and in PEP 3099, AFAIK.
--
EduardoOPadoan (e
Antoon Pardon <[EMAIL PROTECTED]> wrote:
>>> Just asserting how something can make a difference withouth
>>> arguing how in the particular case it actucally makes a
>>> difference is just a divertion tactic without real merrit.
>>>
>> In the face of a notion that all steep curves determining
>> "p
On 20 Apr, 16:34, Antoon Pardon <[EMAIL PROTECTED]> wrote:
> On 2007-04-20, Paul Boddie <[EMAIL PROTECTED]> wrote:
>
> > You could have knowledge or accomplishment
> > on the X axis and effort or work on the Y axis.
>
> What else is effort than the time you spent on it?
What's the difference betwe
On 20 Apr, 15:22, Antoon Pardon <[EMAIL PROTECTED]> wrote:
> On 2007-04-20, Diez B. Roggisch <[EMAIL PROTECTED]> wrote:
>
> > Which is nonsense. The goal is to go from A - ignorance - to B -
> > knowledge - which both lie on the X-Axis.
>
> Well if you want to do it that way, nobody can stop you, b
On Apr 19, 9:05 pm, Steve Holden <[EMAIL PROTECTED]> wrote:
> 7stud wrote:
> > On Apr 19, 1:38 pm, Tyler <[EMAIL PROTECTED]> wrote:
>
> [after quoting umpteen lines of code]
>
>
>
>
>
> > You can do this:
>
> > ---
> > class MyFrame(wx.Frame):
>
> > ..
> > ..
> > ..
> > def OnSubmit(self, event
When I "from foo import *" in my __init__.py, sometimes module foo's
docs will be expanded in the pydocs. It seems to depend in what
language foo was implemented.
For example, if you "from math import *" in your __init__.py, you will
see math's members will appear in the resulting pydocs, as thoug
On Apr 14, 6:21 am, [EMAIL PROTECTED] wrote:
> Hello. Please tell me whether this feature request is sane (and not
> done before) for python so it can be posted to the python-dev mailing
> list. I should say first that I am not a professional programmer with
> too much technical knowledge.
>
> I wo
On 2007-04-20, Paul Boddie <[EMAIL PROTECTED]> wrote:
> On 20 Apr, 09:21, Antoon Pardon <[EMAIL PROTECTED]> wrote:
>>
>> Indeed I have no wish to bow before common usage.
>
> Then nobody will understand you properly if you start referring to a
> "steep learning curve" when in their terminology you
loial wrote:
> How can I get more info what the cause of the OSError exception is?
For starters, post the traceback here.
--
Michael Hoffman
--
http://mail.python.org/mailman/listinfo/python-list
On Fri, 2007-04-20 at 09:51 +0100, Robert Rawlins - Think Blue wrote:
> Morning Steve,
>
>
>
> That stuff looks mighty promising, I did play around with the
> toString() function yesterday but couldn’t get the damned thing
> working.
That's because Steven seems to have given you suboptimal adv
> > Hi,
>
> > I am facing an issue in daemonizing a thread using setDaemon method.
> > Here is my code-
>
> > import time
> > from threading import Thread
>
> > class MThread(Thread):
> > def run(self):
> > f = open('/tmp/t.log', 'w')
> > for i in range(10):
> > f.wr
On 2007-04-20, Max Erickson <[EMAIL PROTECTED]> wrote:
>
> If we are being pedantic about describing a curve that shows the
> progress of a person in learning a topic, there is no arguing with
> you, a steep curve describes fast uptake and is a good thing.
>
> If we are being pedantic about what
In article <[EMAIL PROTECTED]>,
Andrew Veitch <[EMAIL PROTECTED]> wrote:
> I am trying to implement Domain Keys
> (http://domainkeys.sourceforge.net/) in Python.
>
> In Perl I would just use Crypt:RSA which has a sign
> method with an armour option which generates exactly
> what I want but I can
I'm looking for some library to parse XML code
much faster than the libs built into Python 2.4
(I'm stuck with 2.4 for quite a while) and I
also need XML Schema validation, and would
appreciate support for e.g. XPath and XInclude.
I also want an API which is more Pythonic than
e.g. a thin wrapper o
Anton Vredegoor wrote:
> from collections import deque
>
> def xsplitter(seq, pred):
> Q = deque(),deque()
> it = iter(seq)
> def gen(p):
> for x in it:
> if pred(x) == p:
> Q[p].append(x)
> while Q[p]: yield Q[p].popleft()
>
Magnus Lycka wrote:
> I'm looking for some library to parse XML code
> much faster than the libs built into Python 2.4
> (I'm stuck with 2.4 for quite a while) and I
> also need XML Schema validation, and would
> appreciate support for e.g. XPath and XInclude.
> I also want an API which is more Pyt
Hi,
I am writing a GUI front end in Python using Tkinter. I have
developed the GUI in a grid and specified the size of the window. The
widgets are centered into the middle of the window. I would like them
to fill the window. I tried using the sticky=E+W+N+S option on the
widgets themselves and
Anton Vredegoor wrote:
> What's up here? Was it a fata morgana? Am I overlooking something?
Even more crazy version:
def xsplitter(seq, pred):
Q = deque(),deque()
it = iter(seq)
def gen(p):
for x in it:
Q[pred(x) == p].append(x)
while Q[p]: yiel
orangeDinosaur <[EMAIL PROTECTED]> writes:
> [...] But now, the figure window is completely unresponsive -- I
> can't even close it without getting the "your program is not
> repsonding" business. What am I missing? This behavior so far
> seems pretty unintuitive.
The best way out of this i
I really tried. I give up.
I got this one last time (for which I'm very grateful).
import calendar
months = dict([(month,ii) for ii,month in enumerate(calendar.month_abbr)][1:])
Now I want something that's going to give me a string whose value is the
set of all of the first letters of months. O
Magnus Lycka wrote:
> I'm looking for some library to parse XML code
> much faster than the libs built into Python 2.4
> (I'm stuck with 2.4 for quite a while) and I
> also need XML Schema validation, and would
> appreciate support for e.g. XPath and XInclude.
> I also want an API which is more Pyt
What is the benefit of clearing a dictionary, when you can just reassign
it as empty? Similarly, suppose I generate a new dictionary b, and need
to have it accessible from a. What is the best method, under which
circumstances?
>>> import some_function
>>> a = {1:2,3:4}
>>> b = {1:2:4:3}
Bill Jackson wrote the following on 04/20/2007 09:48 AM:
> >>> import some_function
>
> >>> a = {1:2,3:4}
> >>> b = {1:2:4:3}
> >>> a.clear()
> >>> a.update(b)
>
> >>> a = {1:2,3:4}
> >>> b = {1:2,4:3}
> >>> for key in b:
> a[key] = b[key]
Clearly, this won't have the same resul
In article <[EMAIL PROTECTED]>, Steven W. Orr wrote:
> Now I want something that's going to give me a string whose value is the
> set of all of the first letters of months. Order is not important.
"".join(set(m[0] for m in calendar.month_abbr[1:]))
> And for extra credit, I need the string whose
On 4/20/07, Steven W. Orr <[EMAIL PROTECTED]> wrote:
> I really tried. I give up.
>
> Now I want something that's going to give me a string whose value is the
> set of all of the first letters of months. Order is not important.
>>> ''.join(set([s[0] for s in calendar.month_abbr[1:]]))
'ADFJMONS'
Larry Bates wrote:
> I don't know if it meets ALL of your requirements but this might
> help:
>
> http://www.reportlab.org/pyrxp.html
AFAIK, there is no XML Schema support in PyRXP.
This is really bad enough.
GPL is not an option for us, and a commercial
licence is less good than e.g. MIT or LGP
Please help me think of an example where immutable tuples are
essential.
It seems that everywhere a tuple is used one could just as easily use
a list instead.
chris
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
> Please help me think of an example where immutable tuples are
> essential.
When used as dictionary keys (also everywhere else where they must
be in a constant order).
Yes, this *is* used in practice.
Regards,
Björn
--
BOFH excuse #14:
sounds like a Windows probl
On Apr 20, 2:06 pm, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:
> Please help me think of an example where immutable tuples are
> essential.
>
> It seems that everywhere a tuple is used one could just as easily use
> a list instead.
>
> chris
I don't remember exactly where I read about it, but
Anton Vredegoor wrote:
> def xsplitter(seq, pred):
> Q = deque(),deque()
> it = iter(seq)
> def gen(p):
> for x in it:
> Q[pred(x) == p].append(x)
> while Q[p]: yield Q[p].popleft()
> while Q[p]: yield Q[p].popleft()
> return gen(1)
Bill Jackson wrote:
> What is the benefit of clearing a dictionary, when you can just reassign
> it as empty?
If you have objects that point to the dictionary (something like a cache)
then you want to clear the existing dictionary instead of just assigning
it to empty. If nothing points to it, as
KDawg44 wrote:
> I am writing a GUI front end in Python using Tkinter. I have
> developed the GUI in a grid and specified the size of the window. The
> widgets are centered into the middle of the window. I would like them
> to fill the window. I tried using the sticky=E+W+N+S option on the
> w
OK, I'll go with the enthought installation. This seems to be the
path of least resistance. For those of you who have been in my
position, is there a reason NOT to go with the enthought installation
and do things piecemeal instead?
thanks,
trevis
On Apr 20, 11:36 am, Pete Forman <[EMAIL PROTECT
On Friday 20 April 2007 13:56, Anton Vredegoor
wrote:
> KDawg44 wrote:
> > I am writing a GUI front end in Python using
> > Tkinter. I have developed the GUI in a grid
> > and specified the size of the window. The
> > widgets are centered into the middle of the
> > window. I would like them to
Luis M. González wrote:
> I don't remember exactly where I read about it, but Guido said
> once that tuples are being kept mainly for historical reasons.
Weren't tuples added when lists already existed?
Regards,
Björn
--
BOFH excuse #101:
Collapsed Backbone
--
http://mail.python.org/mailm
On 20 huhti, 18:30, [EMAIL PROTECTED] (Eddie Corns) wrote:
> =?iso-8859-1?q?Pekka_J=E4rvinen?= <[EMAIL PROTECTED]> writes:
> >On 20 huhti, 14:34, [EMAIL PROTECTED] (Eddie Corns) wrote:
> >> Look at:http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/466298
> >> it handles most of the logic of c
orangeDinosaur wrote:
> OK, I'll go with the enthought installation. This seems to be the
> path of least resistance. For those of you who have been in my
> position, is there a reason NOT to go with the enthought installation
> and do things piecemeal instead?
>
> thanks,
> trevis
>
> On Apr 2
Dennis Lee Bieber wrote:
> Unless it should be interpreted as (C/C)++, which would result in
> 2
No, since postfix ++ "returns before and increments after". But what
you say is true for ++(C/C).
Regards,
Björn
--
BOFH excuse #274:
It was OK before you touched it.
--
http://mail.python.org
1 - 100 of 178 matches
Mail list logo