New mailing list mirrors

2007-06-10 Thread sebulba
Hi all, I created two new google groups to mirror the activity of python-dev and python-3000: * http://groups.google.com/group/python-3000 * http://groups.google.com/group/python-dev2 There are many mirrors out there, but none of them lets you post to a thread. With google groups you can just

Re: urllib2 - iteration over non-sequence

2007-06-10 Thread Erik Max Francis
Paul Rubin wrote: If you know in advance that the page you're retrieving will be reasonable in size, then using readlines is fine. If you don't know in advance what you're retrieving (e.g. you're working on a crawler) you have to assume that you'll hit some very large pages with difficult

Re: Third-party libs in version control

2007-06-10 Thread Marc 'BlackJack' Rintsch
In [EMAIL PROTECTED], Marcus wrote: I'm new to developing large subversion-controlled projects. This one will involve a few third-party libraries like wxWidgets, and perhaps Twisted. Ordinarily you could just install these into your system and they'll end up globally (in Python's

Re: PyGTK : a NEW simple way to code an app

2007-06-10 Thread James T. Dennis
manatlan [EMAIL PROTECTED] wrote: I was a fan of SimpleGladeApp/tepache way to build a pygtk app. I've build a new efficient/dynamic way to build a pygtk app ... Here is an example : = class Fen(GladeApp): Window win

Re: DAO and Access97 WHERE clause fails

2007-06-10 Thread stefaan
I should point out that I don't do DAO (or ADO) -- and if I had to code Python to access JET, I'd probably hijack a copy of mxODBC in order to get a sane SQL interface. I have successfully used the dejavu object-relational mapper (http:// projects.amor.org/docs/dejavu/1.5.0RC1/) to

Re: urllib2 - iteration over non-sequence

2007-06-10 Thread Gabriel Genellina
En Sun, 10 Jun 2007 02:54:47 -0300, Erik Max Francis [EMAIL PROTECTED] escribió: Gary Herron wrote: Certainly there's are cases where xreadlines or read(bytecount) are reasonable, but only if the total pages size is *very* large. But for most web pages, you guys are just nit-picking (or

Needed: FTP Upload Directory Tree script

2007-06-10 Thread IanC
Hi, Does anyone know of a function or script to upload an entire subdirectory tree from a local file space to an FTP server? The Python distribution comes with ftpmirror.py, which performs a mirror download of a directory tree, but I need the Upload version of this. Thanks for any hints -- --

Re: read xml file from compressed file using gzip

2007-06-10 Thread John Machin
On 10/06/2007 3:06 PM, flebber wrote: On Jun 10, 3:45 am, Stefan Behnel [EMAIL PROTECTED] wrote: flebber wrote: I was working at creating a simple program that would read the content of a playlist file( in this case *.k3b) and write it out . the compressed *.k3b file has two file and the one

Re: read xml file from compressed file using gzip

2007-06-10 Thread flebber
On Jun 10, 7:43 pm, John Machin [EMAIL PROTECTED] wrote: On 10/06/2007 3:06 PM, flebber wrote: On Jun 10, 3:45 am, Stefan Behnel [EMAIL PROTECTED] wrote: flebber wrote: I was working at creating a simple program that would read the content of a playlist file( in this case *.k3b) and

Re: read xml file from compressed file using gzip

2007-06-10 Thread John Machin
On 10/06/2007 8:08 PM, flebber wrote: Thanks that was so helpful to see how to do it. I have read a lot but it wasn't sinking in, and sometimes its better to learn by doing. IMHO it's always better to learn by: read some, try it out, read some, ... Some of the books I have read just seem

matching objects by a tuple field criterion

2007-06-10 Thread bullockbefriending bard
i have a large collection of python objects, each of which contains an integer 6-tuple as part of its data payload. what i need to be able to do is select only those objects which meet a simple tuple element wildcard matching criterion. e.g. given the following python objects: object A

Re: matching objects by a tuple field criterion

2007-06-10 Thread Steven D'Aprano
On Sun, 10 Jun 2007 03:58:44 -0700, bullockbefriending bard wrote: i have a large collection of python objects, each of which contains an integer 6-tuple as part of its data payload. what i need to be able to do is select only those objects which meet a simple tuple element wildcard matching

Re: matching objects by a tuple field criterion

2007-06-10 Thread Diez B. Roggisch
bullockbefriending bard schrieb: i have a large collection of python objects, each of which contains an integer 6-tuple as part of its data payload. what i need to be able to do is select only those objects which meet a simple tuple element wildcard matching criterion. e.g. given the following

Re: Where can I suggest an enchantment for Python Zip lib?

2007-06-10 Thread Anders J. Munch
durumdara wrote: Only one way I have to control this: if I modify the ZipFile module. Since you already have the desired feature implemented, why don't you submit a patch. See http://www.python.org/patches/ - Anders -- http://mail.python.org/mailman/listinfo/python-list

Re: Python's only one way to do it philosophy isn't good?

2007-06-10 Thread [EMAIL PROTECTED]
On Jun 9, 12:16 pm, James Stroud [EMAIL PROTECTED] wrote: Terry Reedy wrote: In Python, you have a choice of recursion (normal or tail) Please explain this. I remember reading on this newsgroup that an advantage of ruby (wrt python) is that ruby has tail recursion, implying that python does

userinteraction for a webspider

2007-06-10 Thread Chris
hi guys, i would like to to write a little spider, where, occasionally, the user has to interact. For example show a log-in page or something similar (since everyone has those verification letter/number pics), or send a message by hand. I had the idea of the script relaying the page to

Re: matching objects by a tuple field criterion

2007-06-10 Thread Diez B. Roggisch
Diez B. Roggisch schrieb: bullockbefriending bard schrieb: i have a large collection of python objects, each of which contains an integer 6-tuple as part of its data payload. what i need to be able to do is select only those objects which meet a simple tuple element wildcard matching

How can I obtain the exception object on a generlized except statement?

2007-06-10 Thread Chris Allen
I am confused on one aspect of exception handling. If you specify the exception object type to match in an except statement it is possible to also obtain the exception object itself, but I can't figure out how to get the exception object when I don't specify a match. for example: try:

Re: Third-party libs in version control

2007-06-10 Thread [EMAIL PROTECTED]
On Jun 10, 5:26 am, Marcus [EMAIL PROTECTED] wrote: Good evening, I'm new to developing large subversion-controlled projects. This one will involve a few third-party libraries like wxWidgets, and perhaps Twisted. Ordinarily you could just install these into your system and they'll end up

Re: matching objects by a tuple field criterion

2007-06-10 Thread bullockbefriending bard
Instead of passing a wild-card tuple like (*,*,*,4,*,*) simply pass the integer you want to match and the position you want to match it in. for sure. that was more for expository purpose rather than how i was planning to go about it. As a generator expression: (obj for obj in

Re: How can I obtain the exception object on a generlized except statement?

2007-06-10 Thread Diez B. Roggisch
Chris Allen schrieb: I am confused on one aspect of exception handling. If you specify the exception object type to match in an except statement it is possible to also obtain the exception object itself, but I can't figure out how to get the exception object when I don't specify a match.

Re: How to get existing frames in non-current thread?

2007-06-10 Thread Fabio Zadrozny
On 6/10/07, Gabriel Genellina [EMAIL PROTECTED] wrote: En Sat, 09 Jun 2007 21:40:40 -0300, Fabio Zadrozny [EMAIL PROTECTED] escribió: Is there some way to get all the frames for any given thread? -- in a way that does not require a compiled extension. For the current (calling) thread, you

Re: matching objects by a tuple field criterion

2007-06-10 Thread John Machin
On Jun 10, 8:58 pm, bullockbefriending bard [EMAIL PROTECTED] wrote: i have a large collection of python objects, each of which contains an integer 6-tuple as part of its data payload. what i need to be able to do is select only those objects which meet a simple tuple element wildcard matching

Re: How can I obtain the exception object on a generlized except statement?

2007-06-10 Thread John Machin
On Jun 10, 10:13 pm, Diez B. Roggisch [EMAIL PROTECTED] wrote: Chris Allen schrieb: I am confused on one aspect of exception handling. If you specify the exception object type to match in an except statement it is possible to also obtain the exception object itself, but I can't figure

Re: matching objects by a tuple field criterion

2007-06-10 Thread John Machin
On Jun 10, 10:32 pm, bullockbefriending bard [EMAIL PROTECTED] wrote: quite so, i rephrased docstring to be: criteria is an iterable containing either '*' instances or strings of comma-separated integers. e.g. ['*','1,2,3', '11,12'] thanks very much for the idea! upon further reflection,

Re: matching objects by a tuple field criterion

2007-06-10 Thread bullockbefriending bard
quite so, i rephrased docstring to be: criteria is an iterable containing either '*' instances or strings of comma-separated integers. e.g. ['*','1,2,3', '11,12'] thanks very much for the idea! upon further reflection, this seems to be a more elegant solution for my case than the ad-hoc

Re: matching objects by a tuple field criterion

2007-06-10 Thread Diez B. Roggisch
bullockbefriending bard schrieb: Instead of passing a wild-card tuple like (*,*,*,4,*,*) simply pass the integer you want to match and the position you want to match it in. for sure. that was more for expository purpose rather than how i was planning to go about it. As a generator

Re: matching objects by a tuple field criterion

2007-06-10 Thread bullockbefriending bard
There are certainly cases where the speedup is tremendous - think of a single integer in the first criteria - but then the overall performance depends on the real-live queries. If lot's of wildcards are used, you might end up slower if the tree-walk takes more time than the C-implemented

Python editors again (it's not the same old request)

2007-06-10 Thread Eric S. Johansson
I upgraded to version 9.5 and all of my tools which enabled me to program by voice in Emacs are broken. it's one of those dagnabbit a moment's of life. What I am looking for is a Windows based Python Smart editor that uses specific rich text edit controls as specified here:

Python in the Mozilla world

2007-06-10 Thread Eric S. Johansson
this morning I was looking at Python and XUL. I was impressed by the very interesting projects that were happening around 2005 but it seems like they have all died. Integrating Python at the Mozilla was also very intriguing as it held the promise of eliminating JavaScript for extension

Re: Pyrex problem with cdef'd attribute

2007-06-10 Thread Michael Hoffman
[EMAIL PROTECTED] wrote: I'll play around a bit more and if I continue to confuse myself will subscribe to the pyrex mailing list (or at least use the somewhat clunky gmane.org interface). I find that using a newsreader for gmane stuff is far more convenient. I use Thunderbird to access

Re: Python's only one way to do it philosophy isn't good?

2007-06-10 Thread Josiah Carlson
Steven D'Aprano wrote: On Sat, 09 Jun 2007 22:52:32 +, Josiah Carlson wrote: the only thing that optimization currently does in Python at present is to discard docstrings Python, or at least CPython, does more optimizations than that. Aside from run-time optimizations like interned

memory efficient set/dictionary

2007-06-10 Thread koara
What is the best to go about using a large set (or dictionary) that doesn't fit into main memory? What is Python's (2.5 let's say) overhead for storing int in the set, and how much for storing int - int mapping in the dict? Please recommend a module that allows persistent set/dict storage + fast

Re: Python editors again (it's not the same old request)

2007-06-10 Thread Chris Mellon
On 6/10/07, Eric S. Johansson [EMAIL PROTECTED] wrote: I upgraded to version 9.5 and all of my tools which enabled me to program by voice in Emacs are broken. it's one of those dagnabbit a moment's of life. What I am looking for is a Windows based Python Smart editor that uses specific

Re: Python in the Mozilla world

2007-06-10 Thread Steve Howell
--- Eric S. Johansson [EMAIL PROTECTED] wrote: As a result, I started looking at Python generating JavaScript and I know there is pypy but is that really something one can count on or is it more a good demonstration of technology? I would not completely give up on the idea of Python

Re: Hooking exceptions outside of call stack

2007-06-10 Thread Josiah Carlson
Warren Stringer wrote: Josiah Carlson wrote: foo = type(foo)(foo.func_code, d, foo.func_name, foo.func_defaults, foo.func_closure) Wow! I've never seen that, before. Is there documentation for `type(n)(...)` somewhere? I did find a very useful Decorator for Binding Constants, by Raymond

Re: memory efficient set/dictionary

2007-06-10 Thread Steven D'Aprano
On Sun, 10 Jun 2007 07:27:56 -0700, koara wrote: What is the best to go about using a large set (or dictionary) that doesn't fit into main memory? What is Python's (2.5 let's say) overhead for storing int in the set, and how much for storing int - int mapping in the dict? How do you know it

Re: Python editors again (it's not the same old request)

2007-06-10 Thread Eric S. Johansson
Chris Mellon wrote: wx does (in large part), but most likely the problem is that the rich text control used in most editors is not the win32 rich text control, but instead Scintilla, which is designed for source editing and is much easier to use. Very few editors, of any kind, use the native

Re: Python in the Mozilla world

2007-06-10 Thread Eric S. Johansson
Steve Howell wrote: --- Eric S. Johansson [EMAIL PROTECTED] wrote: I would not completely give up on the idea of Python itself running in the browser, although obviously there have been lots of false starts. http://www.voidspace.org.uk/python/weblog/arch_d7_2007_04_28.shtml#e702

Re: Python in the Mozilla world

2007-06-10 Thread Steve Howell
--- Eric S. Johansson [EMAIL PROTECTED] wrote: http://www.voidspace.org.uk/python/weblog/arch_d7_2007_04_28.shtml#e702 interesting. Very interesting but I suspect the message is don't hold your breath but don't give up hope. Exactly. :) [...] What I need to do would take maybe a day

Re: Python's only one way to do it philosophy isn't good?

2007-06-10 Thread John Nagle
[EMAIL PROTECTED] wrote: On Jun 9, 12:16 pm, James Stroud [EMAIL PROTECTED] wrote: Terry Reedy wrote: In Python, you have a choice of recursion (normal or tail) Please explain this. I remember reading on this newsgroup that an advantage of ruby (wrt python) is that ruby has tail recursion,

Re: memory efficient set/dictionary

2007-06-10 Thread koara
Hello Steven, On Jun 10, 5:29 pm, Steven D'Aprano [EMAIL PROTECTED] wrote: ... How do you know it won't fit in main memory if you don't know the overhead? A guess? You've tried it and your computer crashed? exactly Please recommend a module that allows persistent set/dict storage + fast

Select one of 2 functions with the same name ?

2007-06-10 Thread Stef Mientki
hello, For a simulation at different levels, I need different functions with the same name. Is that possible ? I can realize it with a simple switch within each function, but that makes the code much less readable: def Some_Function(): if simulation_level == 1: ... do things in a way

load data infile problem

2007-06-10 Thread moishyyehuda
does any one know why when I execute this mysql statement with python api LOAD DATA INFILE 'data.txt' INTO TABLE merchandise; I get this error and how can I fix it #1045 - Access denied for user: '[EMAIL PROTECTED]' (Using password: YES) -- http://mail.python.org/mailman/listinfo/python-list

Re: Python optimization (was Python's only one way to do it philosophy isn't good?)

2007-06-10 Thread John Nagle
Josiah Carlson wrote: Steven D'Aprano wrote: On Sat, 09 Jun 2007 22:52:32 +, Josiah Carlson wrote: the only thing that optimization currently does in Python at present is to discard docstrings Python, or at least CPython, does more optimizations than that. Aside from run-time

Re: Python in the Mozilla world

2007-06-10 Thread Eric S. Johansson
Steve Howell wrote: --- Eric S. Johansson [EMAIL PROTECTED] wrote: http://www.voidspace.org.uk/python/weblog/arch_d7_2007_04_28.shtml#e702 interesting. Very interesting but I suspect the message is don't hold your breath but don't give up hope. Exactly. :) This is one of those things

Sharon Stone - Anna Kournikova Lindsay lohan

2007-06-10 Thread D - A - T - I - N - G
Sharon Stone - Anna Kournikova Lindsay lohan search engines + cams www.alphasearch.gr www.alphasearch.ru-- http://mail.python.org/mailman/listinfo/python-list

Re: Select one of 2 functions with the same name ?

2007-06-10 Thread 7stud
On Jun 10, 10:37 am, Stef Mientki [EMAIL PROTECTED] wrote: hello, For a simulation at different levels, I need different functions with the same name. Is that possible ? I can realize it with a simple switch within each function, but that makes the code much less readable: def

Re: Select one of 2 functions with the same name ?

2007-06-10 Thread Francesco Guerrieri
If the functions are f1, f2, f3 you could go this way: def SimulationRun(): if simulation_level = 1: SimulationFunction = f1 else if simulation_level = 2: SimulationFunction = f2 else and in the rest of the code you can refer to SimulationFunction instead of explicitly calling

Re: load data infile problem

2007-06-10 Thread Michael Hoffman
[EMAIL PROTECTED] wrote: does any one know why when I execute this mysql statement with python api LOAD DATA INFILE 'data.txt' INTO TABLE merchandise; I get this error and how can I fix it #1045 - Access denied for user: '[EMAIL PROTECTED]' (Using password: YES) This has nothing to do

Re: Python's only one way to do it philosophy isn't good?

2007-06-10 Thread Terry Reedy
[EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] | Terry Reedy wrote: | In Python, you have a choice of recursion (normal or tail) [snip Stroud questions] | I'm afraid Terry is wrong here, at least if he meant that CPython had | tail recursion *optimization*. NO!!! I did not mean

Re: Needed: FTP Upload Directory Tree script

2007-06-10 Thread kyosohma
On Jun 10, 3:01 am, IanC [EMAIL PROTECTED] wrote: Hi, Does anyone know of a function or script to upload an entire subdirectory tree from a local file space to an FTP server? The Python distribution comes with ftpmirror.py, which performs a mirror download of a directory tree, but I need

Re: Repository - file scanner

2007-06-10 Thread kyosohma
On Jun 9, 12:38 pm, Gabriel Genellina [EMAIL PROTECTED] wrote: En Sat, 09 Jun 2007 12:30:49 -0300, [EMAIL PROTECTED] escribió: On Jun 8, 2:33 pm, HMS Surprise [EMAIL PROTECTED] wrote: Could someone point my muddled head at a/the python repository. I know that one exists but cannot find it

Re: Select one of 2 functions with the same name ?

2007-06-10 Thread 7stud
On Jun 10, 11:11 am, 7stud [EMAIL PROTECTED] wrote: On Jun 10, 10:37 am, Stef Mientki [EMAIL PROTECTED] wrote: hello, For a simulation at different levels, I need different functions with the same name. Is that possible ? I can realize it with a simple switch within each function,

Re: pyexe format

2007-06-10 Thread hg
John Machin wrote: On Jun 10, 11:25 am, John Machin [EMAIL PROTECTED] wrote: On Jun 10, 10:38 am, hg [EMAIL PROTECTED] wrote: hg wrote: Hi, Is there a clean way to figure out that a .exe was actually generated by pyexe ? hg I should gave writtent definite instead of clean

Re: Python, Dutch, English, Chinese, Japanese, etc.

2007-06-10 Thread Cameron Laird
In article [EMAIL PROTECTED], I asked: In article [EMAIL PROTECTED], ahlongxp [EMAIL PROTECTED] wrote: . . . I'm a Chinese. Language/English is really a big problem for Chinese programmers. If python can be written in Chinese,

Re: How can I obtain the exception object on a generlized except statement?

2007-06-10 Thread Chris Allen
Just what I was looking for thanks Diez and John. -- http://mail.python.org/mailman/listinfo/python-list

Re: New mailing list mirrors

2007-06-10 Thread kirby urner
Thanks tomer, I joined both through Google. Kirby moe Urner 4dsolutions.net/ocn/cp4e.html myspace.com/4dstudios [EMAIL PROTECTED] (moe rhymes with Minister of Education was my thinking -- a portfolio I sometimes grab for a gig, but always put back where I found it). On 6/10/07, sebulba [EMAIL

Re: need help with python

2007-06-10 Thread James T. Dennis
[EMAIL PROTECTED] wrote: On May 11, 10:16 pm, Paul McGuire [EMAIL PROTECTED] wrote: On May 11, 9:41 pm, [EMAIL PROTECTED] wrote: [... much ellided ...] [ellided is a fancy word for left out or replaced with ellipses.] I was looking around in my Python folder and saw

Redux: Allowing 'return obj' in generators

2007-06-10 Thread Dustin J. Mitchell
This question was first brought up in October of 2005[1], and was included in the Unresolved Issues section of my microthreading PEP, which I have quietly withdrawn from consideration due to lack of community interest. PEP 255 says Q. Then why not allow an expression on return too? A.

Re: Select one of 2 functions with the same name ?

2007-06-10 Thread Stef Mientki
thanks Francesco and 7stud, The solution with objects is too difficult, because I want to stay very close to the orginal language, ( so the users can understand the Python code, and the automatic translation becomes as simple as possible). But after some tests, it seems to be quit simple:

Re: Needed: FTP Upload Directory Tree script

2007-06-10 Thread Stefan Schwarzer
Hello Ian, On 2007-06-10 10:01, IanC wrote: Does anyone know of a function or script to upload an entire subdirectory tree from a local file space to an FTP server? The Python distribution comes with ftpmirror.py, which performs a mirror download of a directory tree, but I need the Upload

Re: Dynamic subclassing ?

2007-06-10 Thread James T. Dennis
Karlo Lozovina [EMAIL PROTECTED] wrote: manatlan wrote: I can't find the trick, but i'm pretty sure it's possible in an easy way. It's somewhat easy, boot looks ugly to me. Maybe someone has a more elegant solution: In [6]: import new In [13]: class Button: : def

codecs / subprocess interaction: utf help requested

2007-06-10 Thread smitty1e
The first print statement does what you'd expect. The second print statement has rather a lot of rat in it. The goal here is to write a function that will return the man page for some command (mktemp used as a short example here) as text to client code, where the groff markup will be chopped to

RE: Hooking exceptions outside of call stack

2007-06-10 Thread Warren Stringer
Hey Josiah, I just spent a couple hours with your example, and it explains a lot. Some of your interactive session got garbled, so am reposting your merged_namespace example, with tweaks: #- def merged_namespace(*ns): try:

Re: memory efficient set/dictionary

2007-06-10 Thread Rafael Darder Calvo
Please recommend a module that allows persistent set/dict storage + fast query that best fits my problem, What is the problem you are trying to solve? How many keys do you have? Corpus processing. There are in the order of billions to tens of billions keys (64bit integers). I would

Re: MI5 Persecution: Goldfish and Piranha 29/9/95 (5104)

2007-06-10 Thread Shmuel (Seymour J.) Metz
In [EMAIL PROTECTED], on 06/10/2007 at 04:57 AM, Mike [EMAIL PROTECTED] said: And this is here because ??? 1. MI5 didn't take him down like they were supposed to 2. You didn't include followup-to in your header -- Shmuel (Seymour J.) Metz, SysProg and JOAT http://patriot.net/~shmuel

Re: Select one of 2 functions with the same name ?

2007-06-10 Thread 7stud
On Jun 10, 2:03 pm, Stef Mientki [EMAIL PROTECTED] wrote: thanks Francesco and 7stud, The solution with objects is too difficult, because I want to stay very close to the orginal language, Why would you want to duplicate poorly written code? --

Re: Select one of 2 functions with the same name ?

2007-06-10 Thread BJörn Lindqvist
On 6/10/07, Stef Mientki [EMAIL PROTECTED] wrote: I can realize it with a simple switch within each function, but that makes the code much less readable: def Some_Function(): if simulation_level == 1: ... do things in a way elif simulation_level == 2: ... do things in

Re: codecs / subprocess interaction: utf help requested

2007-06-10 Thread John Machin
On Jun 11, 7:17 am, smitty1e [EMAIL PROTECTED] wrote: The first print statement does what you'd expect. The second print statement has rather a lot of rat in it. The goal here is to write a function that will return the man page for some command (mktemp used as a short example here) as text to

Re: The Concepts and Confusions of Prefix, Infix, Postfix and Fully Functional Notations

2007-06-10 Thread Larry Elmore
Twisted wrote: On Jun 9, 8:21 pm, BCB [EMAIL PROTECTED] wrote: Paul McGuire [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] On Jun 9, 6:49 am, Lew [EMAIL PROTECTED] wrote: In particular, Perl code looks more like line noise than like code from any known programming language. ;))

Re: How to get existing frames in non-current thread?

2007-06-10 Thread Gabriel Genellina
En Sun, 10 Jun 2007 09:17:21 -0300, Fabio Zadrozny [EMAIL PROTECTED] escribió: On 6/10/07, Gabriel Genellina [EMAIL PROTECTED] wrote: En Sat, 09 Jun 2007 21:40:40 -0300, Fabio Zadrozny [EMAIL PROTECTED] escribió: Is there some way to get all the frames for any given thread? -- in a way

Re: Select one of 2 functions with the same name ?

2007-06-10 Thread Stef Mientki
7stud wrote: On Jun 10, 2:03 pm, Stef Mientki [EMAIL PROTECTED] wrote: thanks Francesco and 7stud, The solution with objects is too difficult, because I want to stay very close to the orginal language, Why would you want to duplicate poorly written code? I didn't know that a program

Re: The Concepts and Confusions of Prefix, Infix, Postfix and Fully Functional Notations

2007-06-10 Thread Lew
Twisted wrote: Oh come on! Toy languages (such as any set of editor commands) and joke languages (ala Intercal) don't count, even if they are technically Turing-complete. ;) Nor does anything that was designed for the every-character-at-a- premium punch-card era, particularly if it is, or

Tits Live Webcams Boobs all naturals

2007-06-10 Thread en.wikipedia.org
http://www.tits.sc/ The Best Resource for Tits on the Net. -- http://mail.python.org/mailman/listinfo/python-list

Re: Repository - file scanner

2007-06-10 Thread John Machin
On Jun 9, 5:33 am, HMS Surprise [EMAIL PROTECTED] wrote: Greetings, Could someone point my muddled head at a/the python repository. I know that one exists but cannot find it again. In particular I am looking for a standalone search tool that given a path searches files for a text string.

Re: Python optimization (was Python's only one way to do it philosophy isn't good?)

2007-06-10 Thread Steve Howell
--- John Nagle [EMAIL PROTECTED] wrote: With this, the heavy optimizations are possible. Strength reduction. Hoisting common subexpressious out of loops. Hoisting reference count updates out of loops. Keeping frequently used variables in registers. And elimination of many

Re: Dynamic subclassing ?

2007-06-10 Thread Gabriel Genellina
En Sun, 10 Jun 2007 18:16:12 -0300, James T. Dennis [EMAIL PROTECTED] escribió: When I try something like this I run into a little problem: class Foo: def foo(self): return foo class Bar: def bar(self): return bar f =

Re: Python in the Mozilla world

2007-06-10 Thread Steve Howell
--- Eric S. Johansson [EMAIL PROTECTED] wrote: Steve Howell wrote: --- Eric S. Johansson [EMAIL PROTECTED] wrote: http://www.voidspace.org.uk/python/weblog/arch_d7_2007_04_28.shtml#e702 interesting. Very interesting but I suspect the message is don't hold your breath but don't give

Re: codecs / subprocess interaction: utf help requested

2007-06-10 Thread smitty1e
On Jun 10, 6:10 pm, John Machin [EMAIL PROTECTED] wrote: On Jun 11, 7:17 am, smitty1e [EMAIL PROTECTED] wrote: The first print statement does what you'd expect. The second print statement has rather a lot of rat in it. The goal here is to write a function that will return the man page for

Re: Python in the Mozilla world

2007-06-10 Thread Eric S. Johansson
Steve Howell wrote: --- Eric S. Johansson [EMAIL PROTECTED] wrote: Steve Howell wrote: --- Eric S. Johansson [EMAIL PROTECTED] wrote: http://www.voidspace.org.uk/python/weblog/arch_d7_2007_04_28.shtml#e702 interesting. Very interesting but I suspect the message is don't hold your

Re: Python's only one way to do it philosophy isn't good?

2007-06-10 Thread Alexander Schmolck
Steven D'Aprano [EMAIL PROTECTED] writes: On Sat, 09 Jun 2007 22:42:17 +0100, Alexander Schmolck wrote: As for why tail calls are not optimized out, it was decided that being able to have the stack traces (with variable information, etc.) was more useful than offering tail call optimization

Re: The Concepts and Confusions of Prefix, Infix, Postfix and Fully Functional Notations

2007-06-10 Thread Reilly
On Jun 10, 3:11 pm, Larry Elmore [EMAIL PROTECTED] wrote: Twisted wrote: On Jun 9, 8:21 pm, BCB [EMAIL PROTECTED] wrote: Paul McGuire [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] On Jun 9, 6:49 am, Lew [EMAIL PROTECTED] wrote: In particular, Perl code looks more like line

Re: The Concepts and Confusions of Prefix, Infix, Postfix and Fully Functional Notations

2007-06-10 Thread BCB
snip Neither APL nor Snobol nor J are toy or joke languages I wholeheartedly agree, and did not mean to imply as much in my original post, in which my intent was to emphasize the fact that, until you learn the language, a J program /does/ resemble line noise! :-) --

Re: The Concepts and Confusions of Prefix, Infix, Postfix and Fully Functional Notations

2007-06-10 Thread Twisted
On Jun 10, 8:50 pm, BCB [EMAIL PROTECTED] wrote: I wholeheartedly agree, and did not mean to imply as much in my original post, in which my intent was to emphasize the fact that, until you learn the language, a J program /does/ resemble line noise! :-) Eh. This isn't right. The whole

Re: Python optimization (was Python's only one way to do it philosophy isn't good?)

2007-06-10 Thread John Nagle
Steve Howell wrote: --- John Nagle [EMAIL PROTECTED] wrote: With this, the heavy optimizations are possible. Strength reduction. Hoisting common subexpressious out of loops. Hoisting reference count updates out of loops. Keeping frequently used variables in registers. And elimination of

Re: Python in the Mozilla world

2007-06-10 Thread Steve Howell
--- Eric S. Johansson [EMAIL PROTECTED] wrote: this is good to know except I am somewhat cautious about the end result given that it's from Microsoft (explained below) Believe me, I agree! I work mostly in the Unix world now, but I've done enough serious development in the Windows world

Re: Python's only one way to do it philosophy isn't good?

2007-06-10 Thread Steven D'Aprano
On Mon, 11 Jun 2007 01:28:09 +0100, Alexander Schmolck wrote: Steven D'Aprano [EMAIL PROTECTED] writes: On Sat, 09 Jun 2007 22:42:17 +0100, Alexander Schmolck wrote: As for why tail calls are not optimized out, it was decided that being able to have the stack traces (with variable

Re: Python's only one way to do it philosophy isn't good?

2007-06-10 Thread Paul Rubin
Steven D'Aprano [EMAIL PROTECTED] writes: Not tail calls, in general, no. Sorry, how does that work? You're suggesting that there is an algorithm which the compiler could follow to optimize away tail-recursion, but human beings can't follow the same algorithm? Now I'm confused. The

Re: Python optimization (was Python's only one way to do it philosophy isn't good?)

2007-06-10 Thread Kay Schluehr
On Jun 11, 12:43 am, Steve Howell [EMAIL PROTECTED] wrote: To the extent that some of these optimizations could be achieved by writing better Python code, it would nice for optimization tools to have a suggest mode. Is anyone out there who uses MS Word and doesn't deactivate the suggest mode

read 9 bytes

2007-06-10 Thread nik
Hi, I need to read a 9 byte response from a device on the serial port. From reading the pySerial documentation it appears that I can only read in characters at a time. If I do: serialport.read(4) I would get 8 bytes, and if I did serialport.read(5) I think the port will block until a time out,

Re: read 9 bytes

2007-06-10 Thread Gabriel Genellina
En Mon, 11 Jun 2007 00:52:28 -0300, nik [EMAIL PROTECTED] escribió: I need to read a 9 byte response from a device on the serial port. From reading the pySerial documentation it appears that I can only read in characters at a time. If I do: serialport.read(4) I would get 8 bytes, Why do

RE: Python optimization (was Python's only one way to do itphilosophy isn't good?)

2007-06-10 Thread Doug Phillips
Is anyone out there who uses MS Word and doesn't deactivate the suggest mode i.e. Clippy? Me... I don't install Clippy (or any of his horribly annoying friends) to start with. :) On the topic though, the suggest mode of the MS help system is generally way off-base, even for my 80-yr-old

Re: Python optimization (was Python's only one way to do it philosophy isn't good?)

2007-06-10 Thread Steve Howell
--- Kay Schluehr [EMAIL PROTECTED] wrote: On Jun 11, 12:43 am, Steve Howell [EMAIL PROTECTED] wrote: To the extent that some of these optimizations could be achieved by writing better Python code, it would nice for optimization tools to have a suggest mode. Is anyone out there

[ python-Bugs-1734164 ] sqlite3 causes memory read error

2007-06-10 Thread SourceForge.net
Bugs item #1734164, was opened at 2007-06-09 11:46 Message generated for change (Comment added) made by nnorwitz You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=105470aid=1734164group_id=5470 Please note that this message will contain a full copy of the comment

[ python-Bugs-1731068 ] Importing a submodule fails after unloading its parent

2007-06-10 Thread SourceForge.net
Bugs item #1731068, was opened at 2007-06-04 20:21 Message generated for change (Comment added) made by gagenellina You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=105470aid=1731068group_id=5470 Please note that this message will contain a full copy of the comment

[ python-Bugs-1734723 ] Repr class from repr module ignores maxtuple attribute

2007-06-10 Thread SourceForge.net
Bugs item #1734723, was opened at 2007-06-11 02:32 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=105470aid=1734723group_id=5470 Please note that this message will contain a full copy of

[ python-Bugs-1734732 ] Tutorial Section 6.4

2007-06-10 Thread SourceForge.net
Bugs item #1734732, was opened at 2007-06-10 22:26 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=105470aid=1734732group_id=5470 Please note that this message will contain a full copy of

[ python-Bugs-1734732 ] Tutorial Section 6.4

2007-06-10 Thread SourceForge.net
Bugs item #1734732, was opened at 2007-06-10 22:26 Message generated for change (Settings changed) made by enaeseth You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=105470aid=1734732group_id=5470 Please note that this message will contain a full copy of the comment

[ python-Bugs-1734732 ] Tutorial Section 6.4

2007-06-10 Thread SourceForge.net
Bugs item #1734732, was opened at 2007-06-10 20:26 Message generated for change (Comment added) made by nnorwitz You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=105470aid=1734732group_id=5470 Please note that this message will contain a full copy of the comment

  1   2   >