On 21/05/12 15:23, wolfrage8...@gmail.com wrote:

if any of these formats offer file locking with in them, ;et me say
that better. Can I open a, as example, tar file and lock a file with
in it, with out locking the entire tar archive?

No and you probably shouldn't.

If two users are accessing the same file at once and one of them is modifying it (writing) while the other is trying to read it bad things are very likely to happen. Remember that these virtual files inside the tar file(say) are really just blocks of data within a single file.

If you want to try modifying blocks inside a single store you will be better with a database. But that's not usually a single file (Access, SQLite etc excepted). Actually SQLite might do what you want by locking at the table row level, I haven't checked. You would need a single table of BLOB records where each BLOB represented a virtual file...

Version control tools like CVS and SVN don't quite fit your needs either since they use multiple files not a single file. Although they do usually store all the historic versions of each file in one. So if it is really only historic data you need CVS, SVN, RCS etc may work.

--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/

_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to