daml 0.1.4 released, a python markup language for the web

2010-12-23 Thread dasacc22
Notes on the latest updates can be read here: http://dasacc22.wordpress.com/2010/12/22/daml-0-1-4-release/ The source is on github: https://github.com/dasacc22/daml An sdist is available on pypi: http://pypi.python.org/pypi/DAML/0.1.4 daml is for outlining html with dynamic content. Features

Re: Fastest way to calculate leading whitespace

2010-05-11 Thread dasacc22
On May 10, 2:25 am, Stefan Behnel stefan...@behnel.de wrote: Stefan Behnel, 10.05.2010 08:54: dasacc22, 08.05.2010 19:19: This is a simple question. I'm looking for the fastest way to calculate the leading whitespace (as a string, ie ' '). Here is an (untested) Cython 0.13 solution

Re: Fastest way to calculate leading whitespace

2010-05-09 Thread dasacc22
On May 9, 8:28 am, John Machin sjmac...@lexicon.net wrote: dasacc22 dasacc22 at gmail.com writes: U presume entirely to much. I have a preprocessor that normalizes documents while performing other more complex operations.  Theres nothing buggy about what im doing Are you sure? Your

Fastest way to calculate leading whitespace

2010-05-08 Thread dasacc22
Hi This is a simple question. I'm looking for the fastest way to calculate the leading whitespace (as a string, ie ''). Here are some different methods I have tried so far --- solution 1 a = 'some content\n' b = a.strip() c = ' '*(len(a)-len(b)) --- solution 2 a = 'some content\n'

Re: Fastest way to calculate leading whitespace

2010-05-08 Thread dasacc22
On May 8, 12:59 pm, Patrick Maupin pmau...@gmail.com wrote: On May 8, 12:19 pm, dasacc22 dasac...@gmail.com wrote: Hi This is a simple question. I'm looking for the fastest way to calculate the leading whitespace (as a string, ie '    '). Here are some different methods I have

Re: Fastest way to calculate leading whitespace

2010-05-08 Thread dasacc22
U presume entirely to much. I have a preprocessor that normalizes documents while performing other more complex operations. Theres nothing buggy about what im doing On May 8, 1:46 pm, Steven D'Aprano st...@remove-this- cybersource.com.au wrote: On Sat, 08 May 2010 10:19:16 -0700, dasacc22 wrote

Re: Fastest way to calculate leading whitespace

2010-05-08 Thread dasacc22
On May 8, 5:18 pm, Patrick Maupin pmau...@gmail.com wrote: On May 8, 1:16 pm, dasacc22 dasac...@gmail.com wrote: On May 8, 12:59 pm, Patrick Maupin pmau...@gmail.com wrote: On May 8, 12:19 pm, dasacc22 dasac...@gmail.com wrote: Hi This is a simple question. I'm looking

Re: Fastest way to calculate leading whitespace

2010-05-08 Thread dasacc22
On May 8, 2:46 pm, Steven D'Aprano st...@remove-this- cybersource.com.au wrote: On Sat, 08 May 2010 12:15:22 -0700, Wolfram Hinderer wrote: On 8 Mai, 20:46, Steven D'Aprano st...@remove-this- cybersource.com.au wrote: def get_leading_whitespace(s):     t = s.lstrip()     return

Re: getter and setter and list appends

2009-04-24 Thread dasacc22
On Apr 24, 4:04 am, Piet van Oostrum p...@cs.uu.nl wrote: dasacc22 dasac...@gmail.com (d) wrote: d Ah thank you for clarifying, I did confuse instance and class d attributes from creating the list in the class def. I actually just d spiffed up that class to represent a portion of a much

getter and setter and list appends

2009-04-20 Thread dasacc22
Hi, I seem to be having a problem with a list being share across multiple instantiations of it and dont quite understand why this is happening. My class looks like this, class Widget(object): _parent = None _children = [] def __init__(self, parent=None): self.parent =

Re: getter and setter and list appends

2009-04-20 Thread dasacc22
wrote: dasacc22 wrote: Hi, I seem to be having a problem with a list being share across multiple instantiations of it and dont quite understand why this is happening. My class looks like this, class Widget(object):     _parent = None     _children = []     def __init__(self

lxml and xslt extensions

2009-04-04 Thread dasacc22
Hi, Im not sure where else to ask this. But basically Im having trouble figuring out how to successfully apply multiple extensions in a single transformation. So for example if i have xsl:stylesheet .../ xsl:template... my:tag/ my:tag/ /xsl:template /xsl:stylesheet in my xsl and my xslt

Re: lxml and xslt extensions

2009-04-04 Thread dasacc22
On Apr 4, 11:31 am, dasacc22 dasac...@gmail.com wrote: Hi, Im not sure where else to ask this. But basically Im having trouble figuring out how to successfully apply multiple extensions in a single transformation. So for example if i have xsl:stylesheet .../ xsl:template... my:tag/ my:tag