Re: flattening a dict

2008-02-19 Thread Duncan Booth
Steven D'Aprano <[EMAIL PROTECTED]> wrote: > # Untested > def flattendict(d): > def gen(L): > return (x for M in exp(L) for x in rec(M)) > def exp(L): > return (L+list(kv) for kv in L.pop().iteritems()) > def rec(M): > return gen(M) if isinstance(M[-1],dict) els

Re: Error messages when using the Console Module

2008-02-19 Thread peter
> import sys > sys.stdout = open("stdout.log","w") > sys.stderr = open("stderr.log","w") > print "This goes to stdout" > print >>sys.stderr, "This goes to stderr" > This did the trick. Thanks Peter -- http://mail.python.org/mailman/listinfo/python-list

Re: usage of .encode('utf-8','xmlcharrefreplace')?

2008-02-19 Thread 7stud
On Feb 19, 12:15 am, J Peyret <[EMAIL PROTECTED]> wrote: > On Feb 18, 10:54 pm, 7stud <[EMAIL PROTECTED]> wrote: > > > One last point: you can't display a unicode string.  The very act of > > trying to print a unicode string causes it to be converted to a > > regular string.  If you try to display

Re: Garbage collection

2008-02-19 Thread Simon Pickles
Ken wrote: > What is your __del__ method doing? > Actually, nothing but printing a message when the object is deleted, just morbid curiosity. I've yet to see one of the destructor messages, tho > > from sys import getrefcount > print getrefcount(x) > > Perfect, thanks Simon -- ht

Re: average of PIL images

2008-02-19 Thread vaneric
> > def rgbTopixelvalue((r,g,b)): > >alpha=255 > >return unpack("l", pack("", b, g, r, alpha))[0] > > That's much worse than averaging the R,G,B components. oops! the intention was to pack r,g,b components into a single value sothat calculations like finding covariant matrix of a set

Re: Garbage collection

2008-02-19 Thread Jarek Zgoda
Duncan Booth napisał(a): > Pretty much. If you have a __del__ method on an object then in the worst > case the only thing that can be guaranteed is that it will be called zero, > one or more than one times. (Admittedly the last of these only happens if > you work at it). > > If it is called th

Re: average of PIL images

2008-02-19 Thread 7stud
On Feb 19, 12:13 am, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Tue, 19 Feb 2008 04:01:04 -0200, vaneric <[EMAIL PROTECTED]>   > escribió: > > > On Feb 19, 1:38 am, Robert Kern <[EMAIL PROTECTED]> wrote: > >> Averaging color > >> images is tricky; you really shouldn't do it in the RGB colo

Re: Garbage collection

2008-02-19 Thread Duncan Booth
Jarek Zgoda <[EMAIL PROTECTED]> wrote: > Is that true assumption that __del__ has the same purpose (and same > limitations, i.e. the are not guaranteed to be fired) as Java finalizer > methods? One other point I should have mentioned about __del__: if you are running under Windows and the user h

Re: Garbage collection

2008-02-19 Thread Duncan Booth
Jarek Zgoda <[EMAIL PROTECTED]> wrote: > Ken napisa³(a): > >> The good news is that you almost never have to do anything to clean up. >> My guess is that you might not even need to overload __del__ at all. >> People from a C++ background often mistakenly think that they have to >> write destruc

Re: How to get current module object

2008-02-19 Thread Gabriel Genellina
On 19 feb, 03:33, Alex <[EMAIL PROTECTED]> wrote: > GabrielGenellinawrote: > > En Mon, 18 Feb 2008 14:49:02 -0200, Alex <[EMAIL PROTECTED]> escribió: > >> That's what I've been searching for, thanks. By the way, I know it might > >> be trivial question... but function and class namespaces have __na

Re: Garbage collection

2008-02-19 Thread Hrvoje Niksic
Simon Pickles <[EMAIL PROTECTED]> writes: > Ken wrote: >> What is your __del__ method doing? >> > Actually, nothing but printing a message when the object is deleted, > just morbid curiosity. > > I've yet to see one of the destructor messages, tho Do your objects participate in reference c

Re: average of PIL images

2008-02-19 Thread Gabriel Genellina
On 19 feb, 06:28, vaneric <[EMAIL PROTECTED]> wrote: > > > def rgbTopixelvalue((r,g,b)): > > >    alpha=255 > > >    return unpack("l", pack("", b, g, r, alpha))[0] > > > That's much worse than averaging the R,G,B components. > > oops! > the intention was to pack r,g,b components into a single

Re: ANN: Phatch = PHoto bATCH processor and renamer based on PIL

2008-02-19 Thread SPE - Stani's Python Editor
On Feb 19, 4:23 am, "Daniel Fetchinson" <[EMAIL PROTECTED]> wrote: > On 2/18/08, SPE - Stani's Python Editor <[EMAIL PROTECTED]> wrote: > > I'm pleased to announce the release of Phatch which is a > > powerful batch processor and renamer. Phatch exposes a big part of the > > Python Imaging Library

Re: Double underscores -- ugly?

2008-02-19 Thread Duncan Booth
Berwyn <[EMAIL PROTECTED]> wrote: >> Is it just me that thinks "__init__" is rather ugly? Not to mention >> "if __name__ == '__main__': ..."? > > That ugliness has long been my biggest bugbear with python, too. The > __name__ == '__main__' thing is something I always have to look up, > every tim

Re: average of PIL images

2008-02-19 Thread Gabriel Genellina
On 19 feb, 06:55, 7stud <[EMAIL PROTECTED]> wrote: > On Feb 19, 12:13 am, "Gabriel Genellina" <[EMAIL PROTECTED]> > wrote: > > En Tue, 19 Feb 2008 04:01:04 -0200, vaneric <[EMAIL PROTECTED]>   > > escribió: > > > On Feb 19, 1:38 am, Robert Kern <[EMAIL PROTECTED]> wrote: > > >> Averaging color > >

Re: pyinstall and matplotlib

2008-02-19 Thread Stef Mientki
>>> Traceback (most recent call last): >>> File "multicolor.py", line 11, in ? >>> File "pylab.pyc", line 1, in ? >>> File "matplotlib\pylab.pyc", line 222, in ? >>> File "matplotlib\backends\__init__.pyc", line 24, in pylab_setup >>> File "matplotlib\backends\backend_tkagg.pyc", line 7,

Re: The big shots

2008-02-19 Thread Diez B. Roggisch
[EMAIL PROTECTED] schrieb: > I'm a little dissatisfied, and just thinking aloud. > > Some of the ideas that have been proposed on Python-ideas as well as > Python, have received partial evaluation from the alphas. > > Lesser individuals than they could not have invented Python, and would > be lia

Re: Garbage collection

2008-02-19 Thread Jarek Zgoda
Ken napisał(a): > The good news is that you almost never have to do anything to clean up. > My guess is that you might not even need to overload __del__ at all. > People from a C++ background often mistakenly think that they have to > write destructors when in fact they do not. Is that true ass

Re: flattening a dict

2008-02-19 Thread Boris Borcic
Duncan Booth wrote: > In this particular case I think the lambda does contribute to the > obfuscation. Yes, they are single expressions, but only because that > have been contorted to become single expressions. The first two return > generators, so if you don't force them into a lambda you can wr

Rsync

2008-02-19 Thread Felipe Coutinho
Is there any thing in python that synchronize directories like rsync? -- Felipe Leal Coutinho -- http://mail.python.org/mailman/listinfo/python-list

CFP: DTVCS 2008 - Design, Testing and Formal Verification Techniques for Integrated Circuits and Systems

2008-02-19 Thread ss DTVCS
Apologies for any multiple copies received. We would appreciate it if you could distribute the following call for papers to any relevant mailing lists you know of. CALL FOR PAPERS Special Sess

Re: Garbage collection

2008-02-19 Thread Duncan Booth
Jarek Zgoda <[EMAIL PROTECTED]> wrote: > Duncan Booth napisa³(a): > >> Pretty much. If you have a __del__ method on an object then in the >> worst case the only thing that can be guaranteed is that it will be >> called zero, one or more than one times. (Admittedly the last of >> these only happen

Re: The big shots

2008-02-19 Thread Bruno Desthuilliers
Diez B. Roggisch a écrit : > [EMAIL PROTECTED] schrieb: >> I'm a little dissatisfied, and just thinking aloud. (snip remaining of mostly inarticulate post, just couldn't make sens of it - as usual) > No idea what's wrong with these people here - but I bet if you team up > with Illias, you can st

Re: Garbage collection

2008-02-19 Thread Nick Craig-Wood
Hrvoje Niksic <[EMAIL PROTECTED]> wrote: > Simon Pickles <[EMAIL PROTECTED]> writes: > > > Ken wrote: > >> What is your __del__ method doing? > >> > > Actually, nothing but printing a message when the object is deleted, > > just morbid curiosity. > > > > I've yet to see one of the destructor m

Call for volunteers to help maintain bugs.python.org's issue tracker

2008-02-19 Thread Brett Cannon
The Python Software Foundation's infrastructure committee is looking for volunteers to help maintain the Roundup issue tracker installed for http://bugs.python.org. Responsibilities revolve around maintaining the Roundup installation itself (tracker schema, modifying the installed copy of Roundup,

Re: ANN: Phatch = PHoto bATCH processor and renamer based on PIL

2008-02-19 Thread Steve Holden
SPE - Stani's Python Editor wrote: > I'm pleased to announce the release of Phatch which is a > powerful batch processor and renamer. Phatch exposes a big part of the > Python Imaging Library through an user friendly GUI. (It is using > python-pyexiv2 to offer more extensive EXIF and IPTC support.)

Re: usage of .encode('utf-8','xmlcharrefreplace')?

2008-02-19 Thread Carsten Haese
On Mon, 18 Feb 2008 22:24:56 -0800 (PST), J Peyret wrote > [...] > You are right, I am confused about unicode. Guilty as charged. You should read http://www.amk.ca/python/howto/unicode to clear up some of your confusion. > [...] > Also doesn't help that I am not sure what encoding is used in th

Re: Linux/Python Issues

2008-02-19 Thread Bruno Desthuilliers
[EMAIL PROTECTED] a écrit : > > [EMAIL PROTECTED] wrote: >> IOW: all this is assumed to be >> common *n*x knowledge. > > Both GNOME and KDE put Windows to shame. An old Windows guy, like me, > can just start using either one without needing 'common *n*x > knowledge.' Err... Ever tried to compile

Re: Seemingly odd 'is' comparison.

2008-02-19 Thread Boris Borcic
Arnaud Delobelle wrote: > On Feb 13, 10:19 pm, Tobiah <[EMAIL PROTECTED]> wrote: > print float(3.0) is float(3.0) >> True > print float(3.0 * 1.0) is float(3.0) >> False > > [You don't need to wrap your floats in float()] > def f(): > ... return 3.0 is 3.0, 3.0*1.0 is 3.0 > ... >

Is there a sort-of "clear" function in Pythonwin now?

2008-02-19 Thread lilefei
Looks like there are some years old questions talking about how to clear the Pythonwin environment. But still no answer. Do we have to close Pythonwin again and again to update our modules? Thanks! -- http://mail.python.org/mailman/listinfo/python-list

Re: Garbage collection

2008-02-19 Thread Duncan Booth
Nick Craig-Wood <[EMAIL PROTECTED]> wrote: > [<__main__.Y object at 0xb7d9fc8c>, <__main__.Y object at 0xb7d9fcac>, > <__main__.Y object at 0xb7d9fc2c>] [<__main__.Y object at 0xb7d9fc8c>] > > (It behaves slightly differently in the interactive interpreter for > reasons I don't understand - so sa

Re: Call for volunteers to help maintain bugs.python.org's issue tracker

2008-02-19 Thread Paul Rubin
"Brett Cannon" <[EMAIL PROTECTED]> writes: > The Python Software Foundation's infrastructure committee is looking > for volunteers to help maintain the Roundup issue tracker installed > for http://bugs.python.org. Responsibilities revolve around > maintaining the Roundup installation itself (tracke

Thankyou for rounding help

2008-02-19 Thread katie smith
you guys all said pretty much the same thing, use a .0 and the end or float() and they all worked. Thankyou so much Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. htt

Re: Python seems to be ignoring my except clause...

2008-02-19 Thread Duncan Booth
"Adam W." <[EMAIL PROTECTED]> wrote: > I am trying to handle a Unicode error but its acting like the except > clause is not even there. Here is the offending code: > > def characters(self, string): > if self.initem: > try: > self.data.appen

Re: Python seems to be ignoring my except clause...

2008-02-19 Thread Szekeres István
Hi Adam, def characters(self, string): > Please note that "string" is also a name of a very commonly used module so it is not advised to use as a local variable name. Istvan -- http://mail.python.org/mailman/listinfo/python-list

Re: File.write() not working in a sleepy loop

2008-02-19 Thread Christian Heimes
Gavin Lusby wrote: > write outfile > o=open(os.getcwd()+g.dsep+file, 'w') > if g.verbose: > print '...writing to '+os.getcwd()+g.dsep+file > o.write('%over = (njobs => '+str(answer)+');\n') > o

Re: Call for volunteers to help maintain bugs.python.org's issue tracker

2008-02-19 Thread Paul Rubin
Duncan Booth <[EMAIL PROTECTED]> writes: > Ok, I'll bite. In what way is Roundup proprietary? Whoops! I was thinking of JIRA, the proprietary system (if I got it right THAT time), that was rejected in favor of Roundup. Sorry!!! http://mail.python.org/pipermail/python-dev/2006-October/069139.htm

Re: Double underscores -- ugly?

2008-02-19 Thread Jason
On Feb 18, 3:28 pm, benhoyt <[EMAIL PROTECTED]> wrote: > Hi guys, > > I've been using Python for some time now, and am very impressed with > its lack of red tape and its clean syntax -- both probably due to the > BDFL's ability to know when to say "no". > > Most of the things that "got me" initiall

Re: Call for volunteers to help maintain bugs.python.org's issue tracker

2008-02-19 Thread Duncan Booth
Paul Rubin wrote: > "Brett Cannon" <[EMAIL PROTECTED]> writes: >> The Python Software Foundation's infrastructure committee is looking >> for volunteers to help maintain the Roundup issue tracker installed >> for http://bugs.python.org. Responsibilities revolve around >>

Re: Python seems to be ignoring my except clause...

2008-02-19 Thread Adam W.
On Feb 19, 8:49 am, Duncan Booth <[EMAIL PROTECTED]> wrote: > The example you posted isn't complete and while I can easily expand it to a > working example it will unfortunately be a working example. > > Try cutting it down yourself to a minimal self-contained example that you > can post. 99% of th

Re: Double underscores -- ugly?

2008-02-19 Thread Marco Mariani
Ben Finney wrote: >> I realise that double underscores make the language conceptually >> cleaner in many ways (because fancy syntax and operator overloading >> are just handled by methods), but they don't *look* nice. > > That's a good thing, in that it draws attention to the names. Well, double

File.write() not working in a sleepy loop

2008-02-19 Thread Gavin Lusby
Hello, I am getting odd behaviour when I am trying to write a file in a while loop with a sleep function call. I am trying to periodically change the number of jobs on a cluster depending on the current usage and a dummy version that does not require access to the cluster usage is attached at the

[EMAIL PROTECTED]

2008-02-19 Thread Matias Surdi
test -- http://mail.python.org/mailman/listinfo/python-list

psycopg2: connect copy_from and copy_to

2008-02-19 Thread Thomas Guettler
Hi, I want to copy data from a production database to a testing database. Up to now I used psycopg2 and copy_from and copy_to with two cursors and a temporary file. This works, but it would be better, if the data gets piped from one cursor to the next without a temporary file. The psycopg2 metho

[EMAIL PROTECTED]

2008-02-19 Thread Matias Surdi
test -- http://mail.python.org/mailman/listinfo/python-list

Re: Seemingly odd 'is' comparison.

2008-02-19 Thread Duncan Booth
Boris Borcic <[EMAIL PROTECTED]> wrote: > Arnaud Delobelle wrote: >> Whereas when "3.0*1.0 is 3.0" is evaluated, *two* different float >> objects are put on the stack and compared (LOAD_CONST 3 / LOAD_CONST >> 1 / COMPARE_OP 8). Therefore the result is False. > > Looks good, but doesn't pass the

Re: Seemingly odd 'is' comparison.

2008-02-19 Thread Boris Borcic
Duncan Booth wrote: > Boris Borcic <[EMAIL PROTECTED]> wrote: >> Arnaud Delobelle wrote: >>> Whereas when "3.0*1.0 is 3.0" is evaluated, *two* different float >>> objects are put on the stack and compared (LOAD_CONST 3 / LOAD_CONST >>> 1 / COMPARE_OP 8). Therefore the result is False. >> Looks goo

Re: SOAP strategies

2008-02-19 Thread Paul Watson
On Sat, 2008-02-16 at 10:59 -0600, Paul Watson wrote: > What are the reasonable current day choices and best bets for the future > when doing SOAP programming in Python? SOAP batteries do not appear to > be in the standard Python distribution. > > Most of the SOAP related information I have been

Re: Seemingly odd 'is' comparison.

2008-02-19 Thread Paul Rubin
Christian Heimes <[EMAIL PROTECTED]> writes: > >>> id(2000) > 3084440752 > >>> id(2001) > 3084440752 Python 2.4.4 (#1, Oct 23 2006, 13:58:00) >>> id(2000) 155211416 >>> id(2001) 155211416 >>> id(2000) == id(2001) False >From the docs: id( object) Return the ``ide

Re: psycopg2: connect copy_from and copy_to

2008-02-19 Thread Chris
On Feb 19, 6:23 pm, Thomas Guettler <[EMAIL PROTECTED]> wrote: > > Doesn't PostGres come with Export/Import apps ? That would be easiest > > (and faster). > > Yes, you can use "pg_dump production ... | psql testdb", but > this can lead to dead locks, if you call this during > a python script which

Re: Double underscores -- ugly?

2008-02-19 Thread Hyuga
On Feb 19, 4:01 am, Duncan Booth <[EMAIL PROTECTED]> wrote: > Berwyn <[EMAIL PROTECTED]> wrote: > >> Is it just me that thinks "__init__" is rather ugly? Not to mention > >> "if __name__ == '__main__': ..."? > > > That ugliness has long been my biggest bugbear with python, too. The > > __name__ ==

Re: ANN: Phatch = PHoto bATCH processor and renamer based on PIL

2008-02-19 Thread Fred Pacquier
Steve Holden <[EMAIL PROTECTED]> said : > Perhaps you could put a link to the source on the Windows instalL page? > I don't mind being a second-class citizen, but it's annoying to have to > jump around like that. I'm interested too, and was also wondering if Phatch is as full-featured unders W

Re: Double underscores -- ugly?

2008-02-19 Thread Wildemar Wildenburger
Jason wrote: > Hmm. I must be the only person who doesn't think the double > underscores are ugly. Nope. I like them too. :) Frankly, I think it's just a matter of adaption. I too found it rather "ugly" in the beginning, but with anything, I've gotten used to it. (And I wholeheartedly support

Re: Seemingly odd 'is' comparison.

2008-02-19 Thread Christian Heimes
Steven D'Aprano wrote: > "is" is a comparison operator: it compares identity, not equality. It is > more or less equivalent to the expression id(x) == id(y). Yes, the implementation of the is operator comes down to the comparison of PyObject* pointer addresses and in CPython id() returns the addr

Re: psycopg2: connect copy_from and copy_to

2008-02-19 Thread Chris
On Feb 19, 5:06 pm, Thomas Guettler <[EMAIL PROTECTED]> wrote: > Hi, > > I want to copy data from a production database to > a testing database. Up to now I used psycopg2 and > copy_from and copy_to with two cursors and a temporary file. > > This works, but it would be better, if the data > gets pi

Python seems to be ignoring my except clause...

2008-02-19 Thread Adam W.
I am trying to handle a Unicode error but its acting like the except clause is not even there. Here is the offending code: def characters(self, string): if self.initem: try: self.data.append(string.encode()) except:

Re: psycopg2: connect copy_from and copy_to

2008-02-19 Thread Thomas Guettler
> Doesn't PostGres come with Export/Import apps ? That would be easiest > (and faster). Yes, you can use "pg_dump production ... | psql testdb", but this can lead to dead locks, if you call this during a python script which is in the middle of a transaction. The python script locks a table, so tha

Re: Seemingly odd 'is' comparison.

2008-02-19 Thread Christian Heimes
Asun Friere wrote: > So was that a yes or no? I mean is it even possible for the identity > behaviour of mutables to vary between implementations? I can't see > how they can possibly be interned, but is there some other factor I'm > missing in regard to identity behaviour which could in fact vary

Re: Linux/Python Issues

2008-02-19 Thread Sion Arrowsmith
<[EMAIL PROTECTED]> wrote: >CNR, which is now free, is absolutely marvelous when it's got what you >need. If Python2.5 were in the warehouse, I'd have clicked, gone to >make a cup of coffee and the appropriate icon would be on my desktop >when I came back. If I were Python.org I'd not consider any

Re: Linux/Python Issues

2008-02-19 Thread Bjoern Schliessmann
[EMAIL PROTECTED] wrote: > CNR, which is now free, is absolutely marvelous when it's got what > you need. If Python2.5 were in the warehouse, I'd have clicked, > gone to make a cup of coffee and the appropriate icon would be on > my desktop when I came back. Why don't you switch to a distributio

Re: Encrypting a short string?

2008-02-19 Thread Brian
Hi Erik, I really don't recommend the ROT13 cipher, as this is extremely easy to crack. Most grade school kids could break this one in seconds. ;-) If the project that you are working upon has low security needs, (in other words, it's not a financial institution), than you might try somethin

Re: Linux/Python Issues

2008-02-19 Thread Bjoern Schliessmann
[EMAIL PROTECTED] wrote: > Both GNOME and KDE put Windows to shame. An old Windows guy, like > me, can just start using either one without needing 'common *n*x > knowledge.' Sure, go and compile them from the sources. The X server too, please (I got half insane from that once). > Too bad the *n

Re: psycopg2: connect copy_from and copy_to

2008-02-19 Thread james . pye
> Doesn't PostGres come with Export/Import apps ? That would be easiest > (and faster). Yes, PostgreSQL core has import/export apps, but they tend to target general administration rather than transactional loading/moving of data. ie, dump and restore a database or schema. There is a pgfoundry proj

Re: psycopg2: connect copy_from and copy_to

2008-02-19 Thread james . pye
On Feb 19, 9:23 am, Thomas Guettler <[EMAIL PROTECTED]> wrote: > Yes, you can use "pg_dump production ... | psql testdb", but > this can lead to dead locks, if you call this during > a python script which is in the middle of a transaction. The python > script locks a table, so that psql can't write

Re: psycopg2: connect copy_from and copy_to

2008-02-19 Thread james . pye
On Feb 19, 8:06 am, Thomas Guettler <[EMAIL PROTECTED]> wrote: > Any suggestions? If you don't mind trying out some beta quality software, you can try my pg_proboscis driver. It has a DBAPI2 interface, but for you to use COPY, you'll need to use the GreenTrunk interface: import postgresql.interfa

python-ldap for plone 3 (python 2.4.4)

2008-02-19 Thread Erol Robaina Cepero
Hi friend!! I need download python-ldap for my plone 3.0.5 that use python 2.4.4. Do you know where I can find it? bye -- http://mail.python.org/mailman/listinfo/python-list

Re: Py_Finalize ERROR!

2008-02-19 Thread james . pye
On Feb 19, 12:11 am, zaley <[EMAIL PROTECTED]> wrote: > Py_Finalize ERROR! > > In my C++ program ,python is embeded . I create one win thread to run > embedded Python code . > So at the begin of thread function I call "Py_Initialize" and at the > end of thread function call "Py_Finalize" . > But af

Re: average of PIL images

2008-02-19 Thread vaneric
> > a) Work with the 3 components in parallel (that is, use 3 separate > matrices, one for each component, and regenerate the image at the > end). that wd be ok for image generation ..but to calculate covariance matrix from the set of images i don't know if it wd work eric -- http://mail.pyth

Re: python-ldap for plone 3 (python 2.4.4)

2008-02-19 Thread Michael Ströder
Erol Robaina Cepero wrote: > I need download python-ldap for my plone 3.0.5 that use python 2.4.4. > > Do you know where I can find it? http://python-ldap.sourceforge.net/download.shtml Ciao, Michael. -- http://mail.python.org/mailman/listinfo/python-list

Re: SOAP strategies

2008-02-19 Thread Paul Boddie
On 19 Feb, 16:59, Paul Watson <[EMAIL PROTECTED]> wrote: > > Have I offended? My apologies if I have. I thought I showed that I had > done some homework and used Google and did the other things to show that > I was willing to put forth some effort. Please tell me if I have missed > something. I

Re: Threading the Python interpreter

2008-02-19 Thread Douglas Wells
In article <[EMAIL PROTECTED]>, Nick Stinemates <[EMAIL PROTECTED]> writes: > MooJoo wrote: > > Since I'm running each python instance in a new process, I don't believe > > that there is a problem and, in my testing so far, I haven't encountered > > anything that would lead me to believe there

Re: ANN: Phatch = PHoto bATCH processor and renamer based on PIL

2008-02-19 Thread Daniel Fetchinson
> > > I'm pleased to announce the release of Phatch which is a > > > powerful batch processor and renamer. Phatch exposes a big part of the > > > Python Imaging Library through an user friendly GUI. (It is using > > > python-pyexiv2 to offer more extensive EXIF and IPTC support.) Phatch > > > is no

Re: Seemingly odd 'is' comparison.

2008-02-19 Thread Arnaud Delobelle
On Feb 19, 1:47 pm, Boris Borcic <[EMAIL PROTECTED]> wrote: > Arnaud Delobelle wrote: > > On Feb 13, 10:19 pm, Tobiah <[EMAIL PROTECTED]> wrote: > > print float(3.0) is float(3.0) > >> True > > print float(3.0 * 1.0) is float(3.0) > >> False > > > [You don't need to wrap your floats in floa

Re: problem with mod_python

2008-02-19 Thread Joshua Kugler
Pradnyesh Sawant wrote: > Hello, > I have a small program which does 'import hashlib'. This program runs fine > with python2.5. But when I try running the same program through > mod_python, I get the error: 'ImportError: No module named hashlib' in the > apache2 error.log > > Searching online sug

Re: Py_Finalize ERROR!

2008-02-19 Thread Gabriel Genellina
On 19 feb, 05:11, zaley <[EMAIL PROTECTED]> wrote: > Py_Finalize ERROR! > > In my C++ program ,python is embeded . I create one win thread to run > embedded Python code . > So at the begin of thread function I call "Py_Initialize" and at the > end of thread function call "Py_Finalize" . > But after

Re: Why must implementing Python be hard unlike Scheme?

2008-02-19 Thread [EMAIL PROTECTED]
http://codespeak.net/pypy/dist/pypy/doc/getting-started.html#what-is-... > > George I'm very excited about PyPy. It would still be nice to see a nice succinct list of major design principles of Python implementations somewhere. chris -- http://mail.python.org/mailman/listinfo/python-list

firefox cache & Python

2008-02-19 Thread subeen
Hi, I have got into an interesting problem. Today I found that if I type "about:cache?device=disk" (without the quotes) in the address bar of firefox, it displays disk cache information. Now I am thinking to write a Python program that will read this cache info. My initial idea is to somehow save

Re: Python seems to be ignoring my except clause...

2008-02-19 Thread Jonathan Gardner
On Feb 19, 6:14 am, "Adam W." <[EMAIL PROTECTED]> wrote: > So I deleted my .pyc files and reran, same thing, but then I closed all > open windows and reran it, and it recompiled the pyc and the code > "worked". > ... > But now I know I have to keep deleting my > pyc files or else I will run into tr

Querying a complex website

2008-02-19 Thread schweet1
Greetings, I am attempting to use python to submit a query to the following URL: https://ramps.uspto.gov/eram/patentMaintFees.do The page looks simple enough - it requires submitting a number into 2 form boxes and then selecting from the pull down. However, my test scripts have been hung up, ap

Threads vs. continuations

2008-02-19 Thread miller . paul . w
I've been doing some thinking, and I've halfway convinced myself of the following statement: that threads as implemented by Python (or Java) are exactly equivalent to one-shot continuations in Scheme. Am I right? (I'd have asked in the scheme groups, but I feel like I'm less likely to get flamed

Re: Using a signal to terminate a programm running with an asyncore loop

2008-02-19 Thread [EMAIL PROTECTED]
On Feb 8, 4:03 pm, Larry Bates <[EMAIL PROTECTED]> wrote: > When signal is caught handle_shutdown_signal is called. At that point > SHUTDOWN_PERFORMED will ALWAYS be False. Normally all you do in this function > is to set SHUTDOWN_PERFORMED to True and have a test somewhere in your main > program

Re: C function in a Python context

2008-02-19 Thread castironpi
> #include > #include This modification required: compilercommand='c:/programs/mingw/bin/g++' and strctypes= { 'i': 'int', 's': 'const char*', 'O': 'PyObject*' } The output is: #include [ user code ] static PyObject * extcode_enumfactors(PyObject *self, PyObject *args) {

Re: Threads vs. continuations

2008-02-19 Thread Tim Daneliuk
[EMAIL PROTECTED] wrote: > I've been doing some thinking, and I've halfway convinced myself of > the following statement: that threads as implemented by Python (or > Java) are exactly equivalent to one-shot continuations in Scheme. Am > I right? (I'd have asked in the scheme groups, but I feel li

Re: Passing a callable object to Thread

2008-02-19 Thread castironpi
>         The "ice-cream" example given earlier does /not/ fit the idea of a > tuple to me; "Vanilla", "Chocolate", and "Strawberry" isn't a tuple -- > it's a list... Flavor* flavors[]= { Vanilla, Chocolate, Strawberry }; flavorct= 3; -- http://mail.python.org/mailman/listinfo/python-list

Re: SOAP strategies

2008-02-19 Thread Paul Watson
On Tue, 2008-02-19 at 10:01 -0800, Paul Boddie wrote: > On 19 Feb, 16:59, Paul Watson <[EMAIL PROTECTED]> wrote: > > > > Have I offended? My apologies if I have. I thought I showed that I had > > done some homework and used Google and did the other things to show that > > I was willing to put for

Re: ANN: Phatch = PHoto bATCH processor and renamer based on PIL

2008-02-19 Thread Wolfgang Strobl
"SPE - Stani's Python Editor" <[EMAIL PROTECTED]>: >I develop Phatch on Ubuntu/Linux, but I have tested and polished it >regularly on Windows and Mac Os X. (Only the droplet functionality >needs to be ported.) Phatch is submitted to Debian unstable and >Ubuntu Hardy. Packagers for other platforms

Re: The big shots

2008-02-19 Thread castironpi
On Feb 19, 5:17 am, Bruno Desthuilliers wrote: > Diez B. Roggisch a écrit :> [EMAIL PROTECTED] schrieb: > >> I'm a little dissatisfied, and just thinking aloud. > > (snip remaining of mostly inarticulate post, just couldn't make sens of > it - as usual) > > > No idea what's wrong with these people

Re: The big shots

2008-02-19 Thread Carsten Haese
On Tue, 2008-02-19 at 12:49 -0800, [EMAIL PROTECTED] wrote: > Ok, take this one. C is faster than Python. It would be useful, in > certain cases, to write C. > > It is possible but inconvenient, out of the way. Making that easier is a worthy goal... > Date: Sat, 9 Feb 2008 11:48:51 -0800 (PST

Re: standardization allows?

2008-02-19 Thread castironpi
On Feb 13, 4:41 pm, [EMAIL PROTECTED] wrote: > Standardization helps avoid the readability and reliability problems > which arise when many different individuals create their own slightly > varying implementations, each with their own quirks and naming > conventions. Standardization allows RCA cab

Re: SOAP strategies

2008-02-19 Thread Paul Watson
On Tue, 2008-02-19 at 10:01 -0800, Paul Boddie wrote: > On 19 Feb, 16:59, Paul Watson <[EMAIL PROTECTED]> wrote: > > > > Have I offended? My apologies if I have. I thought I showed that I had > > done some homework and used Google and did the other things to show that > > I was willing to put fo

Re: Threads vs. continuations

2008-02-19 Thread Aahz
In article <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]> wrote: > >If that's the case, it seems threads plus hygeinic macros and a few >primitives a la Scheme would form a solid basis upon which to build a >programming language. The only thing preventing Python from being >that language is the difficu

Re: The big shots

2008-02-19 Thread castironpi
On Feb 19, 3:15 pm, Carsten Haese <[EMAIL PROTECTED]> wrote: > On Tue, 2008-02-19 at 12:49 -0800, [EMAIL PROTECTED] wrote: > > Ok, take this one.  C is faster than Python.  It would be useful, in > > certain cases, to write C. > > > It is possible but inconvenient, out of the way. > > Making that e

Re: standardization allows?

2008-02-19 Thread Gerardo Herzig
[EMAIL PROTECTED] wrote: >Standardization allows RCA cables, bumpers, and 115V plugs. The Bill >of Rights allows Huckleberry Finn. What is the analogue of the Bill >of Rights for programmers and users, whether of programming languages >or latter-generation software? > > I want that drogues, ma

Re: Double underscores -- ugly?

2008-02-19 Thread Ben Finney
Marco Mariani <[EMAIL PROTECTED]> writes: > Ben Finney wrote: > > >> I realise that double underscores make the language conceptually > >> cleaner in many ways (because fancy syntax and operator overloading > >> are just handled by methods), but they don't *look* nice. > > > > That's a good thing

Re: standardization allows?

2008-02-19 Thread Paul Rubin
[EMAIL PROTECTED] writes: > Standardization allows RCA cables, bumpers, and 115V plugs. The Bill > of Rights allows Huckleberry Finn. What is the analogue of the Bill > of Rights for programmers and users, whether of programming languages > or latter-generation software? http://gplv3.fsf.org ;

Re: The big shots

2008-02-19 Thread castironpi
On Feb 19, 12:37 am, George Sakkis <[EMAIL PROTECTED]> wrote: > On Feb 19, 12:08 am, [EMAIL PROTECTED] wrote: > > > The problem did not seem to be miscommunication, rather bias. > > IMHO it's partly because of the obscurity of the ideas and the code > you suggest, and partly because of the poor job

Re: What's "the standard" for code docs?

2008-02-19 Thread Preston Landers
On Feb 16, 1:56 am, John Nagle <[EMAIL PROTECTED]> wrote: > Preston Landers wrote: > > Hey guys and gals. What are all the cool kids using these days to > > document their code? > >HTML. Text-only docs are so last-cen. My sarcasometer is broken today... are you being serious? -- http://ma

Re: standardization allows?

2008-02-19 Thread castironpi
On Feb 19, 4:05 pm, Paul Rubin wrote: > [EMAIL PROTECTED] writes: > > Standardization allows RCA cables, bumpers, and 115V plugs.  The Bill > > of Rights allows Huckleberry Finn.  What is the analogue of the Bill > > of Rights for programmers and users, whether of program

Re: Threads vs. continuations

2008-02-19 Thread Arnaud Delobelle
On Feb 19, 8:26 pm, [EMAIL PROTECTED] wrote: [...] > The only thing preventing Python from being > that language is the difficulty of integrating a macro system, n'est- > ce pas? Well there's logix (http://www.livelogix.net/logix/) -- Arnaud -- http://mail.python.org/mailman/listinfo/python-li

Re: firefox cache & Python

2008-02-19 Thread Gabriel Genellina
En Tue, 19 Feb 2008 17:44:57 -0200, subeen <[EMAIL PROTECTED]> escribió: > I have got into an interesting problem. Today I found that if I type > "about:cache?device=disk" (without the quotes) in the address bar of > firefox, it displays disk cache information. Now I am thinking to > write a Pyt

  1   2   >