Locking files? n stuff

_martin_ martin.frost at excite.co.uk
Sun Dec 12 08:28:49 EST 1999


Hi all,

I'm new to this so here's a little background...

I'm in my final year at Uni, and for my final year project I am comparing Python
with Perl (in a web context). I am intending to write some scripts both in
Python and Perl that do approx. the same thing. The project also involves
writing a report on my findings. I've been reading up on Python for a few weeks
(Learning Python) and was trying to get hold of the Internet programming book,
but sadly it's out of print.


So can anybody help me with this?

I'm writing a guestbook (and eventually counters) in Python and wondered:
Do I need to worry about locking and unlocking files
If I do, can anyone let me know which command to use (flock, fcntl.lock, etc. ?)
[Using latest perl and RH6]


Also, while I'm here, is it possible to flush the output of html? As I
originally wanted to have one script that handles adding and viewing the
guestbook. ie
initial view = a form with Add and View buttons
When Add is pressed, the page clears and the Add form is displayed
When View is pressed, the page clears and the guestbook entries are displayed.


Another query I have, is what datatype to use to store and retrieve the data?
It's gonna be a separate file (so's I can monitor it), I thought about just
writing $trings to the data file. Or should I use lists, or tuples?

Any help is most appreciated


-- 
_martin_                                  yorkshire pagan, tull listenin rocker.
--------------------------------------------------------------------------------
born, bred, studying in yorkshire             email:martin at fronbow.force9.co.uk.
SPAMMERS- use excite, ne1 else use                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^
-- 
_martin_                                  yorkshire pagan, tull listenin rocker.
born, bred, studying in yorkshire             email:martin at fronbow.force9.co.uk.
uly:  '71 M Y* L++ U KQ C c- B p+ Sh s++R H+ I++ FC(The Moor) R(S11) N(S)



More information about the Python-list mailing list