btw, credits for the code shown below also for:
http://bitworking.org/news/Sparklines_in_data_URIs_in_Python
[EMAIL PROTECTED] wrote :
> This makes sense. Thanks!
>
> I managed to get what I wanted with something similar to what you suggested:
>
> [CODE]
> print "Content-Type: text/html\n\n"
>
This makes sense. Thanks!
I managed to get what I wanted with something similar to what you suggested:
[CODE]
print "Content-Type: text/html\n\n"
html="""
data analysis site
This is a test
After image text
"""
print html
Hi,
Thanks for your patience.
I got the text displayed in the web browser with the following code:
[CODE]
f=StringIO.StringIO()
f.write('data analysis site')
f.write("This is a trial test")
f.write("")
print "Content-type: text/html\n"
print f.getvalue()
f.close()
[/CODE]
Now I am trying to pu
I have tried calling a script containing the code below from a web browser and
it did not get the text.
[CODE]
#!c:/Python25/python.exe -u
import StringIO
f=StringIO.StringIO()
f.write('data analysis site')
f.write("This is a trial test")
f.write("")
print "Content-type: text/html\n"
print f.r
Sorry, my fault...
I am trying to build a web application for data analysis. Basically some data
will be read from a database and passed to a python script (myLibs.py) to build
an image as follows.
[CODE]
f=urllib.urlopen("http://localhost/path2Libs/myLibs.py",urllib.urlencode(TheData))
print "
Hi,
how can I combine some dynamically generated html code (using python) with the
output of a urllib.openurl() call?
I have tried to use the StringIO() class with .write functions, but it did not
work. Below is the code that does not work.
[CODE]
f=StringIO.StringIO()
f.write('data analysis')