Re: Is there an alternative to os.walk?

2006-10-07 Thread Ant
The idiomatic way of doing the tree traversal is: def search(a_dir): valid_dirs = [] for dirpath, dirnames, filenames in os.walk(a_dir): if dirtest(filenames): valid_dirs.append(dirpath) return valid_dirs Also since you are given a list of filenames in the directory, th

Re: Dumping the state of a deadlocked process

2006-10-07 Thread MrJean1
[EMAIL PROTECTED] wrote: > MrJean1 wrote: > > Did you try using the signal module? If not, a basic example is here > > which may need to be > > extended. > > I looks useful. I gave it a try, and the only weakness it has is that > when my process locks, it

Re: Raw beginner....

2006-10-07 Thread hanumizzle
On 10/8/06, Colin Lehmann <[EMAIL PROTECTED]> wrote: > I am new to Python although I have been using Delphi since version one, > I have been employed as a C and C++ programmer so when I went to Linux > (Ubuntu 5.10) I thought Python looked pretty good. > I downloaded and installed 'Eric Python IDE'

Raw beginner....

2006-10-07 Thread Colin Lehmann
I am new to Python although I have been using Delphi since version one, I have been employed as a C and C++ programmer so when I went to Linux (Ubuntu 5.10) I thought Python looked pretty good. I downloaded and installed 'Eric Python IDE' which seems OK, any alternatives suggested will be looked

Re: Is there an alternative to os.walk?

2006-10-07 Thread hanumizzle
On 10/8/06, Tim Roberts <[EMAIL PROTECTED]> wrote: > Umm, may I point out that you don't NEED the "os.path.exists" call, because > you are already being HANDED a list of all the filenames in that directory? > You could "dirtest" with this much faster routinee: > > def dirtest(a_dir,filenames): >

Re: Python to use a non open source bug tracker?

2006-10-07 Thread Aahz
In article <[EMAIL PROTECTED]>, Giovanni Bajo <[EMAIL PROTECTED]> wrote: >Aahz wrote: >> Giovanni removed his own attribution: >>> >>> Are you ever going to try and make a point which is not "you are not >>> entitled to have opinions because you do not act"? Your sarcasm is >>> getting annoying. An

Re: Is there an alternative to os.walk?

2006-10-07 Thread Tim Roberts
"Bruce" <[EMAIL PROTECTED]> wrote: > >A little late but.. thanks for the replies, was very useful. Here`s >what I do in this case: > >def search(a_dir): > valid_dirs = [] > walker = os.walk(a_dir) > while 1: > try: > dirpath, dirnames, filenames = walker.next() > except

Re: Python to use a non open source bug tracker?

2006-10-07 Thread Ben Finney
"Ilias Lazaridis" <[EMAIL PROTECTED]> writes: > As for Mr. Holden... it's not a matter of not respecting you. > It is in his nature to babble in this way. > Sometimes it's even funny! Oh my. You have *seriously* misjudged this group if you think that comment will give you any net gain in discussi

Re: error handling in user input: is this natural or just laborious

2006-10-07 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, sam wrote: > i'm still in the early stages, and am trying to code something simple > and interactive to get the percentages of the portfolio in the five > different investment categories. i thought i'd get in with the error > handling early so if someone types in so

Re: Python to use a non open source bug tracker?

2006-10-07 Thread Ilias Lazaridis
Giovanni Bajo wrote: > Aahz wrote: > > >> Are you ever going to try and make a point which is not "you are not > >> entitled to have opinions because you do not act"? Your sarcasm is > >> getting annoying. And since I'm not trolling nor flaming, I think I > >> deserve a little bit more of respect.

Re: error handling in user input: is this natural or just laborious

2006-10-07 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, James Stroud wrote: > Patently. Tabs should be reserved for tables, for which tabs were named. > If they were meant to be used for indenting, they would have been > named "indenters". Really? I thought they were for tabulators

Re: Names changed to protect the guilty

2006-10-07 Thread Aahz
In article <[EMAIL PROTECTED]>, John J. Lee <[EMAIL PROTECTED]> wrote: >[EMAIL PROTECTED] (Aahz) writes: >> >> The following line of lightly munged code was found in a publicly >> available Python library... >> >> if schema.elements.has_key(key) is False: >> >> Sorry, just had to vent. > >I t

Re: need some regular expression help

2006-10-07 Thread Tim Chase
> Why does it need to be a regex? There is a very simple and well-known > algorithm which does what you want. > > Start with i=0. Walk the string one character at a time, incrementing i > each time you see a '(', and decrementing it each time you see a ')'. At > the end of the string, the co

can compile function have a bug?

2006-10-07 Thread ygao
>>> compile('U"中"','c:/test','single') >>> d=compile('U"中"','c:/test','single') >>> d >>> exec(d) u'\xd6\xd0' >>> U"中" u'\u4e2d' >>> why is the result different? a bug or another reason? -- http://mail.python.org/mailman/listinfo/python-list

Re: New-style classes slower than old-style classes? (Was: n-body problem at shootout.alioth.debian.org)

2006-10-07 Thread Richard Jones
Giovanni Bajo wrote: > Peter Maas wrote: > >>> Did you try using an old-style class instead of a new-style class? >> >> The original program has an old style class, changing it to a new >> style class increases run time by 25% (version is 2.4.3 btw). > > Ah yes. Years ago when I first saw this t

Re: need some regular expression help

2006-10-07 Thread Roy Smith
In article <[EMAIL PROTECTED]>, "Chris" <[EMAIL PROTECTED]> wrote: > I need a pattern that matches a string that has the same number of '(' > as ')': > findall( compile('...'), '42^((2x+2)sin(x)) + (log(2)/log(5))' ) = [ > '((2x+2)sin(x))', '(log(2)/log(5))' ] > Can anybody help me out? > > Tha

Re: need some regular expression help

2006-10-07 Thread hanumizzle
On 7 Oct 2006 15:00:29 -0700, Diez B. Roggisch <[EMAIL PROTECTED]> wrote: > > Chris wrote: > > I need a pattern that matches a string that has the same number of '(' > > as ')': > > findall( compile('...'), '42^((2x+2)sin(x)) + (log(2)/log(5))' ) = [ > > '((2x+2)sin(x))', '(log(2)/log(5))' ] > > C

Re: Rich text processor component

2006-10-07 Thread hanumizzle
On 10/6/06, Jorge Vilela <[EMAIL PROTECTED]> wrote: > Hello, do anyone know if exists anything about rich text processor in > python, as a component or good tutorial about it? http://pyrtf.sourceforge.net/ Regards, Theerasak -- http://mail.python.org/mailman/listinfo/python-list

Re: Can't get around "IndexError: list index out of range"

2006-10-07 Thread MonkeeSage
On Oct 7, 8:06 pm, "MonkeeSage" <[EMAIL PROTECTED]> wrote: > More often and easier to implement than dict.has_key / get? More -> Less -- http://mail.python.org/mailman/listinfo/python-list

Re: Can't get around "IndexError: list index out of range"

2006-10-07 Thread Duncan Smith
MonkeeSage wrote: > > On Oct 7, 7:14 pm, Duncan Smith <[EMAIL PROTECTED]> wrote: > >>No. The above constructs a list of keys and searches the list for the >>key, O(n). "key in somedict" is a lookup, O(1). > > > My point wasn't in regard to implementation details, but in regard to > convenienc

Re: windev vs python SOS

2006-10-07 Thread baalbek
Fredrik Lundh wrote: > Bruno Desthuilliers wrote: > >> Amanda wrote: >> (snip) >>> I am always amazed when I meet fanatics!! >> I'm always amazed when I meet PC-Soft's salespersons... > > isn't there some non-python forum where you can sort this one out ? Why is it up to Bruno to sort this out?

Re: Names changed to protect the guilty

2006-10-07 Thread Ben Finney
[EMAIL PROTECTED] (John J. Lee) writes: > [EMAIL PROTECTED] (Aahz) writes: > > if schema.elements.has_key(key) is False: > > I think I was reading the same code recently (epydoc?) and was also > momentarily horrified ;-) until I realized that it was quite > deliberately using three-valued logi

Re: Python to use a non open source bug tracker?

2006-10-07 Thread skip
Giovanni> And, in turn, this was in the context of hiring 6-10 people as Giovanni> the only acceptable minimum to maintain and admin a bug Giovanni> tracker. Who said anything about "hiring"? I don't believe anyone expects any of the 6-10 people to work full-time (well, except for yo

Re: Can't get around "IndexError: list index out of range"

2006-10-07 Thread MonkeeSage
On Oct 7, 7:41 pm, Steven D'Aprano <[EMAIL PROTECTED]> wrote: > Are you just making a philosophical point? In which case I agree: *if* you > make the analogy "a dictionary key is analogous to a sequence index", > *then* the operation of "in" isn't semantically analogous between mappings > and sequ

Re: operator overloading + - / * = etc...

2006-10-07 Thread Steven D'Aprano
On Sat, 07 Oct 2006 17:21:55 -0500, Tim Chase wrote: >>> With the caveat of the "=" mentioned in the subject-line (being >>> different from "==")...I haven't found any way to override >>> assignment in the general case. >> >> Why would you want to do that? > > For the same reason one would use p

Re: Can't get around "IndexError: list index out of range"

2006-10-07 Thread Steven D'Aprano
On Sat, 07 Oct 2006 17:25:15 -0700, MonkeeSage wrote: > My point wasn't in regard to implementation details, but in regard to > convenience methods. Obviously the sugary dict methods are tweaked for > the best performance (one would hope!), as would be sugary sequence > methods were they to be add

Re: Names changed to protect the guilty

2006-10-07 Thread John J. Lee
[EMAIL PROTECTED] (Aahz) writes: > The following line of lightly munged code was found in a publicly > available Python library... > > if schema.elements.has_key(key) is False: > > Sorry, just had to vent. I think I was reading the same code recently (epydoc?) and was also momentarily horri

Get Pedia

2006-10-07 Thread Get Pedia
i am sorry if this is the wrong section . i just finished a huge website called www.this.explains.it and i need your reviews : *More than 150,000 articles in the search database .. *Learn how almost everything works in the easiest way possible... *randomly generated articles

Re: ANN: SimpleJSONRPCServer

2006-10-07 Thread aum
On Sun, 08 Oct 2006 10:16:05 +1300, aum wrote: > If any Python honchos here want to raise a PEP for it, I'd support that > fully. Don't worry - I've just posted my own PEP for it. Cheers aum -- http://mail.python.org/mailman/listinfo/python-list

Re: Python to use a non open source bug tracker?

2006-10-07 Thread Giovanni Bajo
Tim Peters wrote: > None are /totally ignored/ -- indeed, at least I see every one as it > comes in. You might want to change your claim to that no work > obviously visible to you is done on them. That would be better. Please notice that my mail was in the context of "user satisfaction with the

Re: Can't get around "IndexError: list index out of range"

2006-10-07 Thread Steven D'Aprano
On Sat, 07 Oct 2006 10:26:22 -0700, MonkeeSage wrote: > > > On Oct 7, 3:27 am, Gabriel Genellina <[EMAIL PROTECTED]> wrote: >> The meaning comes from the most common usage. > > I wasn't suggesting that the "in" keyword have a different sematic for > sequence types. I was just saying that regard

Re: Kde Taskbar

2006-10-07 Thread David Boddie
On Saturday 07 October 2006 16:29, DarkBlue wrote: > David Boddie wrote: >> You need to activate the window associated with the application. [...] > My python app actually is a pythoncard app > which I hope will make things easier. If PythonCard or its underlying API has a function for activat

Re: Can't get around "IndexError: list index out of range"

2006-10-07 Thread MonkeeSage
On Oct 7, 7:14 pm, Duncan Smith <[EMAIL PROTECTED]> wrote: > No. The above constructs a list of keys and searches the list for the > key, O(n). "key in somedict" is a lookup, O(1). My point wasn't in regard to implementation details, but in regard to convenience methods. Obviously the sugary d

Re: Kde Taskbar

2006-10-07 Thread David Boddie
On Saturday 07 October 2006 15:41, Diez B. Roggisch wrote: > pykde afaik supports systray-iconified apps. And you could use the > dcop-mechanisms that are available as command line tools as well I > guess, and invoke knotify. I think DarkBlue wanted to affect the behaviour of the taskbar, though

Re: Python to use a non open source bug tracker?

2006-10-07 Thread Giovanni Bajo
Aahz wrote: >> Are you ever going to try and make a point which is not "you are not >> entitled to have opinions because you do not act"? Your sarcasm is >> getting annoying. And since I'm not trolling nor flaming, I think I >> deserve a little bit more of respect. > > IMO, regardless of whether y

New-style classes slower than old-style classes? (Was: n-body problem at shootout.alioth.debian.org)

2006-10-07 Thread Giovanni Bajo
Peter Maas wrote: >> Did you try using an old-style class instead of a new-style class? > > The original program has an old style class, changing it to a new > style class increases run time by 25% (version is 2.4.3 btw). Ah yes. Years ago when I first saw this test it was still using new-style c

Re: Can't get around "IndexError: list index out of range"

2006-10-07 Thread Duncan Smith
MonkeeSage wrote: > On Oct 7, 12:37 pm, Fredrik Lundh <[EMAIL PROTECTED]> wrote: > >>for what? > > > key in self.keys() > [snip] No. The above constructs a list of keys and searches the list for the key, O(n). "key in somedict" is a lookup, O(1). Duncan -- http://mail.python.org/mailman

Re: People's names (was Re: sqlite3 error)

2006-10-07 Thread John Machin
Lawrence D'Oliveiro wrote: > In message <[EMAIL PROTECTED]>, Steve > Holden wrote: > > > John Machin wrote: > > > > [lots of explanation about peculiarities of people's names] > > > > While I don't dispute any of this erudite display of esoteric > > nomenclature wisdom the fact remains that many (p

Re: IDLE - Customizing output format

2006-10-07 Thread Ilias Lazaridis
Ilias Lazaridis wrote: > IDLE has an output format like this: > > >>> object > > >>> type > > >>> object.__class__ > > >>> object.__bases__ > > How can I customize it to become like that: > > >>> object > > >>> type > > >>> object.__class__ > > >>> object.__bases__ > >

Re: n-body problem at shootout.alioth.debian.org

2006-10-07 Thread igouy
Peter Maas wrote: > Paul McGuire wrote: > > The advance method is the most fertile place for optimization, since it is > > called approximately n(n-1)/2 times (where n=2E7). I was able to trim about > > 25% from the Python runtime with these changes: > [...] > > My results: > > Your changes: 18%

Re: Can't get around "IndexError: list index out of range"

2006-10-07 Thread MonkeeSage
On Oct 7, 12:37 pm, Fredrik Lundh <[EMAIL PROTECTED]> wrote: > for what? key in self.keys() And d.get() looks like sugar for: if self.has_key(key): return self[key] else: return default_value Why not have the same sugar for sequence types? E.g., def has_index(self, index):

Re: IDLE - Customizing output format

2006-10-07 Thread Ilias Lazaridis
Gabriel Genellina wrote: > At Wednesday 27/9/2006 09:29, Ilias Lazaridis wrote: > > >import sys > >def f(obj): > > if obj: > > print '::: ' + repr(obj) > >sys.displayhook = f > > Have you tried that? You have to filter out None, not *any* False value. > > > > And notice that this replac

Re: Painless way to do 3D visualization

2006-10-07 Thread faulkner
http://www.vpython.org/ Peter Beattie wrote: > Hey folks, > > I need to do the following relatively simple 3D programming: > > I want to convert data from four-item tuples into 3D co-ordinates in a > regular tetrahedron. Co-ordinates come in sequences of 10 to 20, and the > individual dots in the

Painless way to do 3D visualization

2006-10-07 Thread Peter Beattie
Hey folks, I need to do the following relatively simple 3D programming: I want to convert data from four-item tuples into 3D co-ordinates in a regular tetrahedron. Co-ordinates come in sequences of 10 to 20, and the individual dots in the tetrahedron need to be connected into discontinuous lines.

Re: operator overloading + - / * = etc...

2006-10-07 Thread Tim Chase
>> With the caveat of the "=" mentioned in the subject-line (being >> different from "==")...I haven't found any way to override >> assignment in the general case. > > Why would you want to do that? For the same reason one would use property() to create getter/setter functions for a particular v

Re: People's names (was Re: sqlite3 error)

2006-10-07 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Steve Holden wrote: > John Machin wrote: > > [lots of explanation about peculiarities of people's names] > > While I don't dispute any of this erudite display of esoteric > nomenclature wisdom the fact remains that many (predominantly Western) > databases do tend to

Re: need some regular expression help

2006-10-07 Thread John Machin
Chris wrote: > I need a pattern that matches a string that has the same number of '(' > as ')': > findall( compile('...'), '42^((2x+2)sin(x)) + (log(2)/log(5))' ) = [ > '((2x+2)sin(x))', '(log(2)/log(5))' ] > Can anybody help me out? > No, there is so such pattern. You will have to code up a func

Re: operator overloading + - / * = etc...

2006-10-07 Thread Sybren Stuvel
Tim Chase enlightened us with: > With the caveat of the "=" mentioned in the subject-line (being > different from "==")...I haven't found any way to override > assignment in the general case. Why would you want to do that? Sybren -- Sybren Stüvel Stüvel IT - http://www.stuvel.eu/ -- http://ma

Re: switching to numpy and failing, a user story

2006-10-07 Thread Fernando Perez
[EMAIL PROTECTED] wrote: > After using numeric for almost ten years, I decided to attempt to > switch a large codebase (python and C++) to using numpy. Here's are > some comments about how that went. > > - The code to automatically switch python stuff over just kind of > works. But it was a 90% s

Re: Making sure script only runs once instance at a time.

2006-10-07 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Tim Williams wrote: > On 29/09/06, Matthew Warren <[EMAIL PROTECTED]> wrote: >> I have found that in real usage of other programs within the company that >> use lockfiles, it sometimes causes a bit of troubleshooting time when it >> stops working due to a stale lock

Re: need some regular expression help

2006-10-07 Thread Diez B. Roggisch
Chris wrote: > I need a pattern that matches a string that has the same number of '(' > as ')': > findall( compile('...'), '42^((2x+2)sin(x)) + (log(2)/log(5))' ) = [ > '((2x+2)sin(x))', '(log(2)/log(5))' ] > Can anybody help me out? This is not possible with regular expressions - they can't "re

Re: operator overloading + - / * = etc...

2006-10-07 Thread Georg Brandl
Tim Chase wrote: >>> Can these operators be overloaded? >> >> Yes. > > With the caveat of the "=" mentioned in the subject-line (being > different from "==")...I haven't found any way to override > assignment in the general case. There might be some oddball way > to do it via property() but A

Re: Encoding and norwegian (non ASCII) characters.

2006-10-07 Thread Peter Otten
[EMAIL PROTECTED] wrote: > Hello, > > I am having great problems writing norwegian characters æøå to file > from a python application. My (simplified) scenario is as follows: > > 1. I have a web form where the user can enter his name. > > 2. I use the cgi module module to get to the input from

Re: operator overloading + - / * = etc...

2006-10-07 Thread Tim Chase
>> Can these operators be overloaded? > > Yes. With the caveat of the "=" mentioned in the subject-line (being different from "==")...I haven't found any way to override assignment in the general case. There might be some oddball way to do it via property() but AFAIK, this only applies to pr

Reminder re Talk Proposals for PyCon 2007

2006-10-07 Thread Jeff Rush
October has arrived and the deadline for submitting a proposal to give a talk at PyCon 2007 is October 31 (November 15 for tutorials). While it is a PyCon tradition to wait until the last minute to flood us with submissions, I would like to encourage presenters to start a bit earlier this year. W

Re: operator overloading + - / * = etc...

2006-10-07 Thread Daniel Nogradi
> Can these operators be overloaded? > If so. How? > http://www.python.org/doc/ref/numeric-types.html HTH, Daniel -- http://mail.python.org/mailman/listinfo/python-list

Re: A critique of cgi.escape

2006-10-07 Thread Lawrence D'Oliveiro
Another useful function is this: def JSString(Str) : """returns a JavaScript string literal that evaluates to Str. Note I'm not worrying about non-ASCII characters for now.""" Result = [] for Ch in Str : if Ch == "\\" : Ch = ""

Re: operator overloading + - / * = etc...

2006-10-07 Thread Sybren Stuvel
SpreadTooThin enlightened us with: > Can these operators be overloaded? Yes. > If so. How? Implement __add__, __sub__ etc. in the class that you want to be able to add, subtract, etc. Sybren -- Sybren Stüvel Stüvel IT - http://www.stuvel.eu/ -- http://mail.python.org/mailman/listinfo/pytho

Re: ANN: SimpleJSONRPCServer

2006-10-07 Thread Sybren Stuvel
aum enlightened us with: > I've built a module called SimpleJSONRPCServer, which is essentially > the same as the familiar python library module SimpleXMLRPCServer, > except that it uses the JSON-RPC protocol. Thanks a lot! I've used XML-RPC on a low-speed device, and it was way too slow. Sybren

Re: n-body problem at shootout.alioth.debian.org

2006-10-07 Thread Peter Maas
Paul McGuire wrote: > The advance method is the most fertile place for optimization, since it is > called approximately n(n-1)/2 times (where n=2E7). I was able to trim about > 25% from the Python runtime with these changes: [...] My results: Your changes: 18% runtime decrease Your changes + o

need some regular expression help

2006-10-07 Thread Chris
I need a pattern that matches a string that has the same number of '(' as ')': findall( compile('...'), '42^((2x+2)sin(x)) + (log(2)/log(5))' ) = [ '((2x+2)sin(x))', '(log(2)/log(5))' ] Can anybody help me out? Thanks for any help! -- http://mail.python.org/mailman/listinfo/python-list

operator overloading + - / * = etc...

2006-10-07 Thread SpreadTooThin
Can these operators be overloaded? If so. How? -- http://mail.python.org/mailman/listinfo/python-list

ANN: SimpleJSONRPCServer

2006-10-07 Thread aum
Hi, I've built a module called SimpleJSONRPCServer, which is essentially the same as the familiar python library module SimpleXMLRPCServer, except that it uses the JSON-RPC protocol. For those unfamiliar with JSON-RPC - see www.json-rpc.org - it's an alternative to XML-RPC, offering most of its c

Re: class print?

2006-10-07 Thread Erik Max Francis
SpreadTooThin wrote: > Hi... Many python object can be printed simpy by saying: > print obj > what method(s) need to be implemented in my own classes such that print > dumps the object? __str__ -- Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/ San Jose, CA, USA && 37 20

class print?

2006-10-07 Thread SpreadTooThin
Hi... Many python object can be printed simpy by saying: print obj what method(s) need to be implemented in my own classes such that print dumps the object? -- http://mail.python.org/mailman/listinfo/python-list

Encoding and norwegian (non ASCII) characters.

2006-10-07 Thread joakim . hove
Hello, I am having great problems writing norwegian characters æøå to file from a python application. My (simplified) scenario is as follows: 1. I have a web form where the user can enter his name. 2. I use the cgi module module to get to the input from the user: name = form["name"]

Re: n-body problem at shootout.alioth.debian.org

2006-10-07 Thread Peter Maas
Giovanni Bajo wrote: > Did you try using an old-style class instead of a new-style class? The original program has an old style class, changing it to a new style class increases run time by 25% (version is 2.4.3 btw). -- Regards/Gruesse, Peter Maas, Aachen E-mail 'cGV0ZXIubWFhc0B1dGlsb2cuZGU=\n

Re: How to execute a python script in .NET application

2006-10-07 Thread MC
Hi! dotNET can use (call) COM-servers In pywin, there are exemple of COM-server, in Python, who can run (on-the-fly) Python code. This give a way for run Python's scripts from dotNET, Excel, Word, Internet-Explorer (HTA), C#, etc. I have try all these things, with success. -- @-salutations

Re: curses problem reading cursor keys

2006-10-07 Thread Rainy
Simon Morgan wrote: > On Sat, 07 Oct 2006 13:12:33 +, Simon Morgan wrote: > > > import curses > > > > def main(scr): > > status = curses.newwin(1, curses.COLS, 0, 0) status.bkgd('0') > > status.refresh() > > > > list = curses.newwin(curses.LINES, curses.COLS, 1, 0) list.bkgd('X') >

Re: Help with first script please. files, directories, autocomplete

2006-10-07 Thread Rainy
[EMAIL PROTECTED] wrote: > Hello everyone. Hopefully someone can point me in the right direction > here. I'm wanting to write a script to open microsoft word and adobe > pdf documents . Here is a little background: > > At the company where I work (an inspection firm) all reports of > inspections a

Job announcement Vienna&Graz Austria

2006-10-07 Thread le_wolk
Python and Java Developers for reseach project hired! More information below... Information Diffusion across Interactive Online Media http://www.idiom.at/ Four full-time research positions are now available at Graz University of Technology and Vienna University of Economics and Business Administ

Re: Python to use a non open source bug tracker?

2006-10-07 Thread Aahz
In article <[EMAIL PROTECTED]>, Giovanni Bajo <[EMAIL PROTECTED]> wrote: > >Are you ever going to try and make a point which is not "you are not >entitled to have opinions because you do not act"? Your sarcasm is >getting annoying. And since I'm not trolling nor flaming, I think I >deserve a little

Re: curses problem reading cursor keys

2006-10-07 Thread Simon Morgan
On Sat, 07 Oct 2006 13:12:33 +, Simon Morgan wrote: > import curses > > def main(scr): > status = curses.newwin(1, curses.COLS, 0, 0) status.bkgd('0') > status.refresh() > > list = curses.newwin(curses.LINES, curses.COLS, 1, 0) list.bkgd('X') > list.refresh() If I use scr.su

Re: error handling in user input: is this natural or just laborious

2006-10-07 Thread sam
a huge amount to think about there. special thanks to james for taking the time to make such detailed responses. the problem is that even though nested loops and the like place a heavy analytical burden on the programmer (i.e. me) as he tries to remember what does what, conceptualizing a program

Re: Dumping the state of a deadlocked process

2006-10-07 Thread fumanchu
Dennis Lee Bieber wrote: > On 6 Oct 2006 12:59:31 -0700, [EMAIL PROTECTED] declaimed the > following in comp.lang.python: > > > I'm currently having some issues with a process getting deadlocked. The > > problem is that the only way I can seem to find information about where > > it deadlocks is by

Re: Python to use a non open source bug tracker?

2006-10-07 Thread Tim Peters
[Giovanni Bajo] > I understand your concerns, but I have to remember you that most bug reports > submitted by users go totally ignored for several years, or, better, forever. > I > do not have a correct statistic for this, Indeed you do not. > but I'm confident that at least 80% of the RFE or pa

Re: Can't get around "IndexError: list index out of range"

2006-10-07 Thread Fredrik Lundh
MonkeeSage wrote: > True. But valid dictionary keys are exactly d.keys(). The has_key > method is just sugar. for what? are you sure you're using "sugar" as it is usually used when talking about computer languages? -- http://mail.python.org/mailman/listinfo/python-list

Re: Names changed to protect the guilty

2006-10-07 Thread Scott David Daniels
John Machin wrote: > ... any function/method whose name begins with "has" or "is" > returns an honest-to-goodness actual bool (or what passed for > one in former times). True for 75% of the builtins: >>> import __builtin__ >>> sorted(nm for nm in dir(__builtin__) if nm.sta

Re: Is there an alternative to os.walk?

2006-10-07 Thread Bruce
waylan wrote: > Bruce wrote: > > Hi all, > > I have a question about traversing file systems, and could use some > > help. Because of directories with many files in them, os.walk appears > > to be rather slow. I`m thinking there is a potential for speed-up since > > I don`t need os.walk to report f

Re: Can't get around "IndexError: list index out of range"

2006-10-07 Thread MonkeeSage
On Oct 7, 3:27 am, Gabriel Genellina <[EMAIL PROTECTED]> wrote: > The meaning comes from the most common usage. I wasn't suggesting that the "in" keyword have a different sematic for sequence types. I was just saying that regarding the question whether there is anything similar to "dict.has_key

Re: Multiple calls to logging.config.fileConfig

2006-10-07 Thread Vinay Sajip
logging.config.fileConfig() does not do incremental configuration - it replaces the existing configuration with the configuration in the file passed to fileConfig. While this might not be too useful for your current needs, the present behaviour is by design...fileConfig is meant to choose between o

Re: Python to use a non open source bug tracker?

2006-10-07 Thread Giovanni Bajo
Steve Holden wrote: >> I understand your concerns, but I have to remember you that most bug >> reports submitted by users go totally ignored for several years, or, >> better, forever. I do not have a correct statistic for this, but I'm >> confident that at least 80% of the RFE or patches filed eve

Re: Help with first script please. files, directories, autocomplete

2006-10-07 Thread simonharrison
Forgot to mention I'm using python 2.5 on windows xp. -- http://mail.python.org/mailman/listinfo/python-list

Help with first script please. files, directories, autocomplete

2006-10-07 Thread simonharrison
Hello everyone. Hopefully someone can point me in the right direction here. I'm wanting to write a script to open microsoft word and adobe pdf documents . Here is a little background: At the company where I work (an inspection firm) all reports of inspections are saved as word files. A particular

Re: Kde Taskbar

2006-10-07 Thread DarkBlue
David Boddie wrote: > On Saturday 07 October 2006 14:59, DarkBlue wrote: > >> In linux I use kmail as my email client under KDE, >> if a message comes in the Kontact button in the >> taskbar changes to blue. >> How can I have the same behaviour in a python app ? > > You need to activate the wind

Re: Kde Taskbar

2006-10-07 Thread DarkBlue
Diez B. Roggisch wrote: > > pykde afaik supports systray-iconified apps. And you could use the > dcop-mechanisms that are available as command line tools as well I > guess, and invoke knotify. > > Hope this gives you some pointers - I'm currently on my mac so I can't > provide an actual example.

Re: Kde Taskbar

2006-10-07 Thread David Boddie
On Saturday 07 October 2006 14:59, DarkBlue wrote: > In linux I use kmail as my email client under KDE, > if a message comes in the Kontact button in the > taskbar changes to blue. > How can I have the same behaviour in a python app ? You need to activate the window associated with the applicatio

Re: Names changed to protect the guilty

2006-10-07 Thread Aahz
In article <[EMAIL PROTECTED]>, John Machin <[EMAIL PROTECTED]> wrote: >Aahz wrote: >> In article <[EMAIL PROTECTED]>, >> MonkeeSage <[EMAIL PROTECTED]> wrote: >>>On Oct 6, 6:27 pm, [EMAIL PROTECTED] (Aahz) wrote: The following line of lightly munged code was found in a publicly avai

Re: Python to use a non open source bug tracker?

2006-10-07 Thread James Graham
Steve Holden wrote: > Giovanni Bajo wrote: > [...] >> >> I understand your concerns, but I have to remember you that most bug >> reports >> submitted by users go totally ignored for several years, or, better, >> forever. I >> do not have a correct statistic for this, but I'm confident that at >>

Re: building strings from variables

2006-10-07 Thread Gal Diskin
First of all - thanks for all the replies. (Sorry for my slowness in answering, but I wrote this message from work, just before leaving for the weekend.) I found a couple of posts that might be of interest: Regarding speed I found a similar discussion in this newsgroup with interesting results: ht

Re: building strings from variables

2006-10-07 Thread Gal Diskin
Matthew Warren wrote: > > -Original Message- > > From: > > [EMAIL PROTECTED] > > [mailto:[EMAIL PROTECTED] > > rg] On Behalf Of Gal Diskin > > Sent: 05 October 2006 16:01 > > To: python-list@python.org > > Subject: building strings from variables > > > > Following a discussion with an assoc

Re: Kde Taskbar

2006-10-07 Thread Diez B. Roggisch
DarkBlue schrieb: > Hello > > In linux I use kmail as my email client under KDE, > if a message comes in the Kontact button in the > taskbar changes to blue. > How can I have the same behaviour in a python app ? > > I have a python script which runs nicely under linux > now every so often I want

Re: Python to use a non open source bug tracker?

2006-10-07 Thread Robert Hicks
Giovanni Bajo wrote: > You might also be understimating how negative could be the reaction from the > open-source community to such a move. > -- > Giovanni Bajo That is simply rediculous. Step away from the kool-aid. Robert -- http://mail.python.org/mailman/listinfo/python-list

Re: Python to use a non open source bug tracker?

2006-10-07 Thread Robert Hicks
Steve Holden wrote: > Perhaps what I *should* have written was "Sadly *many* people spend too > much time bitching and moaning about those that roll their sleeves up, > and not enough rolling their own sleeves up and pitching in". > > Sniping from the sidelines is far easier than hard work toward

Re: Python to use a non open source bug tracker?

2006-10-07 Thread Robert Hicks
Giovanni Bajo wrote: > Paul Rubin wrote: > > >> You fail to recognize that Python is *already* using a non-free > >> software for bug tracking, as do thousands of other projects. > > > > I don't think that reflects an explicit decision. SF started out as > > free software and the software became

Re: Names changed to protect the guilty

2006-10-07 Thread John Machin
John Roth wrote: > Aahz wrote: > > The following line of lightly munged code was found in a publicly > > available Python library... > > > > if schema.elements.has_key(key) is False: > > > > Sorry, just had to vent. > > -- > > Aahz ([EMAIL PROTECTED]) <*> http://www.pythoncra

curses problem reading cursor keys

2006-10-07 Thread Simon Morgan
Hi, I'm having trouble with the following code. The problem is that the value read by getch() when I hit the up or down keys doesn't match curses.KEY_UP or curses.KEY_DOWN respectively. Other keys, such as 'z' in my example code, work fine. I only seem to have this problem when dealing with newly

Re: error handling in user input: is this natural or just laborious

2006-10-07 Thread bruno de chez modulix en face
sam a écrit : (snip) > i'm still in the early stages, and am trying to code something simple > and interactive to get the percentages of the portfolio in the five > different investment categories. i thought i'd get in with the error > handling early so if someone types in something wrong (like a

Re: Names changed to protect the guilty

2006-10-07 Thread John Roth
Aahz wrote: > The following line of lightly munged code was found in a publicly > available Python library... > > if schema.elements.has_key(key) is False: > > Sorry, just had to vent. > -- > Aahz ([EMAIL PROTECTED]) <*> http://www.pythoncraft.com/ Uh, guys. IMO, the cleares

Kde Taskbar

2006-10-07 Thread DarkBlue
Hello In linux I use kmail as my email client under KDE, if a message comes in the Kontact button in the taskbar changes to blue. How can I have the same behaviour in a python app ? I have a python script which runs nicely under linux now every so often I want to be notified by some event, in thi

  1   2   >