Over-simplified yes, but it will work!
Python is beautiful :-)
--
http://mail.python.org/mailman/listinfo/python-list
Torsten Bronger wrote:
>
> It doesn't show Paul and Mary on the same level. I (think I) solved
> the problem with this:
>
I could do so if Poul was in a list of his own, like "Arthur" and "Clara".
/Martin
--
http://mail.python.org/mailman/listinfo/python-list
Not quite, but almost:
data=[["Peter",
["Ian",
[["Randy",
["Clara"],
"Paul",
["Mary",
["Arthur"]]]
def show(data,level):
for i in data:
if i.__class__.__name__=='list':
show(i,level
The Daily Python-URL
http://www.pythonware.com/daily/
--
http://mail.python.org/mailman/listinfo/python-list
From:
http://docs.python.org/lib/module-email.header.html
>>> from email.message import Message
>>> from email.header import Header
>>> msg = Message()
>>> h = Header('p\xf6stal', 'iso-8859-1')
>>> msg['Subject'] = h
>>> print msg.as_string()
Subject: =?iso-8859-1?q?p=F6stal?=
/Martin
--
h
Rob Wolfe wrote:
>
> You have to know the encoding of user input and then you
> can use ``input_encoding`` and ``output_encoding`` parameters
> of ``Template``. Mako internally handles everything as Python unicode
> objects.
> For example:
>
> t = Template(filename="templ.mako", input_encoding="i
I'm experimenting with using Python for a small web interface, using
Mark Hammond's nice win32 extensions.
I use a small class hierarchy which uses inheritance and nested classes.
Here are a small extract of the code:
class page:
def __init__(self):
self.head=[]