Search the web
Sign In
New User? Sign Up
ClearSilver
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Want your group to be featured on the Yahoo! Groups website? Add a group photo to Flickr.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Multiptle lines of output   Message List  
Reply | Forward Message #1234 of 1347 |
Re: Multiptle lines of output

Brandon Long(blong@...)@2008.12.06 21:19:08 -0800:
> On 12/06/08 Dan uttered the following other thing:
> > Hi. I am trying to figure out how to display multiple lines of several
> > values. I know this is basic and done all the time in CGIs, but I am
> > having trouble wrapping the template around it.
> >
> > I am reading data from a text file in python one line at a time. For all
> > lines in the file I want to display each line as a set (list) of values
> > on a form in a page. Displaying one line is easy in template, but how
> > would I store multiple lines in HDF and read in a template??
>
> I'm not sure what you're trying to do, exactly, but:

Sorry, let me try to explain better.

The file is really irrelevant, it could be a database instead. If it
were a database, I would read a row from a table, each row's culumns
would be separate variables. So I just need to read rows of data, and
display them in html.

In this case it's DNS data:

type | hostname | ip address | time

They're displayed as default values in a form, which can be submitted
back to the CGI and written back.

Thanks.



Sun Dec 7, 2008 7:32 pm

strangepics
Offline Offline
Send Email Send Email

Forward
Message #1234 of 1347 |
Expand Messages Author Sort by Date

Hi. I am trying to figure out how to display multiple lines of several values. I know this is basic and done all the time in CGIs, but I am having trouble...
Dan
strangepics
Offline Send Email
Dec 6, 2008
4:21 pm

... I'm not sure what you're trying to do, exactly, but: foo.hdf: Option.1 = Foo Option.2 = Bar Option.3 = Baz foo.cs: <form action=/foo.do> <?cs each:opt =...
Brandon Long
blong42
Offline Send Email
Dec 7, 2008
5:19 am

... Sorry, let me try to explain better. The file is really irrelevant, it could be a database instead. If it were a database, I would read a row from a table,...
Dan
strangepics
Offline Send Email
Dec 9, 2008
6:39 pm

... x = for (type, hostname, ipaddr, t) in dnsdata: ncgi.hdf.setValue("Entry.%d.type" % x, type) ncgi.hdf.setValue("Entry.%d.hostname" % x, hostname) ...
Brandon Long
blong42
Offline Send Email
Dec 9, 2008
11:22 pm

... Thanks, that makes sense, but I still can't seem to get values out of HDF (empty). Is there a way to dump the whole HDF for debugging? Thanks....
Dan
strangepics
Offline Send Email
Dec 12, 2008
3:17 pm

... Actually I had a bug. It works now. However I have trouble understanding how it works (in the template). Thanks....
Dan
strangepics
Offline Send Email
Dec 12, 2008
4:42 pm

There are some debugging HDF values which we use to cause the HDF contents to be dumped into the rendered page. ...
David Jeske
jeskeca
Offline Send Email
Dec 12, 2008
8:14 pm

... Thanks!...
Dan
strangepics
Offline Send Email
Dec 14, 2008
5:14 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help