Re: New to python - parse data into Google Charts

2010-09-03 Thread alistair
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

Re: New to python - parse data into Google Charts

2010-09-03 Thread Mike Kent
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

New to python - parse data into Google Charts

2010-09-03 Thread alistair
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

Re: CGI module does not parse data

2005-12-18 Thread Tim Roberts
"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

Re: CGI module does not parse data

2005-12-16 Thread Devan L
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

Re: CGI module does not parse data

2005-12-16 Thread Steve Holden
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

Re: CGI module does not parse data

2005-12-16 Thread amfr
Neither work -- http://mail.python.org/mailman/listinfo/python-list

Re: CGI module does not parse data

2005-12-04 Thread Mardy
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

Re: CGI module does not parse data

2005-12-03 Thread Tim Roberts
"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

Re: CGI module does not parse data

2005-12-02 Thread amfr
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

Re: CGI module does not parse data

2005-12-02 Thread Mardy
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

Re: CGI module does not parse data

2005-12-01 Thread Peter Hansen
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

Re: CGI module does not parse data

2005-12-01 Thread amfr
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

Re: CGI module does not parse data

2005-12-01 Thread amfr
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

Re: CGI module does not parse data

2005-12-01 Thread Fredrik Lundh
"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

CGI module does not parse data

2005-12-01 Thread amfr
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

Re: parse data

2005-11-09 Thread Larry Bates
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

Re: parse data

2005-11-09 Thread Micah Elliott
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

Re: parse data

2005-11-09 Thread Dennis Benzinger
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

Re: parse data

2005-11-09 Thread MooMaster
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

Re: parse data

2005-11-09 Thread MooMaster
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

parse data

2005-11-09 Thread py
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