Re: sorteddict PEP proposal [started off as orderedict]

2007-09-26 Thread Mark Summerfield
On 25 Sep, 22:33, Paul Hankin <[EMAIL PROTECTED]> wrote: > On Sep 25, 9:55 pm, Mark Summerfield <[EMAIL PROTECTED]> > wrote: > > > ... > > class sorteddict(dict): > > > ... > > if self.__keys is None: > > self.__keys = sorted(dict.keys(self), cmp=self.__cmp, > >

Urgent Requirement for Bangalore Location

2007-09-26 Thread kishore
Hi This is krishna kishore from MindRiver. We have an Urgent requirement for Python Developers with 5-7Yrs of Exp Mandatory Skills :Python and c and c++ Exp :5-7 yrs Qualification

Re: stopping a while True: with the keyboard

2007-09-26 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, patrick wrote: > i am looking for a way to break a while True: when pressing "s" on my > keyboard. how can i do this? -- http://mail.python.org/mailman/listinfo/python-list

Re: Google and Python

2007-09-26 Thread Hendrik van Rooyen
"Paul Rubin" wrote: > "Hendrik van Rooyen" writes: > > What is the advantage of passing the open file rather than just the > > fully qualified file name and having the other process open the > > file itself? > > The idea is that the application is a web server. The socket listener >

FTP upload through proxy

2007-09-26 Thread dc79it
Hi, I hav'been searching the groups for a way to _upload_ a file to a ftp site using a proxy server with URLLIB (1 or 2) or FTPLIB. I can download a file from a ftp site through the proxy - but I need to be able to upload. There are some postings about file uploads using http_post but none menti

Re: Inserting an element into existing xml file

2007-09-26 Thread Fredrik Lundh
Anand wrote: > I'm Afraid to say, I can't use lxml or elementTree as it requires many > legal approvals and there is high chances of not getting it through. > So Do you have any other method / idea just by using plain 2.4 to > accomplish the task Are you allowed to use code samples you found on t

Re: Python XML API's that preserve XML comments?

2007-09-26 Thread Stefan Behnel
Dan Stromberg wrote: > Are there any python XML parsing API's that preserve comments - Try lxml. http://codespeak.net/lxml > preferrably that come with python 2.5.1? It doesn't come with Python 2.5.1, but it's compatible to ElementTree, which is part of the stdlib. So you can have a fallback t

Re: database persistence with mysql, sqlite

2007-09-26 Thread Bryan Olson
coldpizza wrote: > It turned out that the method above ('SELECT * FROM TABLE LIMIT L1, > L2') works ok both with mysql and sqlite3, therefore I have decided to > stick with it until I find something better. With Sqlite3 you are > supposed to use LIMIT 10 OFFSET NN, but it also apparently supports >

unable to load dco2 in python

2007-09-26 Thread bbansi_1982
Hi, I have built DCOracle2 with python. But when i try to import dco2 inside python prompt it gives me the error Failed to load dco2.sl although it has been built properly and dlopen is also able to load the shared library without any unresolved symbols. The machine details are as follows:

Re: Hello Gabriel cant help noticing you

2007-09-26 Thread Gabriel Genellina
En Wed, 26 Sep 2007 03:35:25 -0300, hrishy <[EMAIL PROTECTED]> escribi�: > I couldnt help but to write this mail. > > I am not a python programmer just a shell script coder > and i am planning to learn some decent python and > raise my level from a shell script junkie to a Python > gentleman the w

Re: ANN: PyPE 2.8.7

2007-09-26 Thread stef
thebjorn wrote: > On Sep 25, 12:46 pm, stef <[EMAIL PROTECTED]> wrote: > >> Another problem, >> I tried to run PyPE in my "old IDE", >> > > instead of double-clicking on the PyPE.exe file? Why? > to get the traceback. cheers, Stef -- http://mail.python.org/mailman/listinfo/python-list

Re: ANN: PyPE 2.8.7

2007-09-26 Thread stef
thebjorn wrote: > On Sep 25, 12:37 pm, stef <[EMAIL PROTECTED]> wrote: > >> Josiah Carlson wrote: >> >>> === What is PyPE? === >>> PyPE (Python Programmers' Editor) was written in order to offer a >>> lightweight but powerful editor for those who think emacs is too much >>> and idle is too

Re: setuptools without unexpected downloads

2007-09-26 Thread Diez B. Roggisch
Ben Finney schrieb: > Ben Finney <[EMAIL PROTECTED]> writes: > >> How can I, as the distributor of a package using setuptools, gain >> the benefits of dependency declaration and checking, without the >> drawback of unexpected and potentially unwanted download and >> installation? > > To clarify:

Re: the address of list.append and list.append.__doc__

2007-09-26 Thread Bruno Desthuilliers
HYRY a écrit : >> No. a.append is a "bound method" - a method that already has an >> associated instance, that will be provided as the first argument to the >> method call. Bound methods are created "on the fly". >> > > Does this means there is no method to get the original methods from > the Boun

Re: os.popen and lengthy operations

2007-09-26 Thread Dmitry Teslenko
Hello! On 24/09/2007, Tommy Nordgren <[EMAIL PROTECTED]> wrote: >Your problem is that you are not reading the standard output and > standard error streams in the correct way. > You need to do the reading of standard out and standard err in > parallell rather than sequentially. > The called

Re: Zope review

2007-09-26 Thread Bruno Desthuilliers
Egon Frerich a écrit : > Zope 3 uses Twisted Chapter and verse ??? -- http://mail.python.org/mailman/listinfo/python-list

Re: setuptools without unexpected downloads

2007-09-26 Thread Ben Finney
"Diez B. Roggisch" <[EMAIL PROTECTED]> writes: > Ben Finney schrieb: > > To clarify: I want to retain the "assert the specified > > dependencies are satisfied" behaviour, without the "... and, if > > not, download and install them the Setuptools Way" behaviour. > > > > Instead, I just want the def

Packaging and dependencies (was: setuptools without unexpected downloads)

2007-09-26 Thread Ben Finney
"Diez B. Roggisch" <[EMAIL PROTECTED]> writes: > In my opinion, python is steering here to a direction like Java with > it's classpath: scripts like workingenv and it's successor (forgot > the name) provide hand-tailored environments for a specific > application. What a silly waste of resources.

RE: Python-list Digest, Vol 48, Issue 391

2007-09-26 Thread kishore
Hi This is krishna kishore from MindRiver. We have an Urgent requirement for Python Developers with 5-7Yrs of Exp Mandatory Skills :Python and c and c++ Exp :5-7 yrs

Python class method as an argument of a function in a C extension

2007-09-26 Thread mauro
Hi all, I am trying to wrap some C code using SWIG (win32, mingw). I am new to SWIG and to the Python/C API so what I am doing is looking at the examples and trying to fit them to my needs, but I cannot find any complete demo example of a C function taking as an argument a Python function defined

Re: elementtree question

2007-09-26 Thread Fredrik Lundh
Stefan Behnel wrote: > ET 1.3 will also support the extend() function, BTW. div.extend(seq) can be trivially rewritten as div[len(div):] = seq and in this case, you know that len(div) is 0, so you can simply do: div[:] = seq (this recent lxml habit of using lxml-specific versions of

Re: Regular Expressions: Can't quite figure this problem out

2007-09-26 Thread Fredrik Lundh
Robert Dailey wrote: > Hmm, ElementTree.tostring() also adds a space between the last character > of the element name and the />. Not sure why it is doing this. ET is commonly used to generate (X)HTML fragments, and that space provides partial HTML compatibility. since the default serializer n

Re: Hello Gabriel cant help noticing you

2007-09-26 Thread hrishy
Hi Gabriel Well it could be a bad example when we need to do lot more things via xml but..the regex in that i have preserved it carefully thats key takeawy for a beginner like me the way the problem was dissected to arrive at what was needed regards Hrishy --- Gabriel Genellina <[EMAIL PROTECTE

Re: sorteddict PEP proposal [started off as orderedict]

2007-09-26 Thread Duncan Booth
Mark Summerfield <[EMAIL PROTECTED]> wrote: > As you've no doubt realised, this particular implementation gives best > performance when the pattern of use is: lots of edits, lots of > lookups, ..., and gives worst performance when the pattern of use is: > edit, lookup, edit, lookup (in which case

Re: database persistence with mysql, sqlite

2007-09-26 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Bryan Olson wrote: > coldpizza wrote: >> It turned out that the method above ('SELECT * FROM TABLE LIMIT L1, >> L2') works ok both with mysql and sqlite3, therefore I have decided to >> stick with it until I find something better. With Sqlite3 you are >> supposed to

KeyError: ... updated type, in planet

2007-09-26 Thread sabrina.maffioli
-- http://mail.python.org/mailman/listinfo/python-list

Pyrex installation on windows XP: step-by-step guide

2007-09-26 Thread Dominique Pignon
Bravo pour le guide d'installation! Je suppose que vous parlez français. J'ai installé pyrex suivant vos conseils tout se passe normalement l'exemple primes est installé dans /Lib/site_packages/primes.pyd le programme a été compilé mais je n'arrive pas à faore le test le module n'est pas reconnu

Re: the address of list.append and list.append.__doc__

2007-09-26 Thread Fredrik Lundh
HYRY wrote: > This works, but I think the key of DOC is too long, so I want to use > the id of list.append.__doc__ as the key; or use the id of > list.append: > > DOC[id(list.append.__doc__)] = "..." > DOC[id(list.append)] = "..." > > So, I asked how to get list.append from a.append, and why > i

Re: the address of list.append and list.append.__doc__

2007-09-26 Thread HYRY
> There's no such thing as an "original method" - what's stored as an > attribute of the class is a plain function. FWIW, you can get at this > function quite easily - via the im_func attribute of the method. I know about im_func, but I tried the im_func attribute of append and I get error: 'built

Re: Pyrex installation on windows XP: step-by-step guide

2007-09-26 Thread Fredrik Lundh
Dominique Pignon wrote: > Bravo pour le guide d'installation! > Je suppose que vous parlez français. > J'ai installé pyrex suivant vos conseils > tout se passe normalement > l'exemple primes est installé dans /Lib/site_packages/primes.pyd > > le programme a été compilé > mais je n'arrive pas à

Re: sorteddict PEP proposal [started off as orderedict]

2007-09-26 Thread Hrvoje Niksic
Duncan Booth <[EMAIL PROTECTED]> writes: > I that's the point though: you can't write one implementation that has good > performance for all patterns of use An implementation of sorted dict using a balanced tree as the underlying data structure would give decent performance in all the mentioned

Re: the address of list.append and list.append.__doc__

2007-09-26 Thread Hrvoje Niksic
HYRY <[EMAIL PROTECTED]> writes: > This works, but I think the key of DOC is too long, so I want to use > the id of list.append.__doc__ as the key; or use the id of > list.append: Using the id is not a good idea because id's are not permanent. Using list.append as the hash key will work and will

Re: setuptools without unexpected downloads

2007-09-26 Thread Diez B. Roggisch
Ben Finney wrote: > "Diez B. Roggisch" <[EMAIL PROTECTED]> writes: > >> Ben Finney schrieb: >> > To clarify: I want to retain the "assert the specified >> > dependencies are satisfied" behaviour, without the "... and, if >> > not, download and install them the Setuptools Way" behaviour. >> > >> >

Re: is there some module update(install tools)?

2007-09-26 Thread hyena
"Adonis Vargas" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > hyena wrote: >> Hi, >> >> I am quite new to python and am looking for some tools that can install >> and update modules a bit more intelligent then "python setup.py install". >> Is there some thing like "yum" in fedo

Re: Google and Python

2007-09-26 Thread Nick Craig-Wood
Hendrik van Rooyen <[EMAIL PROTECTED]> wrote: > "Paul Rubin" wrote: > > > "Hendrik van Rooyen" writes: > > > What is the advantage of passing the open file rather than just the > > > fully qualified file name and having the other process open the > > > file itself? > > > > The idea

Re: setuptools without unexpected downloads

2007-09-26 Thread Ben Finney
"Diez B. Roggisch" <[EMAIL PROTECTED]> writes: > Ben Finney wrote: > > How would I modify my 'setup.py' script so that its default > > behaviour, when dependencies are not met, is not "download and > > install dependencies via setuptools" but instead "exit with error > > message"? > > easy_instal

RE: sorting a list numbers stored as strings

2007-09-26 Thread Delaney, Timothy (Tim)
ZeD wrote: > thebjorn wrote: > >> int("020") >>> 20 >> 020 >>> 16 >> >> You can get the latter behavior using eval: > > why using eval when int has the "base" optional parameter? > int("020") > 20 int("020", 8) > 16 int("09", 8) > Traceback (most recent call last): > F

RE: sorting a list numbers stored as strings

2007-09-26 Thread Delaney, Timothy (Tim)
Hrvoje Niksic wrote: > "Delaney, Timothy (Tim)" <[EMAIL PROTECTED]> writes: > >> Yep - appears I must have been misremembering from another language >> (dunno which) > > Tcl Not bloody likely - only used Tcl for expect, and then only very minimally. I'm sure there's at least one language though

Re: the address of list.append and list.append.__doc__

2007-09-26 Thread Bruno Desthuilliers
HYRY a écrit : >> There's no such thing as an "original method" - what's stored as an >> attribute of the class is a plain function. FWIW, you can get at this >> function quite easily - via the im_func attribute of the method. > > I know about im_func, but I tried the im_func attribute of append a

Re: sorteddict PEP proposal [started off as orderedict]

2007-09-26 Thread Mark Summerfield
On 26 Sep, 09:51, Hrvoje Niksic <[EMAIL PROTECTED]> wrote: > Duncan Booth <[EMAIL PROTECTED]> writes: > > I that's the point though: you can't write one implementation that has good > > performance for all patterns of use > > An implementation of sorted dict using a balanced tree as the > underlyin

frame refresh or redraw for records?

2007-09-26 Thread Mridula Ramesh
hi. my actual code is a bit too long to post here, but this is how the code works : the application loads, the first screen appears. it is to view the records in a database, so you can scroll and view records by clicking on the standard navigation buttons ( |<, <<, >>, >| ). the problem is that s

Re: Confused about 'positive lookbehind assertion'

2007-09-26 Thread Duncan Booth
"Andrew Durdin" <[EMAIL PROTECTED]> wrote: > On 9/25/07, Karthik Gurusamy <[EMAIL PROTECTED]> wrote: >> >> Any idea what this positive lookbehind achieves which can't be done >> without it. >> I remember cases where positive look-ahead is useful. >> >> In the above example, r.search('abcdef') does

Re: PyS60

2007-09-26 Thread M�ta-MCI (MVP)
Hi! I am also interested by Python on Symbian-series 60 @+ Michel Claveau -- http://mail.python.org/mailman/listinfo/python-list

Cross-platform time out decorator

2007-09-26 Thread Joel
I've been using this nice timing out decorator : http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/307871 . The problem is that since it relies on sigalarm, it doesn't work under windows. Would anyone know how to do a cross-platform version? Thanks a lot! joel -- http://mail.python.org/ma

Re: setuptools without unexpected downloads

2007-09-26 Thread Paul Boddie
On 26 Sep, 11:16, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > > Generally speaking, I think the real problem here is the clash > between "cultures" of dependency-handling. But it's certainly beyond > setuptools scope to cope with every imaginable package management system > out there, and provi

Re: %s shortcut?

2007-09-26 Thread Carsten Haese
On Wed, 2007-09-26 at 02:55 +, james_027 wrote: > hi i have something like this > > cursor.execute(""" > select c.name, > (select from ap_invoice i where Month(i.date) = 1 and > Year(i.date) = %s and i.customer_id = c.id and i.status != 'CAN') jan, >

Re: sorteddict PEP proposal [started off as orderedict]

2007-09-26 Thread Hrvoje Niksic
Mark Summerfield <[EMAIL PROTECTED]> writes: > On 26 Sep, 09:51, Hrvoje Niksic <[EMAIL PROTECTED]> wrote: >> Duncan Booth <[EMAIL PROTECTED]> writes: >> > I that's the point though: you can't write one implementation >> > that has good performance for all patterns of use >> >> An implementation of

Re: setuptools without unexpected downloads

2007-09-26 Thread Diez B. Roggisch
> If you look at PEP 345... > > http://www.python.org/dev/peps/pep-0345/ > > ...you'll see that the dependency information described is quite close > to how such information is represented in Debian packages and with > other dependency management systems. This isn't an accident because > the auth

Re: sorteddict PEP proposal [started off as orderedict]

2007-09-26 Thread Mark Summerfield
On 26 Sep, 11:27, Hrvoje Niksic <[EMAIL PROTECTED]> wrote: > Mark Summerfield <[EMAIL PROTECTED]> writes: > > On 26 Sep, 09:51, Hrvoje Niksic <[EMAIL PROTECTED]> wrote: > >> Duncan Booth <[EMAIL PROTECTED]> writes: > >> > I that's the point though: you can't write one implementation > >> > that has

Return status from methods in socket class

2007-09-26 Thread Paul D Ainsworth
As part of a debugging investigation I would like to be able to display the return status from various methods in the socket class. The methods I'm using are accept, bind, connect, listen, send, recv although not necessarily in that order. Is this possible and if so, how? TIA, Paul. -- ht

Re: setuptools without unexpected downloads

2007-09-26 Thread Paul Boddie
On 26 Sep, 12:48, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > [Quoting me...] > > However, the argument that a dependency manager cannot deal with > > different system packages is a weak one: apt and Smart have shown that > > dependency management can be decoupled from package management. > >

Re: sorteddict PEP proposal [started off as orderedict]

2007-09-26 Thread Paul Hankin
On Sep 26, 9:31 am, Duncan Booth <[EMAIL PROTECTED]> wrote: > Mark Summerfield <[EMAIL PROTECTED]> wrote: > > As you've no doubt realised, this particular implementation gives best > > performance when the pattern of use is: lots of edits, lots of > > lookups, ..., and gives worst performance when

Documentation about pyexpat

2007-09-26 Thread Horst Jäger
Hi, is there any documentation about the pyexpat lib? Sorry if this is a stupid question :) Horst -- http://mail.python.org/mailman/listinfo/python-list

Re: sorteddict PEP proposal [started off as orderedict]

2007-09-26 Thread Paul Hankin
On Sep 26, 9:51 am, Hrvoje Niksic <[EMAIL PROTECTED]> wrote: > Duncan Booth <[EMAIL PROTECTED]> writes: > > I that's the point though: you can't write one implementation that has good > > performance for all patterns of use > > An implementation of sorted dict using a balanced tree as the > underly

Re: elementtree question

2007-09-26 Thread Stefan Behnel
Fredrik Lundh wrote: > (this recent lxml habit of using lxml-specific versions of things that > are trivial to do with the standard API is a bit disappointing. kind of > defeats the purpose of having a standard API...) ElementTree is not the only standard API that lxml is following. Another one i

Re: Return status from methods in socket class

2007-09-26 Thread Fredrik Lundh
Paul D Ainsworth wrote: > As part of a debugging investigation I would like to be able to display the > return status from various methods in the socket class. The methods I'm > using are accept, bind, connect, listen, send, recv although not necessarily > in that order. > > Is this possible a

Re: elementtree question

2007-09-26 Thread Stefan Behnel
Tim Arnold wrote: > Thanks for the great answers--I learned a lot. I'm looking forward to the ET > 1.3 version. Note that there is a difference in behaviour, though. lxml.etree forces Elements to be uniquely positioned in a tree, so the code I posted relies on the "side effect" of automatically r

Re: Documentation about pyexpat

2007-09-26 Thread Fredrik Lundh
Horst Jäger wrote: > is there any documentation about the pyexpat lib? observation 1: http://docs.python.org/lib/module-xml.parsers.expat.html "This module uses the pyexpat module to provide access to the Expat parser. Direct use of the pyexpat module is deprecated." observation 2: $ more xm

Re: setuptools without unexpected downloads

2007-09-26 Thread Diez B. Roggisch
> I think most of the evolution has been in the surrounding tools, > although stuff like the new Debian Python policy could be complicating > factors. But I don't think the dependency stuff has changed that much > over the years. It might be, yet one thing is for sure: there have been various time

Asynchronous Messaging

2007-09-26 Thread wink
Hello, I'm getting my feet wet in Python and thought I'd try to see how well Python works for asynchronous messaging. I've been using asynchronous messaging for 5 years and find it advantageous for many things. In the scheme I use communication is not only asynchronous but it is also non- blocking

Re: Asynchronous Messaging

2007-09-26 Thread Fredrik Lundh
wink wrote: > This provides two benefits, a sender is never directly effected by the > receiver and since the receiver handles only one message at a time > it generally never has to use mutexes or semaphores. This allows for > the programmer to use multiple threads without having to contend with t

Re: elementtree question

2007-09-26 Thread Fredrik Lundh
Tim Arnold wrote: > I figure there must be a way to do it by creating a 'div' SubElement to the > 'body' tag and somehow copying the rest of the tree under that SubElement, > but it's beyond my comprehension. > > How can I accomplish this? > (I know I could put the class on the body tag itself

Tracking memory usage and object life time.

2007-09-26 Thread Berteun Damman
Hello, I have programmed some python script that loads a graph (the mathemical one with vertices and edges) into memory, does some transformations on it, and then tries to find shortest paths in this graph, typically several tens of thousands. This works fine. Then I made a test for this, so I co

Re: setuptools without unexpected downloads

2007-09-26 Thread Paul Boddie
On 26 Sep, 13:44, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > > Do I understand that correctly that essentially you're saying: if you want > your software released for a certain distro, package it up for it the way > it's supposed to be? I can understand that and said so myself - but then, > th

Re: Getting rid of bitwise operators in Python 3?

2007-09-26 Thread Anurag
On Sep 22, 8:44 am, Carl Banks <[EMAIL PROTECTED]> wrote: > Anyone with me here? (I know the deadline for P3 PEPs has passed; this > is just talk.) > > Not many people are bit-fiddling these days. One of the main uses of bit > fields is flags, but that's not often done in Python because of keywor

Re: Asynchronous Messaging

2007-09-26 Thread A.T.Hofkamp
On 2007-09-26, wink <[EMAIL PROTECTED]> wrote: > Hello, > > I'm getting my feet wet in Python and thought I'd try to see how well > Python works for asynchronous messaging. I've been using asynchronous Have a look at Twisted (www.twistedmatrix.com) Albert -- http://mail.python.org/mailman/list

Re: setuptools without unexpected downloads

2007-09-26 Thread Fredrik Lundh
Paul Boddie wrote: > P.S. Of course, the package maintainer problem manifests itself most > prominently on Windows where you often see people asking for pre-built > packages or installers. for the record, I'd love to see a group of volunteers doing stuff like this for Windows. there are plenty

Re: sorteddict PEP proposal [started off as orderedict]

2007-09-26 Thread Antoon Pardon
On 2007-09-26, Mark Summerfield <[EMAIL PROTECTED]> wrote: > On 26 Sep, 11:27, Hrvoje Niksic <[EMAIL PROTECTED]> wrote: >> Mark Summerfield <[EMAIL PROTECTED]> writes: >> > On 26 Sep, 09:51, Hrvoje Niksic <[EMAIL PROTECTED]> wrote: >> >> Duncan Booth <[EMAIL PROTECTED]> writes: >> >> > I that's the

Re: Tracking memory usage and object life time.

2007-09-26 Thread Bjoern Schliessmann
Berteun Damman wrote: > When I run a test, I disable the garbage collection during the > test run (as is adviced), but just before starting a test I > instruct the garbage collector to collect. Running the test > without disabling the garbage collect doesn't show any difference > though. Did you

Re: setuptools without unexpected downloads

2007-09-26 Thread Paul Boddie
On 26 Sep, 14:23, Fredrik Lundh <[EMAIL PROTECTED]> wrote: > Paul Boddie wrote: > > P.S. Of course, the package maintainer problem manifests itself most > > prominently on Windows where you often see people asking for pre-built > > packages or installers. > > for the record, I'd love to see a group

Re: sorteddict PEP proposal [started off as orderedict]

2007-09-26 Thread Hrvoje Niksic
Paul Hankin <[EMAIL PROTECTED]> writes: >> An implementation of sorted dict using a balanced tree as the >> underlying data structure would give decent performance in all the >> mentioned use cases. For example, red-black trees search, insert, >> and delete in O(log n) time. > > But dicts do sear

Re: Test-driven development and code size

2007-09-26 Thread Joel Hedlund
> test-driven development merely means that you take that test case and > *keep it* in your unit test. Then, once you're assured that you will > find the bug again any time it reappears, go ahead and fix it. My presumption has been that in order to do proper test-driven development I would have t

Re: An Editor that Skips to the End of a Def

2007-09-26 Thread Bjoern Schliessmann
Lawrence D'Oliveiro wrote: > It's strange, but in nearly 30 years of writing code in dozens of > different languages, I've never felt the urge to line up my code > in columns. Never. You definitely used the wrong languages :) http://worsethanfailure.com/Articles/The-Other-Kind-of-RPG.aspx | We

The Big Secret inside your Laptop /Computer

2007-09-26 Thread Laptop secret
HI, We may not aware that the laptop you bring around has abig secret inside. Some of expert may have known it and keep it as secret. If you are fond of browsing in internet you may probably discover it. Read further thru this site and you may find out : http://sharinginfo4.googlepages.com/home

Re: Script to extract text from PDF files

2007-09-26 Thread byte8bits
On Sep 25, 10:19 pm, Lawrence D'Oliveiro <[EMAIL PROTECTED] central.gen.new_zealand> wrote: > > Doesn't work that well... > > This is inherent in the nature of PDF: it's a page-description language, not > a document-interchange language. Each text-drawing command can put a block > of text anywhere

Re: Test-driven development and code size

2007-09-26 Thread Diez B. Roggisch
Joel Hedlund wrote: >> test-driven development merely means that you take that test case and >> *keep it* in your unit test. Then, once you're assured that you will >> find the bug again any time it reappears, go ahead and fix it. > > My presumption has been that in order to do proper test-driven

RE: Test-driven development and code size

2007-09-26 Thread Ryan Ginstrom
> On Behalf Of Joel Hedlund > My presumption has been that in order to do proper > test-driven development I would have to make enormous test > suites covering all bases for my small hacks before I could > getting down and dirty with coding (as for example in > http://www.diveintopython.org/uni

Re: setuptools without unexpected downloads

2007-09-26 Thread Steve Holden
Fredrik Lundh wrote: > Paul Boddie wrote: > >> P.S. Of course, the package maintainer problem manifests itself most >> prominently on Windows where you often see people asking for pre-built >> packages or installers. > > for the record, I'd love to see a group of volunteers doing stuff like > th

Re: scope, modyfing outside object from inside the method

2007-09-26 Thread Marcin Stępnicki
Dnia Mon, 24 Sep 2007 10:41:22 -0300, Ricardo Aráoz napisał(a): > Would this work for you? Thank you both for help. Well - yes and no :). It's getting more interesting: First, your code: class myrow(): def __init__(self, idict = {}): self.container = idict def __str__ (self):

Re: Packaging and dependencies

2007-09-26 Thread Steve Holden
Ben Finney wrote: > "Diez B. Roggisch" <[EMAIL PROTECTED]> writes: > >> In my opinion, python is steering here to a direction like Java with >> it's classpath: scripts like workingenv and it's successor (forgot >> the name) provide hand-tailored environments for a specific >> application. > > Wha

Re: Test-driven development and code size

2007-09-26 Thread Fredrik Lundh
Diez B. Roggisch wrote: > Sounds good to me. IMHO there are two ways one gathers tests: > > - concrete bugs appear, and one writes a test that reproduces the bug & > eventually after the fix runs smoothly > > - new features are planned/implemented, and the tests accompany them right > from the

My tail call optimizing decorator

2007-09-26 Thread Miguel Perez
Please critique this tail call optimizing decorator I've written. I've tried to fix the pitfalls of other proposed decorators, and the result is this one that supports mutual recursion, does not use exceptions, stack inspection or any implementation-dependent hack, and is pretty short and fast - th

Re: sorteddict PEP proposal [started off as orderedict]

2007-09-26 Thread Mark Summerfield
On 26 Sep, 13:22, Antoon Pardon <[EMAIL PROTECTED]> wrote: > On 2007-09-26, Mark Summerfield <[EMAIL PROTECTED]> wrote: > > > > > On 26 Sep, 11:27, Hrvoje Niksic <[EMAIL PROTECTED]> wrote: > >> Mark Summerfield <[EMAIL PROTECTED]> writes: > >> > On 26 Sep, 09:51, Hrvoje Niksic <[EMAIL PROTECTED]> w

Re: sorteddict PEP proposal [started off as orderedict]

2007-09-26 Thread Duncan Booth
Paul Hankin <[EMAIL PROTECTED]> wrote: >> I suspect that for many use patterns you could improve performance >> significantly by having two levels of invalidation for the the key >> list: in __setitem__, if the key already exists you don't need to >> discard the list in __keycache (although if a k

Re: sorteddict PEP proposal [started off as orderedict]

2007-09-26 Thread Paul Hankin
On Sep 26, 2:46 pm, Duncan Booth <[EMAIL PROTECTED]> wrote: > Paul Hankin <[EMAIL PROTECTED]> wrote: > > More flexibly, keep a set of inserted keys that haven't yet been > > included in the sorted list, and a set of deleted keys that haven't > > yet been removed from the sorted list. The cache is i

Re: Packaging and dependencies

2007-09-26 Thread Diez B. Roggisch
> Agreed, but until we reach the ideal situation where everybody is using > the same package dependency system what's your practical solution? > "Self-contained" has the merit that nobody else's changes are going to > bugger about with my application on a customer's system. The extra disk > space i

Re: sorteddict PEP proposal [started off as orderedict]

2007-09-26 Thread Mark Summerfield
On 26 Sep, 14:59, Paul Hankin <[EMAIL PROTECTED]> wrote: > On Sep 26, 2:46 pm, Duncan Booth <[EMAIL PROTECTED]> wrote: > > > Paul Hankin <[EMAIL PROTECTED]> wrote: > > > More flexibly, keep a set of inserted keys that haven't yet been > > > included in the sorted list, and a set of deleted keys tha

Re: Tracking memory usage and object life time.

2007-09-26 Thread Berteun Damman
On Sep 26, 2:31 pm, Bjoern Schliessmann wrote: > Did you check the return value of gc.collect? Also, try using > other "insight" facilities provided by the gc module. gc.collect states it cannot find any unreachable objects. Meanwhile the number of objects the garbage collector has to keep track o

Re: Tracking memory usage and object life time.

2007-09-26 Thread Istvan Albert
On Sep 26, 8:06 am, Berteun Damman <[EMAIL PROTECTED]> wrote: > that have been created after I don't need them anymore. I furthermore > don't really see why there would be references to these larger objects > left. (I can be mistaken of course). This could be tricky because you have a graph that

Script to extract text from PDF files

2007-09-26 Thread David Boddie
On Wed Sep 26 15:06:54 CEST 2007, byte8bits wrote: > On Sep 25, 10:19 pm, Lawrence D'Oliveiro central.gen.new_zealand> wrote: > > > This is inherent in the nature of PDF: it's a page-description language, > > not a document-interchange language. Each text-drawing command can put a > > block of t

Re: Script to extract text from PDF files

2007-09-26 Thread brad
David Boddie wrote: > There's a little information on that online: > http://www.glyphandcog.com/textext.html Thanks, I'll read that. > Just because inserting and encoding is well documented doesn't mean that the > reverse processes are easy. :-/ Boy, that's an understatement... most of the PDF

Re: sorteddict PEP proposal [started off as orderedict]

2007-09-26 Thread Steve Holden
Mark Summerfield wrote: > On 26 Sep, 13:22, Antoon Pardon <[EMAIL PROTECTED]> wrote: [...] >> So it seems the API needs some more sorting out. > > I think you missed some of the previous postings. > > The sorteddict API that has emerged so far is (1) apart from the > constructor, everything is id

Re: Asynchronous Messaging

2007-09-26 Thread wink
On Sep 26, 4:47 am, wink <[EMAIL PROTECTED]> wrote: To make it easier to comment on the code, I'm including "mproc.py" file below. Fredrik, was commenting about using Queue and in fact I do. Queue is quite nice and is also thread safe, which is a requirement for this implementation. But its perform

Re: sorteddict PEP proposal [started off as orderedict]

2007-09-26 Thread Paul Hankin
On Sep 26, 3:24 pm, Mark Summerfield <[EMAIL PROTECTED]> wrote: > On 26 Sep, 14:59, Paul Hankin <[EMAIL PROTECTED]> wrote: > > > > > On Sep 26, 2:46 pm, Duncan Booth <[EMAIL PROTECTED]> wrote: > > > > Paul Hankin <[EMAIL PROTECTED]> wrote: > > > > More flexibly, keep a set of inserted keys that hav

Re: sorteddict PEP proposal [started off as orderedict]

2007-09-26 Thread Jeremy Sanders
Mark Summerfield wrote: > The sorteddict API that has emerged so far is (1) apart from the > constructor, everything is identical to dict, (2) the constructor > takes the same args as sorted(), so if you want to seed with a dict or > with keywords you write sorteddict(dict(a=1,b=2), ...), (or you

Re: An Editor that Skips to the End of a Def

2007-09-26 Thread Neil Cerutti
On 2007-09-26, Jason M Barnes <[EMAIL PROTECTED]> wrote: > Off the top of my head, I can think of a few vim commands that > have come in handy. I can search through a webpage in Firefox > by using the same '/' search command that vim has. The > movement keys (h,j,k,l) are the same as in any pagin

Re: sorteddict PEP proposal [started off as orderedict]

2007-09-26 Thread Mark Summerfield
On 26 Sep, 16:20, Paul Hankin <[EMAIL PROTECTED]> wrote: > On Sep 26, 3:24 pm, Mark Summerfield <[EMAIL PROTECTED]> > wrote: > > > On 26 Sep, 14:59, Paul Hankin <[EMAIL PROTECTED]> wrote: > > > > On Sep 26, 2:46 pm, Duncan Booth <[EMAIL PROTECTED]> wrote: > > > > > Paul Hankin <[EMAIL PROTECTED]> w

regex with specific list of string

2007-09-26 Thread james_027
hi, how do I regex that could check on any of the value that match any one of these ... 'jan', 'feb', 'mar', 'apr', 'may', 'jun', 'jul', 'aug', 'sep', 'oct', 'nov', 'dec' Thanks james -- http://mail.python.org/mailman/listinfo/python-list

Re: Missing documentation for ElementTree?

2007-09-26 Thread Robert Dailey
This is the documentation for 3.0a1? This is exactly what I was looking for. Thank you. @Gabriel Your documentation is also useful, it never occurred to me to check the ElementTree website for documentation. Since it came with Python I expected it to be covered by the python documentation. Thanks.

Re: Regular Expressions: Can't quite figure this problem out

2007-09-26 Thread Robert Dailey
Even better! Now I can drop the regular expression that did the same thing :) Thanks! On 9/26/07, Fredrik Lundh <[EMAIL PROTECTED]> wrote: > > Robert Dailey wrote: > > > Hmm, ElementTree.tostring() also adds a space between the last character > > of the element name and the />. Not sure why it is

  1   2   >