Re: Python/HTML integration: phileas v0.3 released

2009-11-28 Thread Aahz
In article <6ded5cc9-5491-43d3-849c-17fcfaaec...@k17g2000yqh.googlegroups.com>, papa hippo wrote: > >The prime goal of 'phileas' is to enable html code to be seamlessly >included in python code in a natural looking syntax, without resorting >to templatng language. > >see: > >http://larry.myerscou

Re: Python/HTML integration: phileas v0.3 released

2009-11-23 Thread J Kenneth King
papa hippo writes: > On 20 nov, 09:02, Stefan Behnel wrote: >> papa hippo, 19.11.2009 19:53: >> >> > The prime goal of 'phileas' is to enable html code to be seamlessly >> > included in python code in a natural looking syntax, without resorting >> > to templatng language. >> >> I assume you know

Re: Python/HTML integration: phileas v0.3 released

2009-11-20 Thread papa hippo
On 20 nov, 09:02, Stefan Behnel wrote: > papa hippo, 19.11.2009 19:53: > > > The prime goal of 'phileas' is to enable html code to be seamlessly > > included in python code in a natural looking syntax, without resorting > > to templatng language. > > I assume you know XIST, ElementTree's ElementMa

Re: Python/HTML integration: phileas v0.3 released

2009-11-20 Thread papa hippo
On 19 nov, 20:18, Steve Howell wrote: > On Nov 19, 10:53 am, papa hippo wrote: > > > The prime goal of 'phileas' is to enable html code to be seamlessly > > included in python code in a natural looking syntax, without resorting > > to templatng language. > > > see: > > >http://larry.myerscough.nl

Re: Python/HTML integration: phileas v0.3 released

2009-11-20 Thread Daniel Fetchinson
>> The prime goal of 'phileas' is to enable html code to be seamlessly >> included in python code in a natural looking syntax, without resorting >> to templatng language. >> >> see: >> >> http://larry.myerscough.nl/phileas_project/ >> >> I intend to submit phileas to the python.announce forum with

Re: Python/HTML integration: phileas v0.3 released

2009-11-20 Thread Stefan Behnel
papa hippo, 19.11.2009 19:53: > The prime goal of 'phileas' is to enable html code to be seamlessly > included in python code in a natural looking syntax, without resorting > to templatng language. I assume you know XIST, ElementTree's ElementMaker, and all those other ways of generating XML/HTML

Re: Python/HTML integration: phileas v0.3 released

2009-11-20 Thread Steve Howell
On Nov 19, 10:53 am, papa hippo wrote: > The prime goal of 'phileas' is to enable html code to be seamlessly > included in python code in a natural looking syntax, without resorting > to templatng language. > > see: > > http://larry.myerscough.nl/phileas_project/ > > I intend to submit phileas to

Python/HTML integration: phileas v0.3 released

2009-11-20 Thread papa hippo
The prime goal of 'phileas' is to enable html code to be seamlessly included in python code in a natural looking syntax, without resorting to templatng language. see: http://larry.myerscough.nl/phileas_project/ I intend to submit phileas to the python.announce forum within the next few days. An

Re: Python HTML parser chokes on UTF-8 input

2008-10-17 Thread John Nagle
Johannes Bauer wrote: Hello group, I'm trying to use a htmllib.HTMLParser derivate class to parse a website which I fetched via httplib.HTTPConnection().request().getresponse().read(). Now the problem is: As soon as I pass the htmllib.HTMLParser UTF-8 code, it chokes. The code is something like

Re: Python HTML parser chokes on UTF-8 input

2008-10-10 Thread Marc 'BlackJack' Rintsch
On Fri, 10 Oct 2008 00:13:36 +0200, Johannes Bauer wrote: > Terry Reedy schrieb: >> I believe you are confusing unicode with unicode encoded into bytes >> with the UTF-8 encoding. Having a problem feeding a unicode string, >> not 'UFT-8 code', which in Python can only mean a UTF-8 encoded byte >>

Re: Python HTML parser chokes on UTF-8 input

2008-10-09 Thread Terry Reedy
Johannes Bauer wrote: Terry Reedy schrieb: Johannes Bauer wrote: Hello group, I'm trying to use a htmllib.HTMLParser derivate class to parse a website which I fetched via httplib.HTTPConnection().request().getresponse().read(). Now the problem is: As soon as I pass the htmllib.HTMLParser UTF-8

Re: Python HTML parser chokes on UTF-8 input

2008-10-09 Thread Jerry Hill
On Thu, Oct 9, 2008 at 4:54 PM, Johannes Bauer <[EMAIL PROTECTED]> wrote: > Hello group, > > Now when I take "website" directly from the parser, everything is fine. > However I want to do some modifications before I parse it, namely UTF-8 > modifications in the style: > > website = website.replace(

Re: Python HTML parser chokes on UTF-8 input

2008-10-09 Thread Johannes Bauer
Terry Reedy schrieb: > Johannes Bauer wrote: >> Hello group, >> >> I'm trying to use a htmllib.HTMLParser derivate class to parse a website >> which I fetched via >> httplib.HTTPConnection().request().getresponse().read(). Now the problem >> is: As soon as I pass the htmllib.HTMLParser UTF-8 code,

Re: Python HTML parser chokes on UTF-8 input

2008-10-09 Thread Terry Reedy
Johannes Bauer wrote: Hello group, I'm trying to use a htmllib.HTMLParser derivate class to parse a website which I fetched via httplib.HTTPConnection().request().getresponse().read(). Now the problem is: As soon as I pass the htmllib.HTMLParser UTF-8 code, it chokes. The code is something like

Python HTML parser chokes on UTF-8 input

2008-10-09 Thread Johannes Bauer
Hello group, I'm trying to use a htmllib.HTMLParser derivate class to parse a website which I fetched via httplib.HTTPConnection().request().getresponse().read(). Now the problem is: As soon as I pass the htmllib.HTMLParser UTF-8 code, it chokes. The code is something like this: prs = self.parser

Re: display image through cgi python html

2007-07-24 Thread Ladislav Andel
Thanks for quick reply. Yes, that's the hint I needed. Lada Marc 'BlackJack' Rintsch wrote: > On Tue, 24 Jul 2007 11:58:47 +0200, Ladislav Andel wrote: > > >> Here is what I have in image.cgi but it is incorrect and i'm not able to >> find it on the web. >> >> #!/usr/bin/python >> print "Cont

Re: display image through cgi python html

2007-07-24 Thread Steve Holden
Marc 'BlackJack' Rintsch wrote: > On Tue, 24 Jul 2007 11:58:47 +0200, Ladislav Andel wrote: > >> Here is what I have in image.cgi but it is incorrect and i'm not able to >> find it on the web. >> >> #!/usr/bin/python >> print "Content-Type: image/png\n" >> print 'image.png' > > You have to print

Re: display image through cgi python html

2007-07-24 Thread Marc 'BlackJack' Rintsch
On Tue, 24 Jul 2007 11:58:47 +0200, Ladislav Andel wrote: > Here is what I have in image.cgi but it is incorrect and i'm not able to > find it on the web. > > #!/usr/bin/python > print "Content-Type: image/png\n" > print 'image.png' You have to print the image, not the name. Read the binary fi

display image through cgi python html

2007-07-24 Thread Ladislav Andel
Hi, I'm trying to display image through my cgi script in HTML page via Can you give me an example, please? What should be in the cgi script to display it? Here is what I have in image.cgi but it is incorrect and i'm not able to find it on the web. #!/usr/bin/python print "Content-Type: image/p

Re: python html 2 image (png)

2006-10-26 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, Diez B. Roggisch wrote: > Whatever lunix is, […] An operating system for the Commodore 64. `LUnix NG` Website: http://lng.sourceforge.net/ :-) Ciao, Marc 'BlackJack' Rintsch -- http://mail.python.org/mailman/listinfo/python-list

Re: python html 2 image (png)

2006-10-26 Thread joe Li
Thanks a lot.Please forgive my careless mistake, I am completely a new user^-^2006/10/26, Fredrik Lundh <[EMAIL PROTECTED]>: joe Li wrote:> **class Bunch(object):> def __init__(self, **fields): > self.__dict__ = fields>> p = Bunch(x=2.3, y=4.5)> print p>> print p.__dict__>> I dont' unde

Re: python html 2 image (png)

2006-10-26 Thread Fredrik Lundh
joe Li wrote: > **class Bunch(object): > def __init__(self, **fields): > self.__dict__ = fields > > p = Bunch(x=2.3, y=4.5) > print p > > print p.__dict__ > > I dont' understand the usage of the double * here, could anyone explain > it for me? if you're

Re: python html 2 image (png)

2006-10-26 Thread joe Li
class Bunch(object):    def __init__(self, **fields):     self.__dict__ = fields    p = Bunch(x=2.3, y=4.5)print p print p.__dict__I dont' understand the usage of the double * here, could anyone explain it for me? thanks. -- http://mail.python.org/mailman/listinfo/pyth

Re: python html 2 image (png)

2006-10-26 Thread baur79
thanks Diez i will start with your suggestions let see what happen On Oct 25, 11:27 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] schrieb: > > >> what tools are you using to do that today? > > > where are many of EXE programs > > but i need python solution for adding it to

Re: python html 2 image (png)

2006-10-25 Thread Diez B. Roggisch
[EMAIL PROTECTED] schrieb: >> what tools are you using to do that today? > > where are many of EXE programs > but i need python solution for adding it to my automate program under > lunix Whatever lunix is, under linux, a popular free OS you could e.g. use PyKDE and let Qt render a KHTML-compone

Re: Simple python + html + from --> to python script

2006-10-25 Thread J. Clifford Dyer
Good point. I forget sometimes, because that's how I learned, but I came in with some background in other scripting languages, so I guess I knew what I was looking for. Thanks. Cliff flit wrote: > Sorry but for a totally newbie the lib doccumentation doesnt help.. > The target audience for th

Re: python html 2 image (png)

2006-10-25 Thread baur79
> what tools are you using to do that today? where are many of EXE programs but i need python solution for adding it to my automate program under lunix Fredrik Lundh wrote: > [EMAIL PROTECTED] wrote: > > > how can i render html page to png image > > ex: > > > > http://www.website.com/index.html

Re: [0T] Re: Simple python + html + from --> to python script

2006-10-25 Thread Bruno Desthuilliers
Bruno Desthuilliers wrote: (snip) > (snip) > Also, the "button" tag doesn't require a end tag. oops ! Sorry, your syntax was ok - button elements actually requires the end tag. my bad :( -- bruno desthuilliers python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for p in '[EMA

Re: python html 2 image (png)

2006-10-25 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: > how can i render html page to png image > ex: > > http://www.website.com/index.html -> index.png what tools are you using to do that today? -- http://mail.python.org/mailman/listinfo/python-list

python html 2 image (png)

2006-10-25 Thread baur79
hi everyone how can i render html page to png image ex: http://www.website.com/index.html -> index.png thanks a lot -- http://mail.python.org/mailman/listinfo/python-list

Re: [0T] Re: Simple python + html + from --> to python script

2006-10-24 Thread Steve Holden
Bruno Desthuilliers wrote: > flit a écrit : > >>Hello All, >> >>I am trying to get information from a form and send it to a python >>script without success.. >>Here is my objective: >> >>User enters data in form --> form send variables to python script --> >>script runs and output result. > > >

[0T] Re: Simple python + html + from --> to python script

2006-10-24 Thread Bruno Desthuilliers
flit a écrit : > Hello All, > > I am trying to get information from a form and send it to a python > script without success.. > Here is my objective: > > User enters data in form --> form send variables to python script --> > script runs and output result. If the script has side-effects (adding

Re: Simple python + html + from --> to python script

2006-10-24 Thread flit
Sorry but for a totally newbie the lib doccumentation doesnt help.. The target audience for the docs are for "grown ups" programmers.. I think I will do some tutorial, in baby steps... J. Clifford Dyer wrote: > A good starting place would be the documentation on python.org. > > In this case, the p

Re: Simple python + html + from --> to python script

2006-10-24 Thread J. Clifford Dyer
A good starting place would be the documentation on python.org. In this case, the python library reference would have been helpful: http://docs.python.org/lib/lib.html Cheers, Cliff flit wrote: > Man > Very thanks... > I really try to find some source of good and simple and nothing.. > Man

Re: Simple python + html + from --> to python script

2006-10-24 Thread flit
Man Very thanks... I really try to find some source of good and simple and nothing.. Many thanks you are a great help! Steve Holden wrote: > flit wrote: > > Hello All, > > > > I am trying to get information from a form and send it to a python > > script without success.. > > Here is my objecti

Re: Simple python + html + from --> to python script

2006-10-24 Thread Steve Holden
flit wrote: > Hello All, > > I am trying to get information from a form and send it to a python > script without success.. > Here is my objective: > > User enters data in form --> form send variables to python script --> > script runs and output result. > > the form code > > Entre com > os dado

Simple python + html + from --> to python script

2006-10-24 Thread flit
Hello All, I am trying to get information from a form and send it to a python script without success.. Here is my objective: User enters data in form --> form send variables to python script --> script runs and output result. the form code Entre com os dados Entre com os dados Vai magraum

Re: python html rendering

2006-10-04 Thread Paul Boddie
Pierre Imbaud wrote: > Hi, Im looking for a way to display some python code > in html: with correct indentation, possibly syntax hiliting, dealing > correctly with multi-line comment, and... generating valid html code if > the python code itself deals with html (hence manipulates tag litterals. > T

Re: python html rendering

2006-10-04 Thread Duncan Booth
"GHUM" <[EMAIL PROTECTED]> wrote: >> Hi, Im looking for a way to display some python code >> in html: with correct indentation, possibly syntax hiliting, dealing >> correctly with multi-line comment, > > > the usual way is to create your own web-framework > Or you could use an existing web frame

Re: python html rendering

2006-10-04 Thread Gerard Flanagan
Fredrik Lundh wrote: > Pierre Imbaud wrote: > > > I rather thought of some module built on python parser, generating html > > or xml, ideally customizable. > > see "colorizer.py" and "element_colorizer.py" in this directory: > > http://svn.effbot.python-hosting.com/stuff/sandbox/pythondoc >

Re: python html rendering

2006-10-04 Thread GHUM
Pierre, > Hi, Im looking for a way to display some python code > in html: with correct indentation, possibly syntax hiliting, dealing > correctly with multi-line comment, the usual way is to create your own web-framework If it is just "some" Python code and you have to do it "once", just look

Re: python html rendering

2006-10-03 Thread Fredrik Lundh
Pierre Imbaud wrote: > I rather thought of some module built on python parser, generating html > or xml, ideally customizable. see "colorizer.py" and "element_colorizer.py" in this directory: http://svn.effbot.python-hosting.com/stuff/sandbox/pythondoc -- http://mail.python.org/mailman

Re: python html rendering

2006-10-03 Thread Mark Peters
> Hi, Im looking for a way to display some python code > in html: with correct indentation, possibly syntax hiliting, dealing > correctly with multi-line comment, and... generating valid html code if > the python code itself deals with html (hence manipulates tag litterals. > Thanks for your help!

Re: python html rendering

2006-10-03 Thread Pierre Imbaud
Colin J. Williams wrote: > Josh Bloom wrote: > >>Hey Pierre, >> >>I'm using this plug-in for wordpress to display Python code. >>http://blog.igeek.info/wp-plugins/igsyntax-hiliter/ >>It works pretty well and can display a lot of other languages as well. >> >>-Josh >> >> >>On 10/3/06, *Pierre Imb

Re: python html rendering

2006-10-03 Thread Pierre Imbaud
hanumizzle wrote: > On 10/3/06, Colin J. Williams <[EMAIL PROTECTED]> wrote: > > >>Another approach is to use PyScripter (an editor and IDE). One can >>generate documentation and then save the generated html doc. >> >>Also PyDoc can be used directly. > > > And if you want to go the traditional

Re: python html rendering

2006-10-03 Thread hanumizzle
On 10/3/06, Colin J. Williams <[EMAIL PROTECTED]> wrote: > Another approach is to use PyScripter (an editor and IDE). One can > generate documentation and then save the generated html doc. > > Also PyDoc can be used directly. And if you want to go the traditional way, Emacs and Vim can both be us

Re: python html rendering

2006-10-03 Thread Colin J. Williams
Josh Bloom wrote: > Hey Pierre, > > I'm using this plug-in for wordpress to display Python code. > http://blog.igeek.info/wp-plugins/igsyntax-hiliter/ > It works pretty well and can display a lot of other languages as well. > > -Josh > > > On 10/3/06, *Pierre Imbaud* <[EMAIL PROTECTED]

Re: python html rendering

2006-10-03 Thread Josh Bloom
Hey Pierre,I'm using this plug-in for wordpress to display Python code. http://blog.igeek.info/wp-plugins/igsyntax-hiliter/It works pretty well and can display a lot of other languages as well. -JoshOn 10/3/06, Pierre Imbaud <[EMAIL PROTECTED]> wrote: Hi, Im looking for a way to display some pytho

python html rendering

2006-10-03 Thread Pierre Imbaud
Hi, Im looking for a way to display some python code in html: with correct indentation, possibly syntax hiliting, dealing correctly with multi-line comment, and... generating valid html code if the python code itself deals with html (hence manipulates tag litterals. Thanks for your help! -- htt

Re: python - HTML processing - need tips

2006-08-08 Thread wipit
I figured it out... Just turned the POST request into a GET to see what was getting appended to the URL - thanks Gabe! Gabriel Genellina wrote: > At Monday 7/8/2006 20:58, wipit wrote: > > >I need to process a HTML form in python. I'm using urllib2 and > >HTMLParser to handle the html. There are s

Re: python - HTML processing - need tips

2006-08-07 Thread Gabriel Genellina
At Monday 7/8/2006 20:58, wipit wrote: I need to process a HTML form in python. I'm using urllib2 and HTMLParser to handle the html. There are several steps I need to take to get to the specific page on the relevant site the first of which is to log in with a username/password. The html code tha

python - HTML processing - need tips

2006-08-07 Thread wipit
I need to process a HTML form in python. I'm using urllib2 and HTMLParser to handle the html. There are several steps I need to take to get to the specific page on the relevant site the first of which is to log in with a username/password. The html code that processes the login consists of 2 edit b

Re: Any python HTML generator libs?

2006-03-10 Thread Matt Goodall
Steve Holden wrote: > Sullivan WxPyQtKinter wrote: > >>Hi, everyone. Simply put, what I need most now is a python lib to >>generate simple HTML. >> >>I am now using XML to store my lab report records. I found python >>really convinient to manipulate XML, so I want to make a small on-line >>CGI pr

Re: Any python HTML generator libs?

2006-03-09 Thread Michael
ot;css Zen Garden" . > > Nearly two years after initially using HTMLTemplate, the python code, > templates and css are easy to maintain. Whereas some code/markup written > with a python HTML generator is difficult to maintain. > CSS is awesome. It can lead to some real headaches

Re: Any python HTML generator libs?

2006-03-09 Thread Stephen D Evans
templates and css are easy to maintain. Whereas some code/markup written with a python HTML generator is difficult to maintain. Stephen D Evans -- http://mail.python.org/mailman/listinfo/python-list

Re: Any python HTML generator libs?

2006-03-09 Thread Bruno Desthuilliers
Sullivan WxPyQtKinter a écrit : > Hi, everyone. Simply put, what I need most now is a python lib to > generate simple HTML. > > I am now using XML to store my lab report records. I found python > really convinient to manipulate XML, so I want to make a small on-line > CGI program to help my colle

Re: Any python HTML generator libs?

2006-03-09 Thread Gerard Flanagan
Sullivan WxPyQtKinter wrote: > Hi, everyone. Simply put, what I need most now is a python lib to > generate simple HTML. > > I am now using XML to store my lab report records. I found python > really convinient to manipulate XML, so I want to make a small on-line > CGI program to help my colleag

Re: Any python HTML generator libs?

2006-03-09 Thread Sullivan WxPyQtKinter
That lib can help. But still, I have to code a lot using that lib. Maybe my program is quite strange, far from common. Thank you, after all~! -- http://mail.python.org/mailman/listinfo/python-list

Re: Any python HTML generator libs?

2006-03-09 Thread Sullivan WxPyQtKinter
Sorry I am completely a green-hand in HTML. What is HTMLTemplate and ElementTree? Would you please post some source code as an example? Of course I would Google them to find out more. Thank you so much. -- http://mail.python.org/mailman/listinfo/python-list

Re: Any python HTML generator libs?

2006-03-09 Thread Steve Holden
Sullivan WxPyQtKinter wrote: > Hi, everyone. Simply put, what I need most now is a python lib to > generate simple HTML. > > I am now using XML to store my lab report records. I found python > really convinient to manipulate XML, so I want to make a small on-line > CGI program to help my colleagu

Re: Any python HTML generator libs?

2006-03-09 Thread Jarek Zgoda
Sullivan WxPyQtKinter napisał(a): > Hi, everyone. Simply put, what I need most now is a python lib to > generate simple HTML. > > I am now using XML to store my lab report records. I found python > really convinient to manipulate XML, so I want to make a small on-line > CGI program to help my co

Re: Any python HTML generator libs?

2006-03-09 Thread Michael
> Will XSTL be useful? Is my problem somewho related with XML-SIG? > Looking forward to your precious suggestion. > XSLT is powerful but a royal pain in the arse. Just writing some Python to generate your HTML would probably be a lot easier for you. -- Michael McGlothlin, tech monkey Tub Monk

Any python HTML generator libs?

2006-03-09 Thread Sullivan WxPyQtKinter
Hi, everyone. Simply put, what I need most now is a python lib to generate simple HTML. I am now using XML to store my lab report records. I found python really convinient to manipulate XML, so I want to make a small on-line CGI program to help my colleagues to build their lab report records into

Re: python html

2005-08-20 Thread DENG
try this http://miex.tigris.org i wrote this for checking bad html, correct them and optimize them -- http://mail.python.org/mailman/listinfo/python-list

Re: python html

2005-08-19 Thread Fuzzyman
I do exactly that in my Python CGI proxy (approx). I wrote a very simple parser called scraper.py that makes it easy. It won't choke on bad html either. http://www.voidspace.org.uk/python/recipes.shtml All the best, Fuzzyman http://www.voidspace.org.uk/python -- http://mail.python.org/mailman

Re: python html

2005-08-19 Thread Walter Dörwald
Steve Young wrote: > Hi, I am looking for something where I can go through > a html page and make change the url's for all the > links, images, href's, etc... easily. If anyone knows > of something, please let me know. Thanks. You might try XIST (http://www.livinglogic.de/Python/xist) Code might

Re: python html

2005-08-19 Thread [EMAIL PROTECTED]
Steve Young wrote: > Hi, I am looking for something where I can go through > a html page and make change the url's for all the > links, images, href's, etc... easily. If anyone knows > of something, please let me know. Thanks. BeautifulSoup or PyMeld Lorenzo -- http://mail.python.org/mailman/l

Re: python html

2005-08-18 Thread Mike Meyer
Steve Young <[EMAIL PROTECTED]> writes: > Hi, I am looking for something where I can go through > a html page and make change the url's for all the > links, images, href's, etc... easily. If anyone knows > of something, please let me know. Thanks. I've been doing a lot of that today. But the tool

python html

2005-08-18 Thread Steve Young
Hi, I am looking for something where I can go through a html page and make change the url's for all the links, images, href's, etc... easily. If anyone knows of something, please let me know. Thanks. -steve Start your day with