On Sep 3, 12:51 pm, Mike Kent wrote:
> On Sep 3, 1:52 pm, alistair wrote:
>
> > I'm new to python and my programming years are a ways behind me, so I
> > was looking for some help in parsing a file into a chart using the
> > Google Charts API.
>
> Try this:http://pygooglechart.slowchop.com/
Than
On Sep 3, 1:52 pm, alistair wrote:
> I'm new to python and my programming years are a ways behind me, so I
> was looking for some help in parsing a file into a chart using the
> Google Charts API.
>
Try this:
http://pygooglechart.slowchop.com/
--
http://mail.python.org/mailman/listinfo/python-li
I'm new to python and my programming years are a ways behind me, so I
was looking for some help in parsing a file into a chart using the
Google Charts API.
The file is simply a text file containing: Date, Total Accesses,
Unique Accesses.
I'd like date across the bottom, access numbers on the vert
"amfr" <[EMAIL PROTECTED]> wrote:
>
>Neither work
Yes, they do.
Post your form HTML and the Python code you're using, and we'll show you
what you're doing wrong.
--
- Tim Roberts, [EMAIL PROTECTED]
Providenza & Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
amfr wrote:
> I am writing a webserver, and I want it to be able to run python
> scripts. But when I set sys.stdin to self.rfile (using the
> BaseHTTPServer class, self.rfile is a input stream containing the
> request), the cgi module does not parse the data.
> Example script:
> import cgi
> form
amfr wrote:
> Neither work
>
But you don't give us any further information to go on.
Are you importing cgitb and calling cgitb.enable() to trap and print any
errors that might occur?
Are you looking in the browser at the HTM source (view source) of the
page your server is returning to see more
Neither work
--
http://mail.python.org/mailman/listinfo/python-list
Le die Fri, 02 Dec 2005 12:18:28 -0800, amfr ha scribite:
> import cgi
> form = cgi.FieldStorage()
> print form["test"]
> print "test"
>
> I would only be able to see "test", not "hello world"
> I am sure its not my browser
As Tim said, you have tu use "form['test'].value", because "print
form['t
"amfr" <[EMAIL PROTECTED]> wrote:
>
>import cgi
>form = cgi.FieldStorage()
>print form["test"]
>print "test"
>
>I would only be able to see "test", not "hello world"
>I am sure its not my browser
Did you mean:
print form["test"].value
--
- Tim Roberts, [EMAIL PROTECTED]
Providenza & Boekelhe
I am using execfile, setting stdin and stdout like this:
sys.stdin = self.wfile
sys.stdout = self.rfile
execfile(filename)
Its the same code used in the CGIHTTPServer module. I know that the
python is executing corretly, a script with this content would work:
print ""
print ""
print ""
print "bl
Le die Thu, 01 Dec 2005 15:08:14 -0800, amfr ha scribite:
> I have included some of the content of that file, I am writing this as
> an extension to my ebserver which is based on BaseHTTPServer. This
> part of the code was taken directly from the CGIHTTPServer file,
> nothing changed
I did the s
amfr wrote:
> I just read somewhere that the CGIHTTPServer module does not work on
> mac (which I am currently using), is this true?
It might help a lot if you could include a link to "somewhere", so we'd
know what "does not work" meant... often it means one particular feature
is not perfect, as
I just read somewhere that the CGIHTTPServer module does not work on
mac (which I am currently using), is this true?
--
http://mail.python.org/mailman/listinfo/python-list
I have included some of the content of that file, I am writing this as
an extension to my ebserver which is based on BaseHTTPServer. This
part of the code was taken directly from the CGIHTTPServer file,
nothing changed
--
http://mail.python.org/mailman/listinfo/python-list
"amfr" wrot3e:
> I am writing a webserver, and I want it to be able to run python
> scripts. But when I set sys.stdin to self.rfile (using the
> BaseHTTPServer class, self.rfile is a input stream containing the
> request), the cgi module does not parse the data.
> Example script:
> import cgi
> f
I am writing a webserver, and I want it to be able to run python
scripts. But when I set sys.stdin to self.rfile (using the
BaseHTTPServer class, self.rfile is a input stream containing the
request), the cgi module does not parse the data.
Example script:
import cgi
form = cgi.FieldStorage()
print
py wrote:
> I have some data (in a string) such as
>
> person number 1
>
> Name: bob
> Age: 50
>
>
> person number 2
>
> Name: jim
> Age: 39
>
> ...all that is stored in a string. I need to pull out the names of the
> different people and put them in a list or something. Any
> suggestio
On Nov 09, Dennis Benzinger wrote:
> Use the re module:
>
> import re
> your_data = """person number 1
>
> Name: bob
> Age: 50
>
>
> person number 2
>
> Name: jim
> Age: 39"""
>
> names = []
> for match in re.finditer("Name:(.*)", your_data):
> names.append(match.group(1))
> print names
py schrieb:
> I have some data (in a string) such as
>
> person number 1
>
> Name: bob
> Age: 50
>
>
> person number 2
>
> Name: jim
> Age: 39
>
> ...all that is stored in a string. I need to pull out the names of the
> different people and put them in a list or something. Any
> suggest
If you know the indices of where the data should be in your string, you
can use substrings... ie:
>>> stringy = " Happy Happy Cow, 50, 1234 Your Mom's House AllTheTime,USA "
>>> stringy[0:16]
' Happy Happy Cow'
If the data isn't set all the time (for example, and address doesn't
have a mandatory
If you know the indices of where the data should be in your string, you
can use substrings... ie:
>>> stringy = " Happy Happy Cow, 50, 1234 Your Mom's House AllTheTime,USA "
>>> stringy[0:16]
' Happy Happy Cow'
If the data isn't set all the time (for example, and address doesn't
have a mandatory
I have some data (in a string) such as
person number 1
Name: bob
Age: 50
person number 2
Name: jim
Age: 39
...all that is stored in a string. I need to pull out the names of the
different people and put them in a list or something. Any
suggestions...besides doing data.index("name")...ov
22 matches
Mail list logo