[Tutor] RE: Question on open and read html files and psycopg

Ms Soo Chong s4046441 at student.uq.edu.au
Wed Sep 15 16:34:09 CEST 2004


Hi,

Hmm..actually, this is the first time I'm tried a frame-based website. In fact, this is my first time to write a python script, first time deal with postgreSQL and HTML. So please bear with my simple or stupid questions. Thanks.

A friend of mine taught me about the frameset and I understand that it needs to be in a separate file from each of the framed pages. I'm just curious why python is able to open and read the frame.html but not the files within, or there is something wrong with my script which I'm not sure. Anyways, my thesis supervisor don't like the idea of using a frame-based website as not all browser supports that. (he just told me today that he don't prefer that)Thus, I combined all the html files into one and separate them using tables now. Anyway, thanks alot for your reply. 

As for psycopg...
My code was based on python and pg module and I wanna to switch to DB-API, such as psycopg. I havn't really tried psycopg examples yet? BTW, where to get them? You mean try connecting with psycopg? Just to correct my previous mail, psycopg has not been installed yet because there seems to have some stuffs missing (postgresql header and etc) which stopped the configuration, but should be fixed in a day or two. So, I have not try psycopg yet.

How to grab the query input from the user? Right now, the user have to type in SQL statements (SELECT * FROM ....)to search for data. Thats not what I want, I need the grab the input from the user (keywords) and match with the meta-data in the tables (postgresql) and return the results. This is the part where I'm stucked.


Any help will very much appreciated. Thank you.

Cheers,
Shufen




More information about the Tutor mailing list