Re: Generating HTML

2013-07-29 Thread Burak Arslan
information. >>> from lxml.html.builder import E >>> e = E.html( ... E.head( ... E.title("Sample Html Page") ... ), ... E.body( ... E.div( ... E.h1("Hello World"), ... E.p( ... "lxml is quite nice when

Generating HTML

2013-07-29 Thread Morten Guldager
'Aloha Friends! Still a bit new to python I'm afraid of choosing an obsolete route when it comes to generate some HTML in a Flask based micro web server. I come from the Perl side where I have been using HTML::Element with great success, and now I would like to know if something similar exists f

Re: Problems Generating HTML With pydoc

2008-02-28 Thread Juha S.
Ron DuPlain wrote: > I also expected "pydoc -w mypackage" to recursively generate html for > the whole package, but it only wrote the top-level file for me as well > (on Linux, for the record) > > I use the workaround: > pydoc -w ./ > > This runs "pydoc -w" on all Python files in the current dir

Re: Problems Generating HTML With pydoc

2008-02-28 Thread Ron DuPlain
On Feb 26, 3:23 am, "Juha S." <[EMAIL PROTECTED]> wrote: > Hi, > > I'm trying to generate HTML docs for a Python package (directory) > currently containing an empty __init__.py and a Module.py file with some > classes and docstrings. I tried using the command > "F:\path\to\project\pydoc.py -w myPac

Problems Generating HTML With pydoc

2008-02-26 Thread Juha S.
Hi, I'm trying to generate HTML docs for a Python package (directory) currently containing an empty __init__.py and a Module.py file with some classes and docstrings. I tried using the command "F:\path\to\project\pydoc.py -w myPackage" at the Vista command prompt, and I get "wrote myPackage.ht

Re: pydoc - generating HTML docs from string input

2007-11-07 Thread [EMAIL PROTECTED]
On Nov 7, 4:47 pm, Laszlo Nagy <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > Has anyone ever tried mucking with pydoc to the point where you can > > get it to give you output from a string input? For example I'd like > > to give it a whole module to generate documentation for but all w

Re: pydoc - generating HTML docs from string input

2007-11-07 Thread Laszlo Nagy
[EMAIL PROTECTED] wrote: > Has anyone ever tried mucking with pydoc to the point where you can > get it to give you output from a string input? For example I'd like > to give it a whole module to generate documentation for but all within > a string: > > #little sample > > module_code=''' > """Modu

pydoc - generating HTML docs from string input

2007-11-07 Thread [EMAIL PROTECTED]
Has anyone ever tried mucking with pydoc to the point where you can get it to give you output from a string input? For example I'd like to give it a whole module to generate documentation for but all within a string: #little sample module_code=''' """Module docstring""" def func1(): """ som

Re: Generating HTML

2007-09-13 Thread Nikita the Spider
In article <[EMAIL PROTECTED]>, "Sebastian Bassi" <[EMAIL PROTECTED]> wrote: > Hello, > > What are people using these days to generate HTML? I still use > HTMLgen, but I want to know if there are new options. I don't > want/need a web-framework a la Zope, just want to produce valid HTML > from P

Re: Generating HTML

2007-09-12 Thread w . greg . phillips
On Sep 12, 1:16 pm, Evan Klitzke <[EMAIL PROTECTED]> wrote: > Can you compile Mako templates? This is one thing that I really like > about Cheetah, and it wasn't clear to me from the Mako site if this is > possible. First line of the Mako home page: """Mako is a template library written in Python

Re: Generating HTML

2007-09-12 Thread Evan Klitzke
On Wed, 2007-09-12 at 09:54 +0200, Bruno Desthuilliers wrote: > Evan Klitzke a écrit : > > It's not applicable for everything, but if you're planning on using > > Python to generate web pages you should really be using Cheetah > > templates. Very simple to use template system that is also very > >

Re: Generating HTML

2007-09-12 Thread Jon Rosebaugh
On 2007-09-11 23:33:18 -0500, "Sebastian Bassi" <[EMAIL PROTECTED]> said: > Hello, > > What are people using these days to generate HTML? I still use > HTMLgen, but I want to know if there are new options. I don't > want/need a web-framework a la Zope, just want to produce valid HTML > from Pyth

Re: Generating HTML

2007-09-12 Thread Stefan Behnel
raight forward support for generating HTML and comes with a lot of nice goodies for HTML handling: http://codespeak.net/lxml/dev/lxmlhtml.html#creating-html-with-the-e-factory Note that this requires lxml 2.0, which is currently in alpha status. Stefan -- http://mail.python.org/mailman/listinfo/python-list

Re: Generating HTML

2007-09-12 Thread Walter Dörwald
Sebastian Bassi wrote: > Hello, > > What are people using these days to generate HTML? I still use > HTMLgen, but I want to know if there are new options. I don't > want/need a web-framework a la Zope, just want to produce valid HTML > from Python. If you want something that works similar to HTM

Re: Generating HTML

2007-09-12 Thread jkn
I used to use Cheetah, but have switched recently to Jinja: http://jinja.pocoo.org/ Mainly this is because the syntax is similar to Django's templates, and eventually I plan on migrating to Django. jon N -- http://mail.python.org/mailman/listinfo/python-list

Re: Generating HTML

2007-09-12 Thread Diez B. Roggisch
Sebastian Bassi wrote: > Hello, > > What are people using these days to generate HTML? I still use > HTMLgen, but I want to know if there are new options. I don't > want/need a web-framework a la Zope, just want to produce valid HTML > from Python. KID, Genshi, Mako. And a bazillion others. I pr

Re: Generating HTML

2007-09-12 Thread Bruno Desthuilliers
Evan Klitzke a écrit : > On Wed, 2007-09-12 at 01:33 -0300, Sebastian Bassi wrote: >> Hello, >> >> What are people using these days to generate HTML? I still use >> HTMLgen, but I want to know if there are new options. I don't >> want/need a web-framework a la Zope, just want to produce valid HTML

Re: Generating HTML

2007-09-12 Thread Evan Klitzke
On Wed, 2007-09-12 at 01:33 -0300, Sebastian Bassi wrote: > Hello, > > What are people using these days to generate HTML? I still use > HTMLgen, but I want to know if there are new options. I don't > want/need a web-framework a la Zope, just want to produce valid HTML > from Python. It's not appl

Generating HTML

2007-09-11 Thread Sebastian Bassi
Hello, What are people using these days to generate HTML? I still use HTMLgen, but I want to know if there are new options. I don't want/need a web-framework a la Zope, just want to produce valid HTML from Python. Best, SB. -- Sebastián Bassi (セバスティアン). Diplomado en Ciencia y Tecnología. Curso B

Generating HTML containing XML in an INPUT tag

2007-03-16 Thread bendorge
Hi there, Using Python, I'm auto-generating an HTML file that contains: , where XXX is XML data (encoded somehow). Articles regarding unicode are making my head spin! Is there a way to encode XML file contents to a hexadecimal string that could be decoded on a PHP server? I have an XML file that

Re: Framework/module for generating HTML documentation

2006-04-04 Thread Thomas Guettler
Hi, I have a little script which creates numbers by scanning the tags. But up to now it only works for single file. But it would be easy to split e.g. on every tag. http://www.thomas-guettler.de/scripts/number-html-headings.py.txt Am Tue, 04 Apr 2006 17:01:43 +0900 schrieb Ryan Ginstrom: > E.g

Framework/module for generating HTML documentation

2006-04-04 Thread Ryan Ginstrom
I have been maintaining a body of documentation in plain HTML files. I would now like to automate the generation of the HTML files. Maintaining the HTML files now is tedious and error prone, because every time I move/remove/add a section, I have to renumber the following sections and update my int

Re: Generating HTML from python

2005-06-14 Thread Magnus Lycka
Philippe C. Martin wrote: > I now need to generate the HTML wxHtmlEasyPrinting can print: I need to have > a title followed by lines of text that do not look too ugly. If possible I > would like to use an existing module. How to do this really depends on what your data looks like, and how you get

Re: Generating HTML from python

2005-06-10 Thread Roger Binns
"Philippe C. Martin" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi, > > I wish to use an easy way to generate reports from wxPython and feel > wxHtmlEasyPrinting could be a good solution. > > I now need to generate the HTML wxHtmlEasyPrinting can print: I need to have > a title

Re: Generating HTML from python

2005-06-10 Thread Philippe C. Martin
PS: Just wanted to add that HTMLGen works very well and outputs html that wxHtmlEasyPrinting and my email client have not problem reading (I output student grades, missing assignments, ... in tables). The one gitch is they do not have any installation program (that I've seen) for windows. Regards

Re: Generating HTML from python

2005-06-10 Thread Philippe C. Martin
Thanks Walter Dörwald wrote: > Cappy2112 wrote: >> I looked at HTMLGen a while ago- I didn't see what the advantage was. >> I wrote soem code similar to the example above, to generate a page.. >> It worked out fine. >> >> However, I want to add HTML ouput to many of my other python programs, >>

Re: Generating HTML from python

2005-06-10 Thread =?ISO-8859-1?Q?Walter_D=F6rwald?=
Cappy2112 wrote: > I looked at HTMLGen a while ago- I didn't see what the advantage was. > I wrote soem code similar to the example above, to generate a page.. > It worked out fine. > > However, I want to add HTML ouput to many of my other python programs, > and I don't want to re-write this for e

Re: Generating HTML from python

2005-06-09 Thread Philippe C. Martin
Thanks Kent Johnson wrote: > Philippe C. Martin wrote: >> Hi, >> >> I wish to use an easy way to generate reports from wxPython and feel >> wxHtmlEasyPrinting could be a good solution. >> >> I now need to generate the HTML wxHtmlEasyPrinting can print: I need to >> have a title followed by line

Re: Generating HTML from python

2005-06-09 Thread Kent Johnson
Philippe C. Martin wrote: > Hi, > > I wish to use an easy way to generate reports from wxPython and feel > wxHtmlEasyPrinting could be a good solution. > > I now need to generate the HTML wxHtmlEasyPrinting can print: I need to have > a title followed by lines of text that do not look too ugly. I

Re: Generating HTML from python

2005-06-09 Thread Cappy2112
Thomas Guettler wrote: > > > Am Thu, 09 Jun 2005 12:43:19 + schrieb Philippe C. Martin: > > > >> Hi, > >> > >> I wish to use an easy way to generate reports from wxPython and feel > >> wxHtmlEasyPrinting could be a good solution. > >> &

Re: Generating HTML from python

2005-06-09 Thread Philippe C. Martin
> >> Hi, >> >> I wish to use an easy way to generate reports from wxPython and feel >> wxHtmlEasyPrinting could be a good solution. >> >> I now need to generate the HTML wxHtmlEasyPrinting can print > > I don't know wxPython, but generating HTML is v

Re: Generating HTML from python

2005-06-09 Thread Philippe C. Martin
I'll take a pick thanks - I like the fact it's buit-in (no extra installation) Michele Simionato wrote: > You could generate your report in reStructuredText > format (Google is your friend) and then convert > them in HTML, PS, PDF, etc. > > Michele Simionato -- http://mail.python.o

Re: Generating HTML from python

2005-06-09 Thread Thomas Guettler
Am Thu, 09 Jun 2005 12:43:19 + schrieb Philippe C. Martin: > Hi, > > I wish to use an easy way to generate reports from wxPython and feel > wxHtmlEasyPrinting could be a good solution. > > I now need to generate the HTML wxHtmlEasyPrinting can print I don't know w

Re: Generating HTML from python

2005-06-09 Thread Michele Simionato
You could generate your report in reStructuredText format (Google is your friend) and then convert them in HTML, PS, PDF, etc. Michele Simionato -- http://mail.python.org/mailman/listinfo/python-list

Re: Generating HTML from python

2005-06-09 Thread Philippe C. Martin
PS: I am looking at the formatter module which seems to be related to HTML somehow, but without any code sample I'm a bit lost Philippe C. Martin wrote: > Hi, > > I wish to use an easy way to generate reports from wxPython and feel > wxHtmlEasyPrinting could be a good solution. > > I now need

Generating HTML from python

2005-06-09 Thread Philippe C. Martin
Hi, I wish to use an easy way to generate reports from wxPython and feel wxHtmlEasyPrinting could be a good solution. I now need to generate the HTML wxHtmlEasyPrinting can print: I need to have a title followed by lines of text that do not look too ugly. If possible I would like to use an existi

Re: recommended way of generating HTML from Python

2005-02-22 Thread paul koelle
Michele Simionato wrote: Also, one could argue that the designer should not get in touch with the HTML, but just play with the CSS. Finally, you can achieve separation between logic and presentation just putting the routines generating the HTML pages in a separate module, no need to use a differe

Re: recommended way of generating HTML from Python

2005-02-21 Thread John J. Lee
Matt Goodall <[EMAIL PROTECTED]> writes: [...] > Agreed. Although I would go further and say that it's important to > choose a templating system that allows the Python developer to annotate > XHTML templates using **valid XML**, i.e. no "for x in y" loops, no "if > foo" conditionals, no "i = 0" var

Re: recommended way of generating HTML from Python

2005-02-21 Thread has
Kent Johnson wrote: > Michele Simionato wrote: > > The problem is a problem of standardization, indeed. There plenty of > > recipes to > > do the same job, I just would like to use a blessed one (I am teaching > > a Python > > course and I do not know what to recommend to my students). > > Why not

RE: recommended way of generating HTML from Python

2005-02-21 Thread Robert Brewer
ch a developer might supply, or even CSS, or an email template. But it also allows for useful subclassing, for code generation. Here's an example: the subclass for "hidden input" elements: class HiddenElement(Assembly): """An Assembly for generating HTML ele

Re: recommended way of generating HTML from Python

2005-02-21 Thread Michele Simionato
Kent Johnson: >I've written web pages this way (using a pretty nice Java HTML generation package) >and I don't >recommend it. In my experience, this approach has several drawbacks: >- as soon as the web page gets at all complex, the conceptual shift from HTML to >code and back is >difficult. >- It

Re: recommended way of generating HTML from Python

2005-02-21 Thread Matt Goodall
On Mon, 2005-02-21 at 07:36 -0500, Kent Johnson wrote: > Michele Simionato wrote: > > The problem is a problem of standardization, indeed. There plenty of > > recipes to > > do the same job, I just would like to use a blessed one (I am teaching > > a Python > > course and I do not know what to reco

Re: recommended way of generating HTML from Python

2005-02-21 Thread Kent Johnson
Michele Simionato wrote: The problem is a problem of standardization, indeed. There plenty of recipes to do the same job, I just would like to use a blessed one (I am teaching a Python course and I do not know what to recommend to my students). Why not teach your students to use a template system?

Re: recommended way of generating HTML from Python

2005-02-20 Thread Michele Simionato
The problem is a problem of standardization, indeed. There plenty of recipes to do the same job, I just would like to use a blessed one (I am teaching a Python course and I do not know what to recommend to my students). FWIW, here is a my version of the recipe (stripped down to the bare essentials

Re: recommended way of generating HTML from Python

2005-02-20 Thread has
xtian wrote: > Stan (part of nevow, which is part of twisted) is a nice python syntax > for building HTML [...] > I don't know how detachable it is from the rest of nevow. I'd assume it > wouldn't be too difficult to implement in a standalone fashion. FWIW I whipped up a simple self-contained Stan

Re: recommended way of generating HTML from Python

2005-02-20 Thread xtian
Stan (part of nevow, which is part of twisted) is a nice python syntax for building HTML - I like the use of () and [] to separate attributes from sub-elements. For example: class Greeter(rend.Page): def greet(self, context, data): return random.choice(["Hello", "Greetings", "Hi"]), "

Re: recommended way of generating HTML from Python

2005-02-20 Thread Pierre Quentel
Here are a couple of pointers. I agree with Michele that it would be nice to have some kind of standardization. Maybe this would be worth a post to the Web-SIG ? - I posted a 70-line recipe on the Python Cookbook, a sort of poor man's HTMLGen called HTMLTags http://aspn.activestate.com/ASPN/Coo

Re: recommended way of generating HTML from Python

2005-02-20 Thread Fernando Perez
Michele Simionato wrote: > What is the recommended way of generating HTML from Python? I know of > HTMLGen and of > few recipes in the Cookbook, but is there something which is more or > less standard? I'm also an htmlgen user, but it's getting a bit long in the tooth, a

Re: recommended way of generating HTML from Python

2005-02-20 Thread Michele Simionato
Just to clarify, before people start pointing out their preferred templating language: I am NOT asking for a template system. I am asking for something on the lines of HTMLGen, where you just use pure Python. -- http://mail.python.org/mailman/listinfo/python-list

Re: recommended way of generating HTML from Python

2005-02-20 Thread Jarek Zgoda
Michele Simionato napisał(a): What is the recommended way of generating HTML from Python? I know of HTMLGen and of few recipes in the Cookbook, but is there something which is more or less standard? Also, are there plans to include a module for HTML generation in the standard library? I really

recommended way of generating HTML from Python

2005-02-20 Thread Michele Simionato
What is the recommended way of generating HTML from Python? I know of HTMLGen and of few recipes in the Cookbook, but is there something which is more or less standard? Also, are there plans to include a module for HTML generation in the standard library? I really would like to see some