Re: Python Imaging Library download link broken?

2009-06-28 Thread John Machin
On Jun 28, 6:02 am, Scott David Daniels wrote: > olivergeorge wrote: > > Ditto.  Anyone know what's happening with pythonware?  (and why PIL is > > such a pain to install for that matter.) > > (2) I suggest you demand a refund. ... and tell us what the response was :-) -- http://mail.python.or

Re: fork, threads and proper closing

2009-06-28 Thread Tomasz Pajor
On 28 juin, 23:26, Tomasz Pajor wrote: Hello, Configuration is as follows. I have a starter process which creates 3 sub processes (forks) and each of this processes creates a number of threads. Threads in that processes have semaphore so on KeyboardInterrupt without sending a sigterm to t

Re: pep 8 constants

2009-06-28 Thread Peter Otten
Eric S. Johansson wrote: > MultiWordName mulitwordname > very high error rate. many retries or hand hurting typing. Can you define macros in your speech recognition software? multiwordname might slightly lower the error rate. Peter -- http://mail.python.org/mailman/listinfo/python-list

Re: No trees in the stdlib?

2009-06-28 Thread João Valverde
João Valverde wrote: Paul Rubin wrote: João Valverde writes: Interesting, thanks. The concept is not difficult to understand but I'm not sure it would be preferable. A copy operation should have the same cost as a "snapshot", You mean a deep-copy? That is unnecessarily expensive; wit

Re: handeling very large dictionaries

2009-06-28 Thread Joseph Turian
You could also try using a key-value store. I am using pytc, a Python API for Tokyo Cabinet. It seems to figure out quite nicely when to go to disk, and when to use memory. But I have not done extensive tests. Here is some example code for using pytc: http://github.com/turian/pytc-example/tree/m

Re: No trees in the stdlib?

2009-06-28 Thread João Valverde
Paul Rubin wrote: João Valverde writes: Interesting, thanks. The concept is not difficult to understand but I'm not sure it would be preferable. A copy operation should have the same cost as a "snapshot", You mean a deep-copy? That is unnecessarily expensive; with a functional struc

Re: pep 8 constants

2009-06-28 Thread alex23
"Eric S. Johansson" wrote: > no, I know the value if convention when editors can't tell you anything about > the name in question.  I would like to see more support for disabled > programmers > like myself and the thousands of programmers injured every year and forced to > leave the field.  serio

Re: Python Imaging Library download link broken?

2009-06-28 Thread Lawrence D'Oliveiro
In message <976cc575-80b9-406a- ae4d-03cb4d401...@p36g2000prn.googlegroups.com>, olivergeorge wrote: > (and why PIL is such a pain to install for that matter.) "apt-get install python-imaging", anybody? -- http://mail.python.org/mailman/listinfo/python-list

Re: No trees in the stdlib?

2009-06-28 Thread Paul Rubin
João Valverde writes: > bst[key] = object > is even dicier for immutable structures no? bst = bst.insert(key, object) -- http://mail.python.org/mailman/listinfo/python-list

Re: No trees in the stdlib?

2009-06-28 Thread Paul Rubin
João Valverde writes: > Interesting, thanks. The concept is not difficult to understand but > I'm not sure it would be preferable. A copy operation should have the > same cost as a "snapshot", You mean a deep-copy? That is unnecessarily expensive; with a functional structure you can snapshot (o

Re: No trees in the stdlib?

2009-06-28 Thread João Valverde
João Valverde wrote: Paul Rubin wrote: João Valverde writes: Could you clarify what you mean by immutable? As in... not mutable? As in without supporting insertions and deletions? Correct. That's has the same performance as using binary search on a sorted list. What's the point

Re: No trees in the stdlib?

2009-06-28 Thread João Valverde
Paul Rubin wrote: João Valverde writes: Could you clarify what you mean by immutable? As in... not mutable? As in without supporting insertions and deletions? Correct. That's has the same performance as using binary search on a sorted list. What's the point of using a tree f

Re: fork, threads and proper closing

2009-06-28 Thread OdarR
On 28 juin, 23:26, Tomasz Pajor wrote: > Hello, > > Configuration is as follows. > > I have a starter process which creates 3 sub processes (forks) and each > of this processes creates a number of threads. > Threads in that processes have semaphore so on KeyboardInterrupt without > sending a sigte

Re: pep 8 constants

2009-06-28 Thread Eric S. Johansson
Rhodri James wrote: > Reject away, but I'm afraid you've still got some work to do to > convince me that PEP 8 is more work for an SR system than any other > convention. Name name higher than normal recognition error rate. can require multiple tries or hand correction MultiWordName

Re: No trees in the stdlib?

2009-06-28 Thread Paul Rubin
João Valverde writes: > Could you clarify what you mean by immutable? As in... not mutable? As > in without supporting insertions and deletions? Correct. > That's has the same performance as using binary search on a sorted > list. What's the point of using a tree for that? The idea is you

Re: No trees in the stdlib?

2009-06-28 Thread João Valverde
Paul Rubin wrote: a...@pythoncraft.com (Aahz) writes: (In particular, WRT the bisect module, although insertion and deletion are O(N), the constant factor for doing a simple memory move at C speed swamps bytecode until N gets very large -- and we already have collections.deque() for some othe

Re: handeling very large dictionaries

2009-06-28 Thread alex23
On Jun 29, 9:13 am, mclovin wrote: > Is there something like it that is more flexible? Have you seen the stdlib module 'shelve'? http://docs.python.org/library/shelve.html It creates a persistent file-based dictionary, which can hold any type of object as long as it can be pickled. I really li

Re: Measuring Fractal Dimension ?

2009-06-28 Thread Terry Reedy
greg wrote: Steven D'Aprano wrote: one minute the grenade is sitting there, stable as can be, the next it's an expanding cloud of gas and metal fragments. I'm not sure that counts as "discontinuous" in the mathematical sense. If you were to film the grenade exploding and play it back slowly en

Re: handeling very large dictionaries

2009-06-28 Thread Aahz
In article <9efff087-bd6e-49fb-ad30-a955a64b8...@j32g2000yqh.googlegroups.com>, mclovin wrote: > >I need to have a dictionary of about 8 gigs (well the data it is >processing is around 4gb). so naturally i am running into memory >errors. > >So i looked around and found bsddb which acts like a dic

Re: Measuring Fractal Dimension ?

2009-06-28 Thread greg
Paul Rubin wrote: Steven D'Aprano writes: But that depends on what you call "things"... if electron shells are real (and they seem to be) and discontinuous, and the shells are predicted/ specified by eigenvalues of some continuous function, is the continuous function part of nature or just a

Re: Measuring Fractal Dimension ?

2009-06-28 Thread greg
Steven D'Aprano wrote: one minute the grenade is sitting there, stable as can be, the next it's an expanding cloud of gas and metal fragments. I'm not sure that counts as "discontinuous" in the mathematical sense. If you were to film the grenade exploding and play it back slowly enough, the pr

Re: tokenize module

2009-06-28 Thread bootkey
On Jun 28, 1:46 am, Tim Roberts wrote: > Jim wrote: > >I'm trying to understand the output of the tokenize.generate_tokens() > >generator.  The token types returned seem to be more general than I'd > >expect.  For example, when fed the following line of code: > > >def func_a(): > >... > >It seems

Re: Measuring Fractal Dimension ?

2009-06-28 Thread Paul Rubin
Steven D'Aprano writes: > But that depends on what you call "things"... if electron shells are real > (and they seem to be) and discontinuous, and the shells are predicted/ > specified by eigenvalues of some continuous function, is the continuous > function part of nature or just a theoretical a

Re: pep 8 constants

2009-06-28 Thread Steven D'Aprano
On Sun, 28 Jun 2009 10:09:21 -0400, Eric S. Johansson wrote: > Bruno Desthuilliers wrote: >> Brendan Miller a écrit : >>> PEP 8 doesn't mention anything about using all caps to indicate a >>> constant. >>> >>> Is all caps meaning "don't reassign this var" a strong enough >>> convention to not be c

Re: Measuring Fractal Dimension ?

2009-06-28 Thread Steven D'Aprano
On Sun, 28 Jun 2009 03:28:51 -0700, Paul Rubin wrote: > Steven D'Aprano writes: >> I thought we were talking about discontinuities in *nature*, not in >> mathematics. There's no "of course" about it. > > IIRC we were talking about fractals, which are a topic in mathematics. > This led to some di

handeling very large dictionaries

2009-06-28 Thread mclovin
Hello all, I need to have a dictionary of about 8 gigs (well the data it is processing is around 4gb). so naturally i am running into memory errors. So i looked around and found bsddb which acts like a dictionary object only offloads the data from the RAM to the HDD, however that only supports st

Re: [RELEASED] Python 3.1 final

2009-06-28 Thread Gerhard Häring
Scott David Daniels wrote: > Nobody wrote: >> On Sat, 27 Jun 2009 16:12:10 -0500, Benjamin Peterson wrote: >> >> >> That's a significant improvement >> All in all, Python 3.x still has a long way to go before it will be >> suitable for real-world use. > > Fortunately, I have assiduously avoid

Re: Column types with DB API

2009-06-28 Thread Gerhard Häring
Thomas Robitaille wrote: > Hi, > > I'm trying to use DB API compliant database modules > (psycopg2,MySQLdb,SQLite) to access SQL databases, and I am trying to > determine the type of each column in a table. The DB API defines > cursor.description which contains information about the column names a

Re: [RELEASED] Python 3.1 final

2009-06-28 Thread Rhodri James
On Sun, 28 Jun 2009 23:13:34 +0100, Martin v. Löwis wrote: On behalf of the Python development team, I'm thrilled to announce the first production release of Python 3.1. Why is everyone always thrilled to announce things? I cannot talk about everyone, but in the specific case, I suppose B

Re: pep 8 constants

2009-06-28 Thread Rhodri James
On Sun, 28 Jun 2009 15:09:21 +0100, Eric S. Johansson wrote: Bruno Desthuilliers wrote: Brendan Miller a écrit : PEP 8 doesn't mention anything about using all caps to indicate a constant. Is all caps meaning "don't reassign this var" a strong enough convention to not be considered violati

Re: [RELEASED] Python 3.1 final

2009-06-28 Thread Martin v. Löwis
>> On behalf of the Python development team, I'm thrilled to announce the >> first production release of Python 3.1. > > Why is everyone always thrilled to announce things? I cannot talk about everyone, but in the specific case, I suppose Benjamin was thrilled because it was his first release of

Re: [RELEASED] Python 3.1 final

2009-06-28 Thread Rhodri James
On Sat, 27 Jun 2009 22:12:10 +0100, Benjamin Peterson wrote: On behalf of the Python development team, I'm thrilled to announce the first production release of Python 3.1. Why is everyone always thrilled to announce things? Why is noone ever bored to announce? :-) So PEP 378 got in then?

Re: [RELEASED] Python 3.1 final

2009-06-28 Thread Martin v. Löwis
> 2. How do you do this for non-invertible encodings (e.g. ISO-2022)? ISO-2022 cannot be used as a system encoding. Please do read the responses I write, and please do identify yourself. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

fork, threads and proper closing

2009-06-28 Thread Tomasz Pajor
Hello, Configuration is as follows. I have a starter process which creates 3 sub processes (forks) and each of this processes creates a number of threads. Threads in that processes have semaphore so on KeyboardInterrupt without sending a sigterm to the subprocess i'm not able to close threads.

Re: [RELEASED] Python 3.1 final

2009-06-28 Thread Hallvard B Furuseth
Benjamin Peterson writes: >Nobody nowhere.com> writes: >> On Sun, 28 Jun 2009 19:21:49 +, Benjamin Peterson wrote: >> 1. Does Python offer any assistance in doing so, or do you have to >> manually convert the surrogates which are generated for unrecognised bytes? > > fs_encoding = sys.getfiles

Re: [RELEASED] Python 3.1 final

2009-06-28 Thread Benjamin Peterson
Nobody nowhere.com> writes: > > On Sun, 28 Jun 2009 19:21:49 +, Benjamin Peterson wrote: > > >> Yes, but do you get back the original byte strings? Maybe I'm missing > >> something, but my impression is that this is still an issue for the email > >> module as well as command-line arguments

Re: [RELEASED] Python 3.1 final

2009-06-28 Thread Nobody
On Sun, 28 Jun 2009 13:31:50 -0400, Terry Reedy wrote: >>> Nobody nowhere.com> writes: All in all, Python 3.x still has a long way to go before it will be suitable for real-world use. >>> Such as? >> >> Such as not trying to shoe-horn every byte string it encounters into >> Unicode. So

Column types with DB API

2009-06-28 Thread Thomas Robitaille
Hi, I'm trying to use DB API compliant database modules (psycopg2,MySQLdb,SQLite) to access SQL databases, and I am trying to determine the type of each column in a table. The DB API defines cursor.description which contains information about the column names and types (once .execute() has been u

Re: [RELEASED] Python 3.1 final

2009-06-28 Thread Nobody
On Sun, 28 Jun 2009 19:21:49 +, Benjamin Peterson wrote: >> Yes, but do you get back the original byte strings? Maybe I'm missing >> something, but my impression is that this is still an issue for the email >> module as well as command-line arguments and environment variables. > > The email

Re: [RELEASED] Python 3.1 final

2009-06-28 Thread Benjamin Peterson
Aahz pythoncraft.com> writes: > Yes, but do you get back the original byte strings? Maybe I'm missing > something, but my impression is that this is still an issue for the email > module as well as command-line arguments and environment variables. The email module is, yes, broken. You can recove

Re: Running a script from a windows right click menu..?

2009-06-28 Thread Michel Claveau - MVP
Bonsoir ! Un exemple là: http://www.mclaveau.com/grimoire/bleu.html#999 @-salutations -- MCI -- http://mail.python.org/mailman/listinfo/python-list

Re: creating garbage collectable objects (caching objects)

2009-06-28 Thread Dave Angel
News123 wrote: Hi. I started playing with PIL. I'm performing operations on multiple images and would like compromise between speed and memory requirement. The fast approach would load all images upfront and create then multiple result files. The problem is, that I do not have enough memory to

Re: Advantages of Python (for web/desktop apps)?

2009-06-28 Thread Aahz
In article , Benjamin Kaplan wrote: >On Sun, Jun 28, 2009 at 11:03 AM, Aahz wrote: >> In article , >> Tim Chase =A0 wrote: >>> - how do i design GUI for windows app? >>> >>>http://lmgtfy.com/?q=3Dpython+gui >> >> This is the first time I've tried LMGTFY, and it seems to be a piece of >> tras

Re: [RELEASED] Python 3.1 final

2009-06-28 Thread Aahz
In article , Benjamin Peterson wrote: >Nobody nowhere.com> writes: >> >> Such as not trying to shoe-horn every byte string it encounters into >> Unicode. Some of them really are *just* byte strings. > >You're certainly allowed to convert them back to byte strings if you want. Yes, but do you g

Re: Running a script from a windows right click menu..?

2009-06-28 Thread Gabriel Genellina
En Sun, 28 Jun 2009 10:45:49 -0300, Nuff Nuff escribió: I wrote a little script that affects a bunch of files in the folder that it is run in. Now what I want to do is to make it run from the right click menu but I don't know how. Would you give me an example script that will simply print t

Flexible warning system

2009-06-28 Thread Shrutarshi Basu
I'm writing a Python package where I have an underlying object model that is manipulated by a runtime control layer and clients that interface with this runtime. As I'm developing this i'm realizing that there are going to be a number of places where the runtime might affect the object model in way

Re: creating garbage collectable objects (caching objects)

2009-06-28 Thread Simon Forman
On Jun 28, 11:03 am, News123 wrote: > Hi. > > I started playing with PIL. > > I'm performing operations on multiple images and would like compromise > between speed and memory requirement. > > The fast approach would load all images upfront and create then multiple > result files. The problem is,

Re: creating garbage collectable objects (caching objects)

2009-06-28 Thread Terry Reedy
News123 wrote: Hi. I started playing with PIL. I'm performing operations on multiple images and would like compromise between speed and memory requirement. The fast approach would load all images upfront and create then multiple result files. The problem is, that I do not have enough memory to

Re: Advantages of Python (for web/desktop apps)?

2009-06-28 Thread Benjamin Kaplan
On Sun, Jun 28, 2009 at 11:03 AM, Aahz wrote: > In article , > Tim Chase   wrote: >> >>> - how do i design GUI for windows app? >> >>http://lmgtfy.com/?q=python+gui > > This is the first time I've tried LMGTFY, and it seems to be a piece of > trash that requires JavaScript.  I suggest that lmgtfy.c

Re: [RELEASED] Python 3.1 final

2009-06-28 Thread Benjamin Peterson
Paul Moore gmail.com> writes: > The "buffer" attribute doesn't seem to be documented in the docs for > the io module. I'm guessing that the TextIOBase class should have a > note that you get at the buffer through the "buffer" attribute? Good point. I've now documented it, and the "raw" attribut

Re: [RELEASED] Python 3.1 final

2009-06-28 Thread Terry Reedy
Nobody wrote: On Sun, 28 Jun 2009 15:22:15 +, Benjamin Peterson wrote: Nobody nowhere.com> writes: All in all, Python 3.x still has a long way to go before it will be suitable for real-world use. Such as? Such as not trying to shoe-horn every byte string it encounters into Unicode. Som

Re: The Python Way for module configuration?

2009-06-28 Thread kj
In <87fxdlujds@benfinney.id.au> Ben Finney writes: >(Even if you don't want to receive email, could you please give your >actual name in the ‘From’ field instead of just initials? It makes >conversation less confusing.) I don't know why, but for as long as I can remember everyone calls

Re: [RELEASED] Python 3.1 final

2009-06-28 Thread Benjamin Peterson
Nobody nowhere.com> writes: > > Such as not trying to shoe-horn every byte string it encounters into > Unicode. Some of them really are *just* byte strings. You're certainly allowed to convert them back to byte strings if you want. -- http://mail.python.org/mailman/listinfo/python-list

Re: [RELEASED] Python 3.1 final

2009-06-28 Thread Nobody
On Sun, 28 Jun 2009 15:22:15 +, Benjamin Peterson wrote: > Nobody nowhere.com> writes: >> All in all, Python 3.x still has a long way to go before it will be >> suitable for real-world use. > > Such as? Such as not trying to shoe-horn every byte string it encounters into Unicode. Some of th

Re: Buffer pair for lexical analysis of raw binary data

2009-06-28 Thread Aahz
In article , Angus Rodgers wrote: > >By "recipes", do you mean > (also new to me)? Yup! You may also want to pick up the edited recipes in the Python Cookbook. -- Aahz (a...@pythoncraft.com) <*> http://www.pythoncraft.com/ "

Re: [RELEASED] Python 3.1 final

2009-06-28 Thread Paul Moore
2009/6/28 Christian Heimes : > Paul Moore schrieb: >> I had a quick look at the documentation, and couldn't see how to do >> this. It's the first time I'd read the new IO module documentation, so >> I probably missed something obvious. Could you explain how I get the >> byte stream underlying sys.s

Re: [RELEASED] Python 3.1 final

2009-06-28 Thread Piet van Oostrum
> Paul Moore (PM) wrote: >PM> 2009/6/28 "Martin v. Löwis" : However, sys.std{in,out,err} are still created as text streams, and AFAICT there's nothing you can do about this from within your code. >>> >>> That's intentional, and not going to change. You can access the >>> underlying

Re: [RELEASED] Python 3.1 final

2009-06-28 Thread Christian Heimes
Paul Moore schrieb: > 2009/6/28 "Martin v. Löwis" : >>> However, sys.std{in,out,err} are still created as text streams, and AFAICT >>> there's nothing you can do about this from within your code. >> That's intentional, and not going to change. You can access the >> underlying byte streams if you wa

Re: Buffer pair for lexical analysis of raw binary data

2009-06-28 Thread Angus Rodgers
On 28 Jun 2009 08:00:23 -0700, a...@pythoncraft.com (Aahz) wrote: >In article <0qec45lho8lkng4n20sb1ad4eguat67...@4ax.com>, >Angus Rodgers wrote: >> >>Partly as an educational exercise, and partly for its practical >>benefit, I'm trying to pick up a programming project from where >>I left off in

Re: The Python Way for module configuration?

2009-06-28 Thread Aahz
In article <87bpo8vjjz@benfinney.id.au>, Ben Finney wrote: >Steven D'Aprano writes: >> On Sun, 28 Jun 2009 13:28:31 +1000, Ben Finney wrote: >>> >>> (Even if you don't want to receive email, could you please give your >>> actual name in the ‘From’ field instead of just initials? It make

Re: [RELEASED] Python 3.1 final

2009-06-28 Thread Paul Moore
2009/6/28 "Martin v. Löwis" : >> However, sys.std{in,out,err} are still created as text streams, and AFAICT >> there's nothing you can do about this from within your code. > > That's intentional, and not going to change. You can access the > underlying byte streams if you want to, as you could alre

Re: [RELEASED] Python 3.1 final

2009-06-28 Thread Scott David Daniels
Nobody wrote: On Sat, 27 Jun 2009 16:12:10 -0500, Benjamin Peterson wrote: That's a significant improvement All in all, Python 3.x still has a long way to go before it will be suitable for real-world use. Fortunately, I have assiduously avoided the real word, and am happy to embrace the w

Re: [RELEASED] Python 3.1 final

2009-06-28 Thread Benjamin Peterson
Nobody nowhere.com> writes: > All in all, Python 3.x still has a long way to go before it will be > suitable for real-world use. Such as? -- http://mail.python.org/mailman/listinfo/python-list

Re: What does Guido want in a GUI toolkit for Python?

2009-06-28 Thread John Fabiani
Casey Hawthorne wrote: >>So, what *does* Guido want in a GUI toolkit for Python? > > I saw a talk by a school teacher on pyFLTK: GUI programming made easy. > > On another note: I#: Groovy makes it easy to tie into the Java Swing > GUI, so if Python could do that, with the added complication bein

Re: Advantages of Python (for web/desktop apps)?

2009-06-28 Thread Aahz
In article , Tim Chase wrote: > >> - how do i design GUI for windows app? > >http://lmgtfy.com/?q=python+gui This is the first time I've tried LMGTFY, and it seems to be a piece of trash that requires JavaScript. I suggest that lmgtfy.com not be considered a standard part of the Python commun

creating garbage collectable objects (caching objects)

2009-06-28 Thread News123
Hi. I started playing with PIL. I'm performing operations on multiple images and would like compromise between speed and memory requirement. The fast approach would load all images upfront and create then multiple result files. The problem is, that I do not have enough memory to load all files.

Re: Buffer pair for lexical analysis of raw binary data

2009-06-28 Thread Aahz
In article <0qec45lho8lkng4n20sb1ad4eguat67...@4ax.com>, Angus Rodgers wrote: > >Partly as an educational exercise, and partly for its practical >benefit, I'm trying to pick up a programming project from where >I left off in 2001. It implemented in slightly generalised form >the "buffer pair" sc

Re: pep 8 constants

2009-06-28 Thread Eric S. Johansson
Bruno Desthuilliers wrote: > Brendan Miller a écrit : >> PEP 8 doesn't mention anything about using all caps to indicate a >> constant. >> >> Is all caps meaning "don't reassign this var" a strong enough >> convention to not be considered violating good python style? I see a >> lot of people using

Running a script from a windows right click menu..?

2009-06-28 Thread Nuff Nuff
I wrote a little script that affects a bunch of files in the folder that it is run in. Now what I want to do is to make it run from the right click menu but I don't know how. Would you give me an example script that will simply print the woriking directory, and show me how to add that to the rig

Re: Advantages of Python (for web/desktop apps)?

2009-06-28 Thread Tim Chase
iceangel89 wrote: i am mainly a PHP (mainly using Zend Framework MVC now) Web Developer. used .NET (VB & C#) for Desktop apps. i nv used Python and am looking at Python now (for desktop apps since its open source and just want to try what it offers, but will like to know what good it has for web

Re: encoding problem

2009-06-28 Thread Martin v. Löwis
> That is the reason why we have to explicitly declare a encoding as > long as we have non-ASCII in source. True - but it doesn't have to be the "correct" encoding. If you declared your source as latin-1, the effect is the same on byte string literals, but not on Unicode literals. In that sense,

Re: [RELEASED] Python 3.1 final

2009-06-28 Thread Martin v. Löwis
> That's a significant improvement. It still decodes os.environ and sys.argv > before you have a chance to call sys.setfilesystemencoding(), but it > appears to be recoverable (with some effort; I can't find any way to re-do > the encoding without manually replacing the surrogates). See PEP 383.

Python and journalism (was Re: Beginning with Python; the right choice?)

2009-06-28 Thread Aahz
In article , sato.ph...@gmail.com wrote: > >What do I want to learn Python for? > >Again, pardon me for my lack of relevant information. I am also a >journalist (an out of work one at the moment, like so many others) and >I feel that learning python could be useful for computer assisted >reportin

Re: PyQT QWebView Local swf file not loading

2009-06-28 Thread sgperone
On 28 Giu, 13:05, sgperone wrote: > Just downloaded the pyQT 4.5 for python 2.6 and noticed this strange > behaviour: > > inside a widget i have this code: > > self.view = QWebView(self) > self.view.settings().setAttribute(QWebSettings.PluginsEnabled,True) > > that's i'm creating a QWebView instan

PyQT QWebView Local swf file not loading

2009-06-28 Thread sgperone
Just downloaded the pyQT 4.5 for python 2.6 and noticed this strange behaviour: inside a widget i have this code: self.view = QWebView(self) self.view.settings().setAttribute(QWebSettings.PluginsEnabled,True) that's i'm creating a QWebView instance with PluginsEnabled flag on. next lines are:

Re: Measuring Fractal Dimension ?

2009-06-28 Thread Paul Rubin
Steven D'Aprano writes: > I thought we were talking about discontinuities in *nature*, not in > mathematics. There's no "of course" about it. IIRC we were talking about fractals, which are a topic in mathematics. This led to some discussion of mathematical continuity, and the claim that mathemat

Re: Fast Dictionary Access

2009-06-28 Thread Steven D'Aprano
On Sun, 28 Jun 2009 02:57:50 -0700, Carl Banks wrote: > So it's not valid in general to equate the two lookups. Unless you know > that your dict keys are going to be really fast like interned strings it > makes sense to minimize dict lookups. Or to stop making assumptions about what's fast and w

Re: The Python Way for module configuration?

2009-06-28 Thread Steven D'Aprano
On Sun, 28 Jun 2009 18:39:28 +1000, Ben Finney wrote: > Steven D'Aprano writes: > >> On Sun, 28 Jun 2009 13:28:31 +1000, Ben Finney wrote: >> >> > (Even if you don't want to receive email, could you please give your >> > actual name in the ‘From’ field instead of just initials? It makes >> > co

Re: to use unicode strings only

2009-06-28 Thread Gaudha
On Jun 27, 9:44 pm, Benjamin Peterson wrote: > Gaudha gmail.com> writes: > > > And Peter, I tried importing the __future__ module. It's also not > > working... > > How so? Sorry guys, __future__ module is working excellent :-). I had some bad coding somewhere else, just fixed it. Anyway, thank y

Re: Measuring Fractal Dimension ?

2009-06-28 Thread Steven D'Aprano
On Sat, 27 Jun 2009 23:52:02 -0700, Paul Rubin wrote: > Steven D'Aprano writes: >> Depends on how you define "discontinuous". > > The mathematical way, of course. For any epsilon > 0, etc. I thought we were talking about discontinuities in *nature*, not in mathematics. There's no "of course"

Re: Fast Dictionary Access

2009-06-28 Thread Carl Banks
On Jun 27, 4:40 am, Duncan Booth wrote: > Thomas Lehmann wrote: > > Hi! > > > In C++, programming STL you will use the insert method which always > > provides a position and a flag which indicates whether the position > > results from a new insertion or an exisiting element. Idea is to have > > o

Re: Dictionary self lookup

2009-06-28 Thread Carl Banks
On Jun 27, 4:33 am, Jure Erznožnik wrote: > When you write code like > config = {"home" : "/home/test"} > config["user1"] = config["home"] + "/user1" > > config["user1"] isn't stored in memory as config["home"] + "/user1", > but as a concatenated string ("/home/test/user1"), composed of both > tho

Re: Beginning with Python; the right choice?

2009-06-28 Thread Simon Brunning
2009/6/27 sato.ph...@gmail.com : > Thank you for all of the links and advice. > > What do I want to learn Python for? > > Again, pardon me for my lack of relevant information.  I am also a > journalist (an out of work one at the moment, like so many others) and > I feel that learning python could b

Re: The Python Way for module configuration?

2009-06-28 Thread Hendrik van Rooyen
"kj" wrote: > I want to write a module that serves as a Python front-end to a > database. This database can be either in the form of tab-delimited > flat files, XML files, or a PostgreSQL server. The module is meant > to hide these database implementation details from its users. > > But, mini

Re: [RELEASED] Python 3.1 final

2009-06-28 Thread Nobody
On Sat, 27 Jun 2009 16:12:10 -0500, Benjamin Peterson wrote: > Python 3.1 focuses on the stabilization and optimization of the features and > changes that Python 3.0 introduced. For example, the new I/O system has been > rewritten in C for speed. File system APIs that use unicode strings now > h

Re: Fast Dictionary Access

2009-06-28 Thread Ben Finney
Steven D'Aprano writes: > On Sat, 27 Jun 2009 09:41:13 -0700, Rachel P wrote: > [...] > > Raymond > > Raymond, does Rachel know you're using her gmail account? It's a good thing names are being used here, rather than just initials. -- \“No one ever went broke underestimating the

Re: The Python Way for module configuration?

2009-06-28 Thread Ben Finney
Steven D'Aprano writes: > On Sun, 28 Jun 2009 13:28:31 +1000, Ben Finney wrote: > > > (Even if you don't want to receive email, could you please give your > > actual name in the ‘From’ field instead of just initials? It makes > > conversation less confusing.) > > Some people prefer to be known

Advantages of Python (for web/desktop apps)?

2009-06-28 Thread iceangel89
i am mainly a PHP (mainly using Zend Framework MVC now) Web Developer. used .NET (VB & C#) for Desktop apps. i nv used Python and am looking at Python now (for desktop apps since its open source and just want to try what it offers, but will like to know what good it has for web development also)

Re: What does Guido want in a GUI toolkit for Python?

2009-06-28 Thread Stef Mientki
Martin v. Löwis wrote: I sorta' wish he'd just come out and say, "This is what I think would be suitable for a GUI toolkit for Python: ...". He is not in the business of designing GUI toolkits, but in the business of designing programming languages. So he abstains from specifying (or even

Re: What does Guido want in a GUI toolkit for Python?

2009-06-28 Thread Nobody
On Sat, 27 Jun 2009 17:17:22 -0700, Dennis Lee Bieber wrote: >> His concern really isn't what is in the toolkit, but what isn't. >> It must not require lots of lines of code to produce a simple >> GUI, it must not require specification of absolute coordinates, >> ... - you should be able to contin

Re: tokenize module

2009-06-28 Thread Tim Roberts
Jim wrote: >I'm trying to understand the output of the tokenize.generate_tokens() >generator. The token types returned seem to be more general than I'd >expect. For example, when fed the following line of code: > >def func_a(): >... >It seems to me that the token '(' should be identified as 'LP

Re: What does Guido want in a GUI toolkit for Python?

2009-06-28 Thread Simon Forman
On Jun 27, 12:54 pm, "laplacia...@gmail.com" wrote: > I just read a blog post of > Guido'shttp://neopythonic.blogspot.com/2009/06/ironpython-in-action-and-decl... > and notice that he doesn't comment on what he wants in a GUI toolkit > for Python. > > I sorta' wish he'd just come out and say, "Th

Re: No trees in the stdlib?

2009-06-28 Thread Lie Ryan
João Valverde wrote: > alex23 wrote: >> João Valverde wrote: >> >>> Currently I don't have a strong need for this. >>> >> >> And clearly neither has anyone else, hence the absence from the >> stdlib. As others have pointed out, there are alternative approaches, >> and plenty of recipes on A