-- Forwarded message --
From: Moishy Gluck <[EMAIL PROTECTED]>
Date: Sun, May 25, 2008 at 5:54 PM
Subject: Re: [Tutor] How to get a string from a DOM Text node ?
To: Zameer Manji <[EMAIL PROTECTED]>
xml does not allow text in a node. So you kneed to place a nod
-- Forwarded message --
From: Moishy Gluck <[EMAIL PROTECTED]>
Date: Wed, May 21, 2008 at 12:00 PM
Subject: Re: [Tutor] syntax question
To: Eric Abrahamsen <[EMAIL PROTECTED]>
You appear to be referring to list comprehension. Here is a link to list
comprehension i
On Wed, May 21, 2008 at 10:29 AM, Moishy Gluck <[EMAIL PROTECTED]>
wrote:
> >>> "%s " %st*3
> 'String String String '
> ^
> If you look closely at the end of the string there is an extra space.
>
Some other solutions might be
>>> animal = 'cat'
>>> " ".join((animal, ) * 4)
'cat cat cat cat'
>>> animal = 'cat'
>>> print " ".join((animal, ) * 4)
cat cat cat cat
>>>#If you need the string injected into another string
>>> print "My %s's name is ginger." % (" ".join((animal,) * 4))
My cat cat c
#A single " * " accepts arbitrary amount of unnamed parameters. Two " ** "
accepts an arbitrary amount of unnamed parameters.
# Using asterisk.
def FuncOne(*list, **dict):
for color in list:
print color
print ""
for [color, value] in dict.items():
print color.ljust(
On Fri, May 16, 2008 at 11:20 AM, Moishy Gluck <[EMAIL PROTECTED]>
wrote:
> You need to place a "__init__.py" file in a directory you want to reference
> in an import statement.
>
> I don't believe the content of the file is important but you can place code
&