Re: Picture in Excel issue

2006-10-01 Thread Steve Holden
Jim Chiang wrote: > I’m trying to very simply insert a picture from a file into an excel > spreadsheet. I know how to do this in VBA and it works fine, however > when I try this from python I get an error. Doing a search on this > turned up nothing. > > The code I’m using is: > > from win32com

Re: strange append

2006-10-01 Thread Gary Herron
E.Nurminski wrote: > Hello to all good people > > I am new to the great Py so am quite puzzled by the following code > > --- > > res = [] > x = [ 1, 1 ] > for i in xrange(0,5): > res.append(x) > x[1] = x[1] + 1 > print "x = ", x > print "res = ", res > >

Re: PATCH: Speed up direct string concatenation by 20+%!

2006-10-01 Thread Fredrik Lundh
Larry Hastings wrote: > There are some improvements in this version. Specifically: > > * Python will no longer crash if you do ten million prepends > ( x = 'a' + x ). Since the problem was blowing the stack > with an incredibly deep render, I now limit the depth of > the string concatenat

Re: strange append

2006-10-01 Thread James Stroud
E.Nurminski wrote: > Hello to all good people > > I am new to the great Py so am quite puzzled by the following code > > --- > > res = [] > x = [ 1, 1 ] > for i in xrange(0,5): > res.append(x) > x[1] = x[1] + 1 > print "x = ", x > print "res = ", res > >

strange append

2006-10-01 Thread E.Nurminski
Hello to all good people I am new to the great Py so am quite puzzled by the following code --- res = [] x = [ 1, 1 ] for i in xrange(0,5): res.append(x) x[1] = x[1] + 1 print "x = ", x print "res = ", res --- Looks like it puts smth lik

Re: Problem with .next() method adding junk characters.

2006-10-01 Thread Rainy
John Machin wrote: > Rainy wrote: > > Hi, > > > > I tried searching for this and did not find this issue. I only looked > > at about dozen hits, I apologize if this is covered somewhere and I > > missed it. Without much further ado, here's the thing (Win, Py2.5): > > > > >>> f = open('test', 'w')

Re: windev vs python SOS

2006-10-01 Thread Ray
stéphane bard wrote: > hello, my boss ask me to prefer windev to python. > I have to argue > > any idea for a strong argument ? * WinDev is a virtual unknown outside France. I tried asking a bunch of colleagues about WinDev just now. Nobody has even heard about it. Prior to doing Java I was doing

Re: Problem with .next() method adding junk characters.

2006-10-01 Thread John Machin
Rainy wrote: > Hi, > > I tried searching for this and did not find this issue. I only looked > at about dozen hits, I apologize if this is covered somewhere and I > missed it. Without much further ado, here's the thing (Win, Py2.5): > > >>> f = open('test', 'w') > >>> f.fileno() > 4 > >>> f.write(

ANN: Urwid 0.9.7 - Console UI Library

2006-10-01 Thread Ian Ward
Announcing Urwid 0.9.7 -- Urwid home page: http://excess.org/urwid/ Tarball: http://excess.org/urwid/urwid-0.9.7.tar.gz About this release: === This release adds a new BigText widget for banners and text that needs to stand out on the screen. A new e

Re: PATCH: Speed up direct string concatenation by 20+%!

2006-10-01 Thread Larry Hastings
An update: I have submitted this as a patch on SourceForge. It's request ID #1569040. http://sourceforge.net/tracker/?group_id=5470&atid=305470 I invite everyone to take it for a spin! There are some improvements in this version. Specifically: * Python will no longer crash if you do ten

Problem with .next() method adding junk characters.

2006-10-01 Thread Rainy
Hi, I tried searching for this and did not find this issue. I only looked at about dozen hits, I apologize if this is covered somewhere and I missed it. Without much further ado, here's the thing (Win, Py2.5): >>> f = open('test', 'w') >>> f.fileno() 4 >>> f.write('1\n') >>> f.write('2\n3\n4\n')

Re: Simple but fast 2D lib for drawing pixels

2006-10-01 Thread davbrow
Peter Mexbacher wrote: > Hello, > > we want to teach absolute programming newbies > a first language, so they can start programming > simple scientific models. > > We thought Python would make a good choice for > a first language; but where pretty stumped when > we found out that there is no simpl

Re: Simple but fast 2D lib for drawing pixels

2006-10-01 Thread Richard Jones
Peter Mexbacher wrote: > We thought Python would make a good choice for > a first language; but where pretty stumped when > we found out that there is no simple way to draw > pixels to a screen. (This is needed for fractals, > agent-based models etc -> like Conways Game of Life) > [snip] > -) easy

Re: The Python world tries to be polite [formerly offensive to another language]

2006-10-01 Thread Ray
MonkeeSage wrote: > Ant wrote: > > Don't think so, I followed the thread along a little, and it seems to > > be correct. In addition, they seem to have the ¥ character as the Perl > > 6 equivalent of zip(). Those crazy guys. > > Yup, I don't think it was a joke either; there are several other > "h

Re: changing a file's permissions

2006-10-01 Thread Ben Finney
James <[EMAIL PROTECTED]> writes: > I'm writing a script in linux to excercise my python skills and have > encountered a minor issue. Writing the script and creating an ouput > file was simple enough and didn't take too long. However, I don't > have permissions to execute the file by default. Th

Re: XSLT speed comparisons

2006-10-01 Thread pyscripter
Jordan wrote: > If your using python 2.4.3 or essentially any of the 2.3, 2.4 series, > i'd test out PyScripter as an IDE, it's one of the best that I've used. > Unfortunately, they have yet to fully accomedate 2.5 code (you can > still write 2.5 code with almost no problems, but you won't be abl

Re: changing numbers to spellings

2006-10-01 Thread Paul McGuire
"Steve Holden" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > [EMAIL PROTECTED] wrote: >> Hey, >> >> Sorry to bother everybody again, but this group seems to have quite a >> few knowledgeable people perusing it. >> >> Here's my most recent problem: For a small project I am doing, I

Trying to find a elements Xpath and store it as a attribute

2006-10-01 Thread provowallis
Hi all, I've been struggling with this for a while so I'm hoping that someone could point me in the right direction. Here's my problem: I'm trying to get the XPath for a given node in my document and then store that XPath as an attribute of the element itself. If anyone has a recommendation I'd be

changing a file's permissions

2006-10-01 Thread James
I'm writing a script in linux to excercise my python skills and have encountered a minor issue.Writing the script and creating an ouput file was simple enough and didn't take too long. However, I don't have permissions to execute the file by default. Now, I could simply chmod 755 the sucker and hav

Picture in Excel issue

2006-10-01 Thread Jim Chiang
I’m trying to very simply insert a picture from a file into an excel spreadsheet. I know how to do this in VBA and it works fine, however when I try this from python I get an error. Doing a search on this turned up nothing. The code I’m using is: from win32com.client.dynamic import Dispat

Re: changing numbers to spellings

2006-10-01 Thread MonkeeSage
Tim Williams wrote: > my_nums = { 1 : 'One' , 2 : 'Two' , 3 : 'Three' , 4 : 'Four' } # etc etc > print my_nums[x] That's what I suggested, but since a list is already zero indexed I used that rather than a dictionary. And Paul Rubin posted a very nice solution that handles numbers larger than 9.

Re: builtin regular expressions?

2006-10-01 Thread MonkeeSage
Max M wrote: > When I used to program in Perl I used regex' for lots of stuff. In > python I probably use them once every half year. I sinply do not need them. I think you can pretty much do it either way without any big benefits / losses. There are edge-cases that will break a praser just like th

Re: windev vs python SOS

2006-10-01 Thread Jorge Godoy
Scott David Daniels <[EMAIL PROTECTED]> writes: > While these statements do mean something to experienced programmers, > they seem to contradict everything a power-point wielding IT executive > who understands everything "from a 5000 foot point of view" knows to > be true. I really wish I knew ho

Re: Simple but fast 2D lib for drawing pixels

2006-10-01 Thread davelist
On Oct 1, 2006, at 6:28 PM, Peter Mexbacher wrote: > Hello, > > we want to teach absolute programming newbies > a first language, so they can start programming > simple scientific models. > > We thought Python would make a good choice for > a first language; but where pretty stumped when > we fou

Re: how to reuse class deinitions?

2006-10-01 Thread sam
> What I do: > > For each new major version of python, in .../site-packages I make a > directory "sdd" (my initials). In it I put an empty file named > "__init__.py". When I have things I want to reuse, I put them in > files named things like ".../site-packages/sdd/goodidea.py", and > I get use

Re: preemptive OOP?

2006-10-01 Thread Mark Elston
* Kent Johnson wrote (on 9/30/2006 2:04 PM): > John Salerno wrote: >> So my question in general is, is it a good idea to default to an OOP >> design like my second example when you aren't even sure you will need >> it? I know it won't hurt, and is probably smart to do sometimes, but >> maybe it

Re: how to reuse class deinitions?

2006-10-01 Thread James Stroud
sam wrote: > hello all, > > pretty straightforward question here, i think. i'm experimenting with > classes and have written a File class that looks like it's worth > keeping for future use. however, i cannot work out where to put it for > this purpose or how to get it in. > > i figured i'd try a

Re: The Python world tries to be polite [formerly offensive to another language]

2006-10-01 Thread MonkeeSage
Ant wrote: > Don't think so, I followed the thread along a little, and it seems to > be correct. In addition, they seem to have the ¥ character as the Perl > 6 equivalent of zip(). Those crazy guys. Yup, I don't think it was a joke either; there are several other "hyper" operators already in pugs:

Re: The Python world tries to be polite [formerly offensive to another language]

2006-10-01 Thread MonkeeSage
Ant wrote: > Don't think so, I followed the thread along a little, and it seems to > be correct. In addition, they seem to have the ¥ character as the Perl > 6 equivalent of zip(). Those crazy guys. Yup, I don't think it was a joke either; there are several other "hyper" operators already in pugs:

Re: how to reuse class deinitions?

2006-10-01 Thread Scott David Daniels
sam wrote: > pretty straightforward question here, i think. i'm experimenting with > classes and have written a File class that looks like it's worth > keeping for future use. however, i cannot work out where to put it for > this purpose or how to get it in. What I do: For each new major version

Simple but fast 2D lib for drawing pixels

2006-10-01 Thread Peter Mexbacher
Hello, we want to teach absolute programming newbies a first language, so they can start programming simple scientific models. We thought Python would make a good choice for a first language; but where pretty stumped when we found out that there is no simple way to draw pixels to a screen. (This

Re: how to reuse class deinitions?

2006-10-01 Thread sam
should read 'definitions', of course. i hate stupid typos. -- http://mail.python.org/mailman/listinfo/python-list

how to reuse class deinitions?

2006-10-01 Thread sam
hello all, pretty straightforward question here, i think. i'm experimenting with classes and have written a File class that looks like it's worth keeping for future use. however, i cannot work out where to put it for this purpose or how to get it in. i figured i'd try a bit of (un)inspired guessw

Re: changing numbers to spellings

2006-10-01 Thread Tim Williams
On 1 Oct 2006 14:08:24 -0700, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > I guess I'm just looking for a small code sample hooked up to the code > I gave, that would collect the input, compare it to code such as: > > if x==5 > print "Five" > elif x==6 > print "Six" > elif x==7 > p

Re: a different question: can you earn a living with *just* python?

2006-10-01 Thread Scott David Daniels
[EMAIL PROTECTED] wrote: > Paul Rubin wrote: >> Very interesting post and list. I think I'd add at least one assembly >> language. > > Yes, definitely. I'd propose DEK's MMIX assembly language if you go for only one (or two) -- learn modern machine architectural directions at the same time

trouble connecting to KFNX radio station for Mark Lutz interview

2006-10-01 Thread John Salerno
Is anyone else having trouble? It worked for me last night, but now it's saying: C00D11BD: Cannot play the file Windows Media Player cannot play the file because the specified protocol is not supported. If you encountered this error by typing a Uniform Resource Locator (URL) in the Open URL di

Re: changing numbers to spellings

2006-10-01 Thread [EMAIL PROTECTED]
I guess I'm just looking for a small code sample hooked up to the code I gave, that would collect the input, compare it to code such as: if x==5 print "Five" elif x==6 print "Six" elif x==7 print "Seven" Something along those lines. That was actually like the code I used for someth

Re: Is this a bug? Python intermittently stops dead for seconds

2006-10-01 Thread Tim Peters
[Charlie Strauss] >>> level0: newly created objects >>> level1: objects that survived 1 round of garbage collection >>> level2: objects that survivied 2+ rounds of gargbage collection >>> >>> Since all of my numerous objects are level2 objects, and none of >>> them are every deallocated, then I

Re: Is this a bug? Python intermittently stops dead for seconds

2006-10-01 Thread Tim Peters
[charlie strauss] > Steve, digging into the gc docs a bit more, I think the behaviour I am seeing > is still > not expected. Namely, the program I offered has no obvious place where > objects > are deallocated. The way GC is supposed to work is thate there are three > levels of > objects > > l

Re: Is this a bug? Python intermittently stops dead for seconds

2006-10-01 Thread Tim Peters
[charlie strauss] > I want to clarify that, on my computer, the first instance of the gap occurs > way > before the memory if filled. (at about 20% of physical ram). Additionally the > process monitor shows no page faults. Python has no idea of how much RAM you have, or even of how much RAM it's

python threading and timing

2006-10-01 Thread Oeyvind Brandtsegg
hello I'm writing a Python application for live music performance/improivsation, using csound as the synthesis engine, and Python for compositional algorithms, GUI and control. I creating several threads: one for GUI one for csound, one for a timed queue (timed automation events), one for commun

Re: Is this a bug? Python intermittently stops dead for seconds

2006-10-01 Thread Tim Peters
[Steve Holden, "pins the blame" for pauses on periodic cyclic gc] > ... > So basically what you have here is a pathological example of why it's > sometimes wise to disable garbage collection. Tim, did I miss anything? Nope! -- http://mail.python.org/mailman/listinfo/python-list

Re: Is this a bug? Python intermittently stops dead for seconds

2006-10-01 Thread Tim Peters
[charlie strauss] >>> Below is a simple program that will cause python to intermittently >>> stop executing for a few seconds. it's 100% reproducible on my >>> machine. [Giovanni Bajo] >> Confirmed with Python 2.4.2 on Windows. [Jorgen Grahn] > And Python 2.3.5 on Linux, amd64. In fact, it caus

Re: Is this a bug? Python intermittently stops dead for seconds

2006-10-01 Thread Tim Peters
[charlie strauss] > Below is a simple program that will cause python to intermittently > stop executing for a few seconds. it's 100% reproducible on my machine. Any program that creates a great many long-lived container objects will behave similarly during the creation phase. Others have explain

Re: Auto color selection PIL

2006-10-01 Thread Scott David Daniels
Leif K-Brooks wrote: > Gabriel Genellina wrote: >> Try this. It first chooses 0, 1/2, then 1/4, 3/4, then */8... >> It's the best I could make if you don't know the number of colors >> beforehand. If you *do* know how many colors, your previous response >> is OK. I've no better suggestion than e

Re: windev vs python SOS

2006-10-01 Thread Scott David Daniels
stéphane bard wrote: > hello, my boss ask me to prefer windev to python. > I have to argue > > - python work on multiple platform (linux, mac, windows) > A good point but it didn't interest him. Because > we want to choose a language for prototyping. > So multi platform is not enough.

Re: The Python world tries to be polite [formerly offensive to another language]

2006-10-01 Thread Ant
Mirco Wahab wrote: > Thus spoke A.M. Kuchling (on 2006-09-30 19:26): > > On Sat, 30 Sep 2006 09:10:14 +0100, > > Steve Holden <[EMAIL PROTECTED]> wrote: > Thats it. What is the fuzz all about? I consider 'hyper fatarrow' > (you did't the »=>« get right) just a joke of LW > (he does so sometimes ;

Re: a query on sorting

2006-10-01 Thread Fredrik Lundh
Scott David Daniels wrote: >> map(tuple,map(reversed,list(enumerate(a > > Doesn't the following read more easily? > > [tuple(reversed(x)) for x in enumerate(a)] that involves two extra name lookups for each item in the sequence, though, so it doesn't execute more easily. -- http:/

Re: How to change menu text with Tkinter?

2006-10-01 Thread Scott David Daniels
Phil Schmidt wrote: > Eric Brunel wrote: >> But Marc's answer still applies: it's a lot of work for something that >> will usually be configured once. So requiring to restart the tool when the >> UI language changes should be acceptable. > > Thanks for the example, that helps. > > I agree with yo

Re: a query on sorting

2006-10-01 Thread Scott David Daniels
Paul McGuire wrote: > In the interests of beating a dead horse into the ground >(metaphor-mixing?), > I looked at using map to one-line the OP's request, and found an interesting > inconsistency. > > I tried using map(reversed, list(enumerate(a))), but got back a list of > iterators. To c

Re: does anybody earn a living programming in python?

2006-10-01 Thread Alex Martelli
<[EMAIL PROTECTED]> wrote: > Since then, feedback from students in industry is that it is being used > more and more, day in and day out by top world class shops (games, > effects, etc). BUT It's still Java, C++, PHP, SQL that have the > marketing demands... Absolutely. But note that SQL (like J

Re: Battlefield Weapon Popularity Trend

2006-10-01 Thread Scott David Daniels
Gabriel Genellina wrote: > At Wednesday 27/9/2006 07:30, Mirco Wahab wrote: > >> >> When the Samurai of medieval Japan were confronted >> >> with new 'battlefield language', e.g. early Shotguns, >> >> they resisted because one could push any peasant >> > >> > shouldn't this be "they [the Samurai]

Re: Generating unique row ID ints.

2006-10-01 Thread Nick Vatamaniuc
The primary key is usually there to uniquely identify each row. There are a couple of ways to generate them: One is to always create a new integer id (sequentially or random) when you insert a new row. This means that if you insert the same data again, the row will always be duplicated. Usual

Re: Is this a bug? Python intermittently stops dead for seconds

2006-10-01 Thread Giovanni Bajo
Steve Holden wrote: > I think you'll find that most programs that eat through memory in this > way will exhibit pretty much the same behaviour. If you *know* your > program isn't creating data cycles, just turn the GC off and rely on > reference counting. That won't save you from paging when you >

Re: question about scope

2006-10-01 Thread John Salerno
Steve Holden wrote: > John Salerno wrote: >> James Stroud wrote: >> >> >>> This is because that list is an attribute of the class. Instances have a >>> reference of this class attribute, but it can be replaced by an >>> attribute of the instance with self (self is a reference to the instance >>>

Re: How can I correct an error in an old post?

2006-10-01 Thread Blair P. Houghton
[EMAIL PROTECTED] wrote: > Hi. > I was searching for some information regarding a problem and found an > interesting post that includes an answer to the problem; thought the > post is very helpful it is based on a wrong assumption and thus the > solution it suggests is incorrect. It took me some t

Re: Is this a bug? Python intermittently stops dead for seconds

2006-10-01 Thread Fredrik Lundh
Roel Schroeven wrote: > AFAIK Python always does reference counting, and the garbage collector > is used only for more difficult cases. As the gc module docs say: > "Since the collector supplements the reference counting already used in > Python, you can disable the collector if you are sure you

How can I correct an error in an old post?

2006-10-01 Thread barakad
Hi. I was searching for some information regarding a problem and found an interesting post that includes an answer to the problem; thought the post is very helpful it is based on a wrong assumption and thus the solution it suggests is incorrect. It took me some time to understand that the suggested

Re: Is this a bug? Python intermittently stops dead for seconds

2006-10-01 Thread Steve Holden
Roel Schroeven wrote: > Charlie Strauss schreef: > >>On Oct 1, 2006, at 9:48 AM, Fredrik Lundh wrote: >> >>>charlie strauss wrote: >>> Could you clarify that for me. GC really has three components two it: 1) finding and freeing unrefernced memory by refer refer counts 2) cycle remov

Re: question about scope

2006-10-01 Thread Steve Holden
John Salerno wrote: > James Stroud wrote: > > >>This is because that list is an attribute of the class. Instances have a >>reference of this class attribute, but it can be replaced by an >>attribute of the instance with self (self is a reference to the instance >>and not the class. This exampl

Re: Is this a bug? Python intermittently stops dead for seconds

2006-10-01 Thread Roel Schroeven
Charlie Strauss schreef: > On Oct 1, 2006, at 9:48 AM, Fredrik Lundh wrote: >> charlie strauss wrote: >>> Could you clarify that for me. GC really has three components >>> two it: 1) finding and freeing unrefernced memory by refer >>> refer counts 2) cycle removal and 3) defragementing the >>>

Re: question about scope

2006-10-01 Thread John Salerno
James Stroud wrote: > This is because that list is an attribute of the class. Instances have a > reference of this class attribute, but it can be replaced by an > attribute of the instance with self (self is a reference to the instance > and not the class. This example might help: Ah, I see! S

Re: Is this a bug? Python intermittently stops dead for seconds

2006-10-01 Thread Fredrik Lundh
Charlie Strauss wrote: > Sorry to be slow but I don't know what "looking at the status > message" means. did you add import gc gc.set_debug(gc.DEBUG_STATS) to the top of the program? (you need to run it to see the status messages, of course) -- http://mail.python.org/mailman/listinfo/pyt

Re: Is this a bug? Python intermittently stops dead for seconds

2006-10-01 Thread Charlie Strauss
On Oct 1, 2006, at 9:48 AM, Fredrik Lundh wrote: > charlie strauss wrote: > >> level0: newly created objects >> level1: objects that survived 1 round of garbage collection >> level2: objects that survivied 2+ rounds of gargbage collection >> >> Since all of my numerous objects are level2 object

Re: Is this a bug? Python intermittently stops dead for seconds

2006-10-01 Thread Steve Holden
charlie strauss wrote: > Steve, digging into the gc docs a bit more, I think the behaviour I am seeing > is still not expected. Namely, the program I offered has no obvious place > where objects are deallocated. The way GC is supposed to work is thate there > are three levels of objects > > l

Re: builtin regular expressions?

2006-10-01 Thread Max M
Jorgen Grahn skrev: > On Sat, 30 Sep 2006 20:01:57 +0100, Thorsten Kampe <[EMAIL PROTECTED]> wrote: >> And the simple reason why Regular Expressions are not a part of the >> core Python language is that Regular Expressions are overrated. > > It seems to me they are currently /underrated/ in the

Re: Generating unique row ID ints.

2006-10-01 Thread Paul Rubin
"Simon Wittber" <[EMAIL PROTECTED]> writes: > Some of the tables require single integer primary keys which might be > exposed in some parts of the web interface. If users can guess the next > key in a sequence, it might be possible for them to 'game' or > manipulate the system in unexpected ways. I

Re: Is this a bug? Python intermittently stops dead for seconds

2006-10-01 Thread Fredrik Lundh
charlie strauss wrote: > level0: newly created objects > level1: objects that survived 1 round of garbage collection > level2: objects that survivied 2+ rounds of gargbage collection > > Since all of my numerous objects are level2 objects, and none of > them are every deallocated, then I shou

Re: Is this a bug? Python intermittently stops dead for seconds

2006-10-01 Thread Fredrik Lundh
charlie strauss wrote: > Could you clarify that for me. GC really has three components > two it: 1) finding and freeing unrefernced memory by refer > refer counts 2) cycle removal and 3) defragementing the > storage stack. If I turn off GC, don't I lose all of these? CPython always does (

Generating unique row ID ints.

2006-10-01 Thread Simon Wittber
I'm building a web application using sqlalchemy in my db layer. Some of the tables require single integer primary keys which might be exposed in some parts of the web interface. If users can guess the next key in a sequence, it might be possible for them to 'game' or manipulate the system in unexp

Re: Is this a bug? Python intermittently stops dead for seconds

2006-10-01 Thread charlie strauss
Steve, digging into the gc docs a bit more, I think the behaviour I am seeing is still not expected. Namely, the program I offered has no obvious place where objects are deallocated. The way GC is supposed to work is thate there are three levels of objects level0: newly created objects level

Re: AN Intorduction to Tkinter

2006-10-01 Thread Fuzzyman
[EMAIL PROTECTED] wrote: > Sorry about that. > > As far as I can tell, its not anything to do with your code. I think > its something with tkinter modules. Sorry about misleading you. > > Thanks for the help, I'm sure you'll hear from me soon again. In > fact... Unless you post the following, no-

Re: Is this a bug? Python intermittently stops dead for seconds

2006-10-01 Thread charlie strauss
>> >I think the point you are missing is that the garbage collector is >triggered from time to time to ensure that no cyclical garbage remains >uncollected, IIRC. The more data that's been allocated, the longer it >takes the collector to scan all of memory to do its job. > >If you can find a w

Re: Is this a bug? Python intermittently stops dead for seconds

2006-10-01 Thread Steve Holden
charlie strauss wrote: > Steve and other good folks who replied: > > I want to clarify that, on my computer, the first instance of the gap occurs > way before the memory if filled. (at about 20% of physical ram). > Additionally the process monitor shows no page faults. > > Yes if you let the

Re: Is this a bug? Python intermittently stops dead for seconds

2006-10-01 Thread charlie strauss
By the way if you are on a fast computer, and an OS whose time.time() function can resolve less than 0.5 seconds then you can see this problem on your machine at lower memory utilizations by changing the value of the default "allowed_gap" in the gtime class from 0.5 seconds down to say 0.1 sec

[ANN] InformixDB-2.3 released

2006-10-01 Thread Carsten Haese
I am pleased to announce a new release of InformixDB, the DB-API 2.0 module for connecting to IBM Informix database engines. Changes since version 2.2: - Allow parameter list for executemany() to be arbitrary iterable objects. - .prepare() method and .command attribute for explicitly prepared sta

Re: Is this a bug? Python intermittently stops dead for seconds

2006-10-01 Thread charlie strauss
Steve and other good folks who replied: I want to clarify that, on my computer, the first instance of the gap occurs way before the memory if filled. (at about 20% of physical ram). Additionally the process monitor shows no page faults. Yes if you let the as-written demo program run to comp

SHTOOM

2006-10-01 Thread vedran_dekovic
Hello, I am a new shtoom user,but I have one problem.I was download last shtoom source and when I write example: >>> from shtoom.app.phone import Phone Traceback (most recent call last): File "", line 1, in -toplevel- from shtoom.app.phone import Phone ImportError: No module named app.phon

Re: windev vs python SOS

2006-10-01 Thread Steve Holden
Wolfgang Keller wrote: >>Links abour Windev for those who like facts : >> >>http://www.windev.com/pcsoft/testimonials/index.html >>http://www.pcsoft.fr/annonce10/photos.html >>http://www.pcsoft.fr/pcsoft/120pages/index.html > > > Well, it _could_ be that all the readers in comp.lang.python are ut

Re: PATCH: Speed up direct string concatenation by 20+%!

2006-10-01 Thread Colin J. Williams
Congratulations on the clear way in which you have set out your proposal. I hope that it will make its way to PEPdom. Colin W. Larry Hastings wrote: > This is such a long posting that I've broken it out into sections. > Note that while developing this patch I discovered a Subtle Bug > in CPython

Re: AN Intorduction to Tkinter

2006-10-01 Thread Steve Holden
Fredrik Lundh wrote: > [EMAIL PROTECTED] wrote: > > >>As far as I can tell, its not anything to do with your code. I think >>its something with tkinter modules. > > > as in ? > > you've posted five posts to this thread, but you still haven't provided > us with more clues than "I noticed they

Re: Is this a bug? Python intermittently stops dead for seconds

2006-10-01 Thread Steve Holden
charlie strauss wrote: Below is a simple program that will cause python to intermittently stop executing for a few seconds. it's 100% reproducible on my machine. I'd be tempted to say this is a nasty garbage collection performance issue except that there is no major memory to be garbage col

Re: "Wiki in 10 minutes"

2006-10-01 Thread Jan Niklas Fingerle
Michiel Sikma <[EMAIL PROTECTED]> wrote: > lost my bookmarks. I once bookmarked this video tutorial which > allegedly showed how to make a wiki in 10 minutes with some Python > network framework. Does anybody know which one it might have been? If you add another ten minutes, this would be ht

Re: builtin regular expressions?

2006-10-01 Thread Fredrik Lundh
Steve Holden wrote: > Fine. Just because you fail to see the benefit, however, that doesn't > mean there isn't one. the real reason is of course, as Richard Feynman famously observed, that in Python, "everything is made of objects". -- http://mail.python.org/mailman/listinfo/python-list

Re: does anybody earn a living programming in python?

2006-10-01 Thread jmdeschamps
Alex Martelli wrote: > Magnus Lycka <[EMAIL PROTECTED]> wrote: >... > > stuff in the world, so my standard extrapolation technique would yield > > 3 python programmers globally. > > I think this estimate is low, based on three piece of data I know (but, > sorry, are all confidential;-) and

Re: builtin regular expressions?

2006-10-01 Thread Paddy
Antoine De Groote wrote: > Hello, > > Can anybody tell me the reason(s) why regular expressions are not built > into Python like it is the case with Ruby and I believe Perl? Like for > example in the following Ruby code > > line = 'some string' > > case line >when /title=(.*)/ > puts "Tit

Re: question about scope

2006-10-01 Thread Steve Holden
John Salerno wrote: > Steve Holden wrote: > > >>The methods do indeed look in their enclosing class, but only for >>self-relative references. These are sought first in the instance, then >>in the instance's class, then in the instance's class's superclass, and >>so on up to the ultimate superc

Re: Help me use my Dual Core CPU!

2006-10-01 Thread Michael
Paul Rubin wrote: > Michael <[EMAIL PROTECTED]> writes: >> > But ordinary programmers write real-world applications with shared data >> > all the time, namely database apps. >> >> I don't call that shared data because access to the shared data is >> arbitrated by a third party - namely the databa

Re: windev vs python SOS

2006-10-01 Thread Wolfgang Keller
> Links abour Windev for those who like facts : > > http://www.windev.com/pcsoft/testimonials/index.html > http://www.pcsoft.fr/annonce10/photos.html > http://www.pcsoft.fr/pcsoft/120pages/index.html Well, it _could_ be that all the readers in comp.lang.python are utterly braindead morons with e

Re: builtin regular expressions?

2006-10-01 Thread bearophileHUGS
Jorgen Grahn: > However, there is a set of common problems which would be hell to solve > without regexes. I agree, and I think no one is thinking about dropping REs from Python stdlib. Here people are mostly talking about what's better between having them in the stdlibs instead of inside the core

Re: Python/UNO/OpenOffice?

2006-10-01 Thread Sybren Stuvel
John Machin enlightened us with: > Hi, Sybren. I tried folloing your recipe on Windows with OOo 2.0 ... > > Minor problem: the executable is called soffice, not ooffice. > > Major problem: it crashed right at the start, somewhere in the maze > of dlls. That's not nice. > Has anyone managed to get

Re: Help me use my Dual Core CPU!

2006-10-01 Thread Paul Rubin
Michael <[EMAIL PROTECTED]> writes: > > But ordinary programmers write real-world applications with shared data > > all the time, namely database apps. > > I don't call that shared data because access to the shared data is > arbitrated by a third party - namely the database. I mean where 2 or >

[ANNOUNCE] Kamaelia 0.5.0 Released - now enhanced by Summer of Code :-)

2006-10-01 Thread Michael
Hi! Kamaelia 0.5.0 marks a major stepping point for the Kamaelia project. It means we officially have coverage over almost all the core areas we want in version 1.0, with some substantial and useful subsystems in the form of network delivery (tcp, udp, multicast servers), and interactive capabil

Re: builtin regular expressions?

2006-10-01 Thread MonkeeSage
Mirco Wahab wrote: > Therefore, I'd like to have a usable and understandable > example of Regex-object juggling, that shows clearly > what its real benefit is (or gives an idea of - ). Here are some benefits: DRY - You can assign a regexp to a variable and pass it around or call specific instance

Re: The Python world tries to be polite [formerly offensive to another language]

2006-10-01 Thread Mirco Wahab
Thus spoke A.M. Kuchling (on 2006-09-30 19:26): > On Sat, 30 Sep 2006 09:10:14 +0100, > Steve Holden <[EMAIL PROTECTED]> wrote: >> My God, Perl 6 is going to be even less comprehensible that Perl 5, >> which was at least usable. Is »=>« really a Perl6 operator? That's too >> funny! > > While we

Re: why logging re-raise my exception and can't be caught?

2006-10-01 Thread Ben Finney
Steve Holden <[EMAIL PROTECTED]> writes: > Ben Finney wrote: > [...] > > A 'try ... except' statement is not an exception handler. [...] > > Just as a matter of interest, what would your definition of an > exception handler be, then? Specifically, what's the "except" clause > for? It seems my und

Re: builtin regular expressions?

2006-10-01 Thread Mirco Wahab
Thus spoke Steve Holden (on 2006-09-30 23:58): > Mirco Wahab wrote: >> Thus spoke MRAB (on 2006-09-30 20:54): >>>One of the differences between the Python way and the Perl way is that >>>the Perl way has a side-effect: ... >> I fail to see the benefit of a re-object, I consider these to >> be just

Re: Escapeism

2006-10-01 Thread Fredrik Lundh
Hendrik van Rooyen wrote: > dumb question - is the backslash as escape character fixed yes. > seems to me that would help help with what? > or if you could turn the behaviour off - don't know how though... eh? if you don't want to use repr(), you don't have to. -- http://mail.python.org

Re: builtin regular expressions?

2006-10-01 Thread Kay Schluehr
Antoine De Groote wrote: > Hello, > > Can anybody tell me the reason(s) why regular expressions are not built > into Python like it is the case with Ruby and I believe Perl? Like for > example in the following Ruby code > > line = 'some string' > > case line >when /title=(.*)/ > puts "Titl

Re: the actual C code - Re: Scoping bugs in an embedded Python interpreter - Wizards please

2006-10-01 Thread morris . slutsky
FOUND IT! http://mail.python.org/pipermail/python-list/1999-June/005833.html So I'm supposed to only have ONE dictionary, 'glb', and forget the 'loc' for locals. Just call PyRun(...glb,glb) Seeing as this was a topic of discussion 7 years ago, maybe it ought to be in the "extending and embe

  1   2   >