Re: The Importance of Terminology's Quality

2008-06-30 Thread Robert Maas, http://tinyurl.com/uh3t
Why this response is so belated: = > Date: Thu, 5 Jun 2008 06:17:01 -0700 (PDT) > From: [EMAIL PROTECTED] > P.S. Please don't look at my profile (at google groups), thanks! Please don't look at the orange an

Re: The Importance of Terminology's Quality

2008-06-30 Thread Robert Maas, http://tinyurl.com/uh3t
Why this response is so belated: = > Date: Tue, 24 Jun 2008 18:42:15 -0400 > From: John W Kennedy <[EMAIL PROTECTED]> > ... the "thunks" were necessary at the machine-language level to > /implement/ ALGOL 60,

Re: best option for python lex/yacc?

2008-06-30 Thread Paul McGuire
On Jun 30, 1:47 am, [EMAIL PROTECTED] wrote: > I'm porting a C lex/yacc based project, and would like to redo > it in python. > > What's the best option for a python lex/yacc-like?  I've > googled a few things, but wanted to see the current concensus. > > Many TIA! > Mark > > -- > Mark Harrison > P

Re: List Performance

2008-06-30 Thread Peter Otten
Ampedesign wrote: > If I happen to have a list that contains over 50,000 items, will the > size of the list severely impact the performance of appending to the > list? No. $ python -m timeit -n2 -s"items = []" "items.append(42)" 2 loops, best of 3: 0.554 usec per loop $ python -m timeit

Re: Help with Borg design Pattern

2008-06-30 Thread Casey McGinty
On Fri, Jun 27, 2008 at 5:25 PM, Maric Michaud <[EMAIL PROTECTED]> wrote: > Yes it is, but it's rather unneeded in Python, we prefer simply create a > module level dictionnary, these tricks are used in language like C++ or > Java. > > In python : > > mymodule.py : > > ModuleOptions = {} > > otherm

Getting sorting order

2008-06-30 Thread leodp
Hi all, I cannot find anything on this: I have a few lists, and would like to sort one of them (sorting-master list). Then I would like to sort all other lists according to how the first one was sorted (sorting-slave lists). Is there a standard way to do that? >From what I know sort() and sorted(

Jaeger LeCoultre Master Control 1000 Hours - Jaeger LeCoultre Watches

2008-06-30 Thread yxs035
Jaeger LeCoultre Master Control 1000 Hours - Jaeger LeCoultre Watches Luxury Gift : http://www.luxury-gift.org Jaeger LeCoultre Watches : http://www.luxury-gift.org/Watches/jaeger-lecoultre-watches.html Jaeger LeCoultre Master Control 1000 Hours : http://www.luxury-gift.org/Watches/Jaeger-LeCoult

Re: Using just the Mako part of Pylons?

2008-06-30 Thread Bruno Desthuilliers
John Salerno a écrit : I just installed Pylons onto my hosting server so I could try out templating with Mako, but it seems a little more complicated than that. Err... Actually, it's certainly a little less complicated than that. First point: Mako is totally independant from Pylons. Second poi

Re: Getting sorting order

2008-06-30 Thread Peter Otten
leodp wrote: > I cannot find anything on this: > I have a few lists, and would like to sort one of them (sorting-master > list). > Then I would like to sort all other lists according to how the first > one was sorted (sorting-slave lists). > > Is there a standard way to do that? > From what I kno

Re: tkinter, loading image error, TclError: couldn't recognize data in image file "C:/users/me/desktop/images/blob4.jpg"

2008-06-30 Thread Eric Brunel
On Sun, 29 Jun 2008 13:34:37 +0200, defn noob <[EMAIL PROTECTED]> wrote: from Tkinter import * import os master = Tk() w = Canvas(master, width=800, height=600) print os.path.exists('C:/me/saftarn/desktop/images/blob4.jpg') im = PhotoImage(file = 'C:/users/saftarn/desktop/images/blob4.jpg')

Re: List Performance

2008-06-30 Thread Maric Michaud
Le Monday 30 June 2008 09:23:46 Peter Otten, vous avez écrit : > Ampedesign wrote: > > If I happen to have a list that contains over 50,000 items, will the > > size of the list severely impact the performance of appending to the > > list? > > No. > > $ python -m timeit -n2 -s"items = []" "items

Re: Help with Borg design Pattern

2008-06-30 Thread Maric Michaud
Le Monday 30 June 2008 10:52:24 Casey McGinty, vous avez écrit : > I'm running into a slight problem however that my run-time defined logging > level is not correctly set until after the module has initialized, > preventing any log messages from showing up. Is there a pythonic way to get > around t

Re: Getting sorting order

2008-06-30 Thread leodp
> Or provide a better explanation and an example. Do you mean something like > this? > Hi Peter, a small example: master=[1,4,3,2] slave1=['d','c','b','a'] slave2=[1,2,3,4] master.sort() # this is ok, but does not return infos on how the list was sorted slave1.sort(key=_maybe_something_here_ref

Re: Why is recursion so slow?

2008-06-30 Thread cokofreedom
In case anyone is interested... # Retrieved from: http://en.literateprograms.org/Fibonacci_numbers_(Python)?oldid=10746 # Recursion with memoization memo = {0:0, 1:1} def fib(n): if not n in memo: memo[n] = fib(n-1) + fib(n-2) return memo[n] # Quick exact computation of large in

Re: Getting sorting order

2008-06-30 Thread Peter Otten
leodp wrote: > >> Or provide a better explanation and an example. Do you mean something >> like this? >> > > Hi Peter, > a small example: > > master=[1,4,3,2] > slave1=['d','c','b','a'] > slave2=[1,2,3,4] > > master.sort() # this is ok, but does not return infos on how the list > was sorted >

Re: what is meaning of "@" in pyhon program.

2008-06-30 Thread cokofreedom
On Jun 28, 8:41 pm, Thierry <[EMAIL PROTECTED]> wrote: > > ie: > > @if os.exists(foo): > >etc > >etc > > > and > > > @for blah: > >etc > >etc > > This sounds more like PHP code, where a @ prefixing a function means > that even if there are errors or warnings, you don't want to see t

Re: list extension ?

2008-06-30 Thread Bruno Desthuilliers
Stef Mientki a écrit : hello, I basically need a list with a few extra attributes, so I derived a new object from a list, and it works perfect. But I wonder why the newly derived list component is much more flexible ? # so here is the new list object class tGrid_List ( list ) : pep08: class G

Re: Getting sorting order

2008-06-30 Thread leodp
> >>> master_index.sort(key=master.__getitem__) that was it! Thanks Peter, leodp -- http://mail.python.org/mailman/listinfo/python-list

Re: Function to import module to namespace

2008-06-30 Thread John Machin
On Jun 30, 11:45 am, bvdp <[EMAIL PROTECTED]> wrote: > John Machin wrote: > > > > Good questions. Short answer ... probably 'cause I've not thought the > problem though completely :) > > > You are updating with *everything* in the 'more' module, not just the > > functions. This includes such thi

Re: Why is recursion so slow?

2008-06-30 Thread Bruno Desthuilliers
Dan Upton a écrit : On Sun, Jun 29, 2008 at 1:27 AM, Terry Reedy <[EMAIL PROTECTED]> wrote: slix wrote: Recursion is awesome for writing some functions, like searching trees etc but wow how can it be THAT much slower for computing fibonacci- numbers? The comparison below has nothing to do wit

Re: The Importance of Terminology's Quality

2008-06-30 Thread Lew
Robert Maas wrote: /\ | ,-.-. | | | | | |, .,---.,---.,---.,---.,---.,---.,---|,---. | | | | || |`---.| || || ||

Re: How do web templates separate content and logic?

2008-06-30 Thread has
On 29 Jun, 04:18, John Salerno <[EMAIL PROTECTED]> wrote: > No, I don't mean presentation logic at all. I mean something along the > lines of combining HTML (which is what I refer to as "content") and > Python (which is what I meant by "logic"). [Note: if you're not familiar with MVC, best go rea

Re: HTML Parsing

2008-06-30 Thread Larry Bates
[EMAIL PROTECTED] wrote: Hi everyone I am trying to build my own web crawler for an experiement and I don't know how to access HTTP protocol with python. Also, Are there any Opensource Parsing engine for HTML documents available in Python too? That would be great. Check on Mechanize. It wraps

Re: windows installers and license agreement

2008-06-30 Thread Larry Bates
Darren Dale wrote: Is it possible to create a windows installer using distutils that includes a prompt for the user to agree to the terms of the license? Thanks, Darren If you are going to be creating windows installers, take a look at Inno Setup. It is way easier and more flexible than just

Re: List Performance

2008-06-30 Thread Larry Bates
Peter Otten wrote: Ampedesign wrote: If I happen to have a list that contains over 50,000 items, will the size of the list severely impact the performance of appending to the list? No. $ python -m timeit -n2 -s"items = []" "items.append(42)" 2 loops, best of 3: 0.554 usec per loop $

Re: List Performance

2008-06-30 Thread Gerhard Häring
Larry Bates wrote: [...] So its actually faster to append to a long list than an empty one? That certainly would not have been intuitively obvious now would it? Maybe not intuitively, but if you know how dynamically growing data structures are implemented, it's plausible. They overallocate,

Re: List Performance

2008-06-30 Thread Peter Otten
Larry Bates wrote: > Peter Otten wrote: >> Ampedesign wrote: >> >>> If I happen to have a list that contains over 50,000 items, will the >>> size of the list severely impact the performance of appending to the >>> list? >> >> No. >> >> $ python -m timeit -n2 -s"items = []" "items.append(42)

Re: List Performance

2008-06-30 Thread Cédric Lucantis
Le Monday 30 June 2008 15:13:30 Larry Bates, vous avez écrit : > Peter Otten wrote: > > Ampedesign wrote: > >> If I happen to have a list that contains over 50,000 items, will the > >> size of the list severely impact the performance of appending to the > >> list? > > > > No. > > > > $ python -m ti

Re: List Performance

2008-06-30 Thread Maric Michaud
Le Monday 30 June 2008 15:52:56 Gerhard Häring, vous avez écrit : > Larry Bates wrote: > > [...] > > So its actually faster to append to a long list than an empty one? That > > certainly would not have been intuitively obvious now would it? > > Maybe not intuitively, but if you know how dynamicall

Re: insertion sorts...

2008-06-30 Thread python_newbie
On 25 Haziran, 17:44, MRAB <[EMAIL PROTECTED]> wrote: > On Jun 25, 11:37 am, "A.T.Hofkamp" <[EMAIL PROTECTED]> wrote: > > > > > On 2008-06-25, python_newbie <[EMAIL PROTECTED]> wrote: > > > > On 24 Haziran, 04:33, Terry Reedy <[EMAIL PROTECTED]> wrote: > > > Thanks for all answers. At the end i ve

Re: insertion sorts...

2008-06-30 Thread Maric Michaud
Le Monday 30 June 2008 16:29:11 python_newbie, vous avez écrit : > On 25 Haziran, 17:44, MRAB <[EMAIL PROTECTED]> wrote: > > On Jun 25, 11:37 am, "A.T.Hofkamp" <[EMAIL PROTECTED]> wrote: > > > On 2008-06-25, python_newbie <[EMAIL PROTECTED]> wrote: > > > > On 24 Haziran, 04:33, Terry Reedy <[EMAIL

Re: Freeze problem with Regular Expression

2008-06-30 Thread Kirk
On Wed, 25 Jun 2008 15:29:38 -0700, John Machin wrote: > Several problems: Ciao John (and All partecipating in this thread), first of all I'm sorry for the delay but I was out for business. > (1) lose the vertical bars (as advised by others) (2) ALWAYS use a raw > string for regexes; your \s* wi

parallel port programming using Python?

2008-06-30 Thread Jovan Witherspoon
Hi I see that you placed a post on http://mail.python.org/pipermail/python-list/1999-November/015112.html in 1999 and I was wondering if you had any progress with the whole robot/python project? I am trying to learn Python myself and control motors and looking for some insight. Hope you can he

regex help

2008-06-30 Thread Support Desk
Hello, I am working on a web-app, that querys long distance numbers from a database of call logs. I am trying to put together a regex that matches any number that does not start with the following. Basically any number that does'nt start with: 281 713 832 or 1281 1713 1832

Re: How do web templates separate content and logic?

2008-06-30 Thread Bruno Desthuilliers
John Salerno a écrit : [EMAIL PROTECTED] wrote: For which definitions of "content" and "logic" ??? The point of mvc is to keep domain logic separated from presentation logic, not to remove logic from presentation (which just couldn't work). Templating systems are for presentation logic. Whethe

Re: Getting sorting order

2008-06-30 Thread Mark Tolonen
"leodp" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] Or provide a better explanation and an example. Do you mean something like this? Hi Peter, a small example: master=[1,4,3,2] slave1=['d','c','b','a'] slave2=[1,2,3,4] master.sort() # this is ok, but does not return info

PhotoImage problem

2008-06-30 Thread jimgardener
hi I am using Python 2.5.1. In my code i want to use self.myimage=PhotoImage (file=self.myfile) so i can create the image in a canvas self.mycanv.create_image(70,100,image=self.myimg) it works when i add, from ImageTk import PhotoImage but this import caused an error message when i tried to run

Re: regex help

2008-06-30 Thread Cédric Lucantis
Le Monday 30 June 2008 16:53:54 Support Desk, vous avez écrit : > Hello, >I am working on a web-app, that querys long distance numbers from a > database of call logs. I am trying to put together a regex that matches any > number that does not start with the following. Basically any number that

RE: regex help

2008-06-30 Thread Metal Zong
>>> import re >>> >>> if __name__ == "__main__": ... lst = [281, 713, 832, 1281, 1713, 1832, 2281, 2713, 2832] ... for item in lst: ... if re.match("^1?(?=281)|^1?(?=713)|^1?(?=832)", str(item)): ... print "%d invalid" % item ... else: ... print "%d v

Fwd: PhotoImage problem

2008-06-30 Thread Guilherme Polo
-- Forwarded message -- From: Guilherme Polo <[EMAIL PROTECTED]> Date: Mon, Jun 30, 2008 at 1:00 PM Subject: Re: PhotoImage problem To: jimgardener <[EMAIL PROTECTED]> On Mon, Jun 30, 2008 at 12:02 PM, jimgardener <[EMAIL PROTECTED]> wrote: > hi > I am using Python 2.5.1. In my co

ctypes - swig - pointer

2008-06-30 Thread gianluca
I've a problem with dll function colled with python/ctypes. My functions (C) requred a typedef int "value_type" in tree different way: same as value_type; - mydll.foo1(value_type) same as *value_type; - mydll.foo2(*value_type) same as **value_type; - mydll.foo3(**value_type) How can pass it in py

Re: ctypes - swig - pointer

2008-06-30 Thread Jean-Paul Calderone
On Mon, 30 Jun 2008 09:13:42 -0700 (PDT), gianluca <[EMAIL PROTECTED]> wrote: I've a problem with dll function colled with python/ctypes. My functions (C) requred a typedef int "value_type" in tree different way: same as value_type; - mydll.foo1(value_type) same as *value_type; - mydll.foo2(*val

perl + python tutorial available for download

2008-06-30 Thread Xah
my perl and python tutorial http://xahlee.org/perl-python/index.html is now available for download for offline reading. Download link at the bottom. Xah ∑ http://xahlee.org/ ☄ -- http://mail.python.org/mailman/listinfo/python-list

raw_input into Tkinter ?

2008-06-30 Thread jamitwidme
Is there any way to type into a Tkinter frame window? I want to use raw_input() within a Tkinter frame. -- http://mail.python.org/mailman/listinfo/python-list

Re: raw_input into Tkinter ?

2008-06-30 Thread Sebastian "lunar" Wiesner
[EMAIL PROTECTED] <[EMAIL PROTECTED]>: > Is there any way to type into a Tkinter frame window? Maybe using a proper text/line edit widget? > I want to use raw_input() within a Tkinter frame. The builtin raw_input is for console input only. Of course, one could implement a raw_input using a Tki

Re: perl + python tutorial available for download

2008-06-30 Thread smallpond
Xah wrote: my perl and python tutorial http://xahlee.org/perl-python/index.html is now available for download for offline reading. Download link at the bottom. Xah ? http://xahlee.org/ ? "Pyhton" ?? typical ** Posted from http://www.teranews.com ** -- http://mail.python.org/mailman/list

Re: How do web templates separate content and logic?

2008-06-30 Thread Mike
On Jun 30, 10:57 am, Bruno Desthuilliers wrote: > > Some (if not most) templating systems use their own mini-language to > handle presentation logic. > IMHO this is the funniest (worst) part of all this 'templating' buss :) It reminds me the good old slogan: "Have you invented your own GUI libra

Re: ctypes - swig - pointer

2008-06-30 Thread gianluca
On 30 Giu, 18:26, Jean-Paul Calderone <[EMAIL PROTECTED]> wrote: > On Mon, 30 Jun 2008 09:13:42 -0700 (PDT), gianluca <[EMAIL PROTECTED]> wrote: > >I've a problem with dll function colled with python/ctypes. My > >functions (C) requred a typedef int "value_type" in tree different > >way: > >same a

Re: How do web templates separate content and logic?

2008-06-30 Thread George Sakkis
On Jun 30, 1:19 pm, Mike <[EMAIL PROTECTED]> wrote: > On Jun 30, 10:57 am, Bruno Desthuilliers > [EMAIL PROTECTED]> wrote: > > > Some (if not most) templating systems use their own mini-language to > > handle presentation logic. > > IMHO this is the funniest (worst) part of all this 'templating' >

Re: perl + python tutorial available for download

2008-06-30 Thread J�rgen Exner
Xah <[EMAIL PROTECTED]> wrote: >my perl and python tutorial > >http://xahlee.org/perl-python/index.html > >is now available for download for offline reading. Why anyone would have the idea to mix two different langauges in one tutorial is beyond me. And calling that web page a tutorial is a large

Re: perl + python tutorial available for download

2008-06-30 Thread Sherman Pendley
smallpond <[EMAIL PROTECTED]> writes: > "Pyhton" ?? > > typical Both typical, and illustrative of Xah's skill level. :-) sherm-- -- My blog: http://shermspace.blogspot.com Cocoa programming in Perl: http://camelbones.sourceforge.net -- http://mail.python.org/mailman/listinfo/python-list

Re: How do web templates separate content and logic?

2008-06-30 Thread [EMAIL PROTECTED]
On 30 juin, 19:19, Mike <[EMAIL PROTECTED]> wrote: > On Jun 30, 10:57 am, Bruno Desthuilliers > [EMAIL PROTECTED]> wrote: > > > Some (if not most) templating systems use their own mini-language to > > handle presentation logic. > > IMHO this is the funniest (worst) part of all this 'templating' >

Re: Looping-related Memory Leak

2008-06-30 Thread Tom Davis
On Jun 26, 5:38 am, Carl Banks <[EMAIL PROTECTED]> wrote: > On Jun 26, 5:19 am, Tom Davis <[EMAIL PROTECTED]> wrote: > > > I am having a problem where a long-running function will cause a > > memory leak / balloon for reasons I cannot figure out. Essentially, I > > loop through a directory of pick

Re: Function to import module to namespace

2008-06-30 Thread bvdp
John Machin wrote: On Jun 30, 11:45 am, bvdp <[EMAIL PROTECTED]> wrote: John Machin wrote: Good questions. Short answer ... probably 'cause I've not thought the problem though completely :) > You are updating with *everything* in the 'more' module, not just the > functions. This includes s

Re: How do web templates separate content and logic?

2008-06-30 Thread [EMAIL PROTECTED]
On Jun 27, 9:09 am, "John Salerno" <[EMAIL PROTECTED]> wrote: > Of course, I suppose whether or not any of this matters depends on if you > are a web designer or a programmer, but am I missing something about > templates, or is it really the case that they, more or less by definition, > combine con

Re: Query regarding PythonQt

2008-06-30 Thread Shankar Narayana
Hi, After a big fight, I could get through the problem. I am posting it so that others does not waste time solving the issue. I dont know why "evalfile" method is having problems with existing .pyc files. But, we can solve it this way. First create your .cpp and .py file in directory. Then, do

Re: list extension ?

2008-06-30 Thread Stef Mientki
thanks guys, def __init__ ( self, value = [] ) : Gotcha : default argument values are eval'd only once. Also, it would make more sense IMHO to follow the parent's class initializer's behaviour: def __init__(self, *args) list.__init__ ( self, value ) list.__init_

Re: list extension ?

2008-06-30 Thread Stef Mientki
thanks guys, def __init__ ( self, value = [] ) : Gotcha : default argument values are eval'd only once. Also, it would make more sense IMHO to follow the parent's class initializer's behaviour: def __init__(self, *args) list.__init__ ( self, value ) list.__init_

Re: frame grabber hardware

2008-06-30 Thread rubbishemail
On Jun 29, 11:36 pm, Tim Roberts <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > >can anybody recommend a simple USB or PCI framegrabber with video > >input that runs under xp and has a python driver available? I just > >want to get the image into a file, no special requirements. > > Ther

Re: Looping-related Memory Leak

2008-06-30 Thread Marc 'BlackJack' Rintsch
On Mon, 30 Jun 2008 10:55:00 -0700, Tom Davis wrote: > To me, this seems illogical. I can understand that the GC is > reluctant to reclaim objects that have many connections to other > objects and so forth, but once those objects' scopes are gone, why > doesn't it force a reclaim? For instance,

Re: How do web templates separate content and logic?

2008-06-30 Thread Mike
On Jun 30, 1:41 pm, George Sakkis <[EMAIL PROTECTED]> wrote: > > Because _typically_ a web template consists of mostly HTML, with > relatively little presentational logic and (ideally) no business > logic. Now, if all one wants to do is a quick and dirty way to, say, > view a log file in the browse

Re: How do web templates separate content and logic?

2008-06-30 Thread Mike
On Jun 30, 1:49 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > > > Then what is so *good* about it, why embedding HTML into Python is not > > good? > > Who said embedding HTML in Python was bad ? Did you _carefully_ read > John's question ?-) > I should have say "why embedding HTML into Pyth

Re: ask for a RE pattern to match TABLE in html

2008-06-30 Thread David C. Ullrich
In article <[EMAIL PROTECTED]>, Dan <[EMAIL PROTECTED]> wrote: > On Jun 27, 1:32 pm, "David C. Ullrich" <[EMAIL PROTECTED]> wrote: > > In article > > <[EMAIL PROTECTED]>, > > Jonathan Gardner <[EMAIL PROTECTED]> wrote: > > > > > On Jun 26, 3:22 pm, MRAB <[EMAIL PROTECTED]> wrote: > > > > Try so

Re: complex numbers should respect the "I" representation

2008-06-30 Thread David C. Ullrich
In article <[EMAIL PROTECTED]>, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > hi > > I think complex numbers should respect the "i" or "I" representation, > instead of "j". > No reason being cute and using a different character instead of the > traditional representation? At least have the d

Strings are better than lists for the tree to string operation.

2008-06-30 Thread Bart Kastermans
> |    def __str__ (self): > > string appending is an O(n**2) operations.  The usual idiom, applied here, > would be slist = ['('], slist.append(str(self.value)), return > ''.join(slist).  In other words, collect list of pieces and join at end. I did some timing of operations involved. Doing

Re: Do I need "self" and "other"?

2008-06-30 Thread David C. Ullrich
In article <[EMAIL PROTECTED]>, Kurda Yon <[EMAIL PROTECTED]> wrote: > Hi, > > I found one example which defines the addition of two vectors as a > method of a class. It looks like that: > > class Vector: > def __add__(self, other): > data = [] > for j in range(len(self.data)): >

URLLIb2 problem

2008-06-30 Thread leechat2001
I am trying to write somecode of this kind :) opener = urllib2.build_opener(urllib2.HTTPCookieProcessor()) opener.addheaders = [('User-Agent','Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.14) Gecko/20080404 Firefox/2.0.0.14'), ('Accept','text/xml,application/xml,application/xhtml+xml,t

Re: List Performance

2008-06-30 Thread Terry Reedy
Maric Michaud wrote: Le Monday 30 June 2008 15:52:56 Gerhard Häring, vous avez écrit : Larry Bates wrote: If, on the other hand, we knew beforehand how big the list will get approximately, we could avoid all these reallocations. No problem with Python's C API: PyAPI_FUNC(PyObject *) PyList

Re: ask for a RE pattern to match TABLE in html

2008-06-30 Thread Jonathan Gardner
On Jun 27, 10:32 am, "David C. Ullrich" <[EMAIL PROTECTED]> wrote: > (ii) The regexes in languages like Python and Perl include > features that are not part of the formal CS notion of > "regular expression". Do they include something that > does allow parsing nested delimiters properly? > In perl,

Re: URLLIb2 problem

2008-06-30 Thread Fuzzyman
On Jun 30, 9:11 pm, [EMAIL PROTECTED] wrote: > I am trying to write somecode of this kind :) > > opener = urllib2.build_opener(urllib2.HTTPCookieProcessor()) > opener.addheaders = [('User-Agent','Mozilla/5.0 (Windows; U; Windows > NT 5.1; en-US; rv:1.8.1.14) Gecko/20080404 Firefox/2.0.0.14'), > ('A

Re: URLLIb2 problem

2008-06-30 Thread Jerry Hill
On Mon, Jun 30, 2008 at 4:11 PM, <[EMAIL PROTECTED]> wrote: > I am trying to write somecode of this kind :) > > opener = urllib2.build_opener(urllib2.HTTPCookieProcessor()) > opener.addheaders = [ ... > ('Accept-Encoding','gzip,deflate'), ... > urllib2.install_opener(opener) > > fu = urllib2.urlop

Re: Freeze problem with Regular Expression

2008-06-30 Thread John Machin
On Jul 1, 12:45 am, Kirk <[EMAIL PROTECTED]> wrote: > On Wed, 25 Jun 2008 15:29:38 -0700, John Machin wrote: > > Several problems: > > Ciao John (and All partecipating in this thread), > first of all I'm sorry for the delay but I was out for business. > > > (1) lose the vertical bars (as advised by

Re: list extension ?

2008-06-30 Thread [EMAIL PROTECTED]
On 30 juin, 21:05, Stef Mientki <[EMAIL PROTECTED]> wrote: > thanks guys, > > >>def __init__ ( self, value = [] ) : > > > Gotcha : default argument values are eval'd only once. Also, it would > > make more sense IMHO to follow the parent's class initializer's > > behaviour: Ah hem Sorry, s

Re: How do web templates separate content and logic?

2008-06-30 Thread [EMAIL PROTECTED]
On 30 juin, 21:34, Mike <[EMAIL PROTECTED]> wrote: > On Jun 30, 1:49 pm, "[EMAIL PROTECTED]" > > <[EMAIL PROTECTED]> wrote: > > > > Then what is so *good* about it, why embedding HTML into Python is not > > > good? > > > Who said embedding HTML in Python was bad ? Did you _carefully_ read > > John'

Freesoftware for auto/intelligent code completing in Python

2008-06-30 Thread Ali Servet Dönmez
I don't want to be so mean here, but how hard it could be be writing a freesoftware which would automatically/intelligently auto complete Python code? (I mean something that really does the job, like Microsoft's Visual Studio or Sun's NetBeans or something else, you name it, but just don't give me

Re: Freesoftware for auto/intelligent code completing in Python

2008-06-30 Thread Fuzzyman
On Jun 30, 10:46 pm, Ali Servet Dönmez <[EMAIL PROTECTED]> wrote: > I don't want to be so mean here, but how hard it could be be writing a > freesoftware which would automatically/intelligently auto complete > Python code? (I mean something that really does the job, like > Microsoft's Visual Studio

Re: List Performance

2008-06-30 Thread Maric Michaud
Le Monday 30 June 2008 22:21:35 Terry Reedy, vous avez écrit : > > Well, as I posted few days ago, one could envisage, as a pure python > > optimization for dealing with long list, to replace an algorithm with a > > lot of append by something like this : > > > > mark = object() > > > > datas = [ ma

Re: Freesoftware for auto/intelligent code completing in Python

2008-06-30 Thread Ali Servet Dönmez
On Jul 1, 12:15 am, Fuzzyman <[EMAIL PROTECTED]> wrote: > On Jun 30, 10:46 pm, Ali Servet Dönmez <[EMAIL PROTECTED]> wrote: > > > > > I don't want to be so mean here, but how hard it could be be writing a > > freesoftware which would automatically/intelligently auto complete > > Python code? (I mea

The Yield statement

2008-06-30 Thread Alex Bryan
Okay, so i don't really understand the Yield thing and i know it is useful. I've read a few things about it but it is all programming jargon and so basically it is hard for me to understand. So can anyone give me a description or link me to a site that has a good definition and/or examples

Re: insertion sorts...

2008-06-30 Thread MRAB
On Jun 30, 3:29 pm, python_newbie <[EMAIL PROTECTED]> wrote: > On 25 Haziran, 17:44, MRAB <[EMAIL PROTECTED]> wrote: > > > > > On Jun 25, 11:37 am, "A.T.Hofkamp" <[EMAIL PROTECTED]> wrote: > > > > On 2008-06-25, python_newbie <[EMAIL PROTECTED]> wrote: > > > > > On 24 Haziran, 04:33, Terry Reedy <[

Re: raw_input into Tkinter ?

2008-06-30 Thread Matimus
On Jun 30, 9:55 am, [EMAIL PROTECTED] wrote: > Is there any way to type into a Tkinter frame window? > I want to use raw_input() within a Tkinter frame. `raw_input(prompt)` just calls `sys.stdout.write(prompt)` and returns `sys.stdin.readline()`. So, you can just create file-like objects to replac

Re: frame grabber hardware

2008-06-30 Thread MRAB
On Jun 30, 8:07 pm, [EMAIL PROTECTED] wrote: > On Jun 29, 11:36 pm, Tim Roberts <[EMAIL PROTECTED]> wrote:> [EMAIL > PROTECTED] wrote: > > > >can anybody recommend a simple USB or PCI framegrabber with video > > >input that runs under xp and has a python driver available? I just > > >want to get t

Re: The Yield statement

2008-06-30 Thread Larry Bates
Alex Bryan wrote: Okay, so i don't really understand the Yield thing and i know it is useful. I've read a few things about it but it is all programming jargon and so basically it is hard for me to understand. So can anyone give me a description or link me to a site that has a good definition an

Male participants needed for body image research

2008-06-30 Thread vumensurvey
Dear all, You are invited to participate in an online research on male body image. (If you are female, please pass this on to your male friends.) An Internet Study: The relationships between men's self-reported physical attributes, body image, self-esteem and internet dating. http://men.question

Functions associated with a class.

2008-06-30 Thread Kurda Yon
Hi, I start to learn the object oriented programing in Python. As far as I understood, every class has a set of corresponding methods and variables. For me it is easy to understand a method as a one-argument function associated with a class. For example, if I call "x.calc" and "y.calc" and if "x"

Re: The Yield statement

2008-06-30 Thread Mensanator
On Jun 30, 5:31 pm, Alex Bryan <[EMAIL PROTECTED]> wrote: > Okay, so i don't really understand the Yield thing and i know it is   > useful. I've read a few things about it but it is all programming   > jargon and so basically it is hard for me to understand. So can anyone   > give me a description

Re: The Yield statement

2008-06-30 Thread John Machin
On Jul 1, 8:31 am, Alex Bryan <[EMAIL PROTECTED]> wrote: > Okay, so i don't really understand the Yield thing and i know it is > useful. I've read a few things about it but it is all programming > jargon and so basically it is hard for me to understand. So can anyone > give me a description or link

Re: Functions associated with a class.

2008-06-30 Thread John Machin
On Jul 1, 9:44 am, Kurda Yon <[EMAIL PROTECTED]> wrote: > Hi, > > I start to learn the object oriented programing in Python. As far as I > understood, every class has a set of corresponding methods and > variables. For me it is easy to understand a method as a one-argument > function associated wit

Re: Looping-related Memory Leak

2008-06-30 Thread Carl Banks
On Jun 30, 1:55 pm, Tom Davis <[EMAIL PROTECTED]> wrote: > On Jun 26, 5:38 am, Carl Banks <[EMAIL PROTECTED]> wrote: > > > > > On Jun 26, 5:19 am, Tom Davis <[EMAIL PROTECTED]> wrote: > > > > I am having a problem where a long-running function will cause a > > > memory leak / balloon for reasons I

lxml validation and xpath id function

2008-06-30 Thread Floris Bruynooghe
Hi I'm trying to use the .xpath('id("foo")') function on an lxml tree but can't get it to work. Given the following XML: And it's XMLSchema: http://www.w3.org/2001/XMLSchema"; elementFormDefault="qualified"> Or in more readable,

Re: Functions associated with a class.

2008-06-30 Thread Larry Bates
Kurda Yon wrote: Hi, I start to learn the object oriented programing in Python. As far as I understood, every class has a set of corresponding methods and variables. For me it is easy to understand a method as a one-argument function associated with a class. For example, if I call "x.calc" and "

Re: Using just the Mako part of Pylons?

2008-06-30 Thread John Salerno
Bruno Desthuilliers wrote: John Salerno a écrit : I just installed Pylons onto my hosting server so I could try out templating with Mako, but it seems a little more complicated than that. Err... Actually, it's certainly a little less complicated than that. First point: Mako is totally indepen

Re: Functions associated with a class.

2008-06-30 Thread Hongster
Like what you mentioned, each class has a set of methods and properties (variables). Example of a class: Human Properties of a Human class: height, weight, birthday, occupation, ... Methods of a Human class: eat(food), move(speed, destination), sleep(), ... Methods of a class is just an ordinary

PyPy questions

2008-06-30 Thread Allen
I read the website of some information about PyPy, and how a translator translates the RPython code to C/CLI/Java/etc to be compiled to a native executable or something like that. Would it be possible, in PyPy, to write such an extension that could easily be compiled to native code from Python

Re: ctypes - swig - pointer

2008-06-30 Thread Mark Tolonen
"gianluca" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] On 30 Giu, 18:26, Jean-Paul Calderone <[EMAIL PROTECTED]> wrote: On Mon, 30 Jun 2008 09:13:42 -0700 (PDT), gianluca <[EMAIL PROTECTED]> wrote: >I've a problem with dll function colled with python/ctypes. My >functions (C)

Re: Communication between Python and PHP

2008-06-30 Thread askel
On Jun 25, 6:59 pm, nicodotti2 <[EMAIL PROTECTED]> wrote: > On Jun 25, 1:50 pm, Larry Bates <[EMAIL PROTECTED]> wrote: > > > > > nicodotti2 wrote: > > > Don't ask me why, but we have a bunch of legacy code in PHP on a > > > server and a wee-bit of Python code for integrating GData google > > > cale

Are the following supported in scipy.sparse

2008-06-30 Thread dingo_1980
I wanted to know if scipy.sparse support or will support the following functions which are available in scipy.linalg or scipy or numpy: Inverse Cholesky SVD multiply power append eig concatenate Thanks... -- http://mail.python.org/mailman/listinfo/python-list

ImportError: No module named _md5

2008-06-30 Thread [EMAIL PROTECTED]
Hello, Does anyone know how to fix this error when trying to build MySQL- python-1.2.2: python setup.py build Traceback (most recent call last): File "setup.py", line 5, in import ez_setup; ez_setup.use_setuptools() File "/Users/jasonnerida/Downloads/MySQL-python-1.2.2/ez_setup.py", line

Re: Getting sorting order

2008-06-30 Thread leodp
> >>> x=zip(master,slave1,slave2) > >>> x.sort() > >>> master,slave1,slave2=zip(*x) > --Mark So nice is Python. Leo -- http://mail.python.org/mailman/listinfo/python-list

How make regex that means "contains regex#1 but NOT regex#2" ??

2008-06-30 Thread [EMAIL PROTECTED]
I'm looking over the docs for the re module and can't find how to "NOT" an entire regex. For example. How make regex that means "contains regex#1 but NOT regex#2" ? Chris -- http://mail.python.org/mailman/listinfo/python-list

  1   2   >