On Mon, May 21, 2012 at 4:06 PM, William R. Wing (Bill Wing) <w...@mac.com> wrote: > On May 21, 2012, at 6:38 AM, wolfrage8...@gmail.com wrote: > >> All, I have had a curious idea for awhile, and was wondering the best >> way to implement it in Python and if it is even possible. The concept >> is this, a file that is actually a folder that contains multiple files >> (Like an Archive format). The actual files are really un-important. >> What I want is for the folder to be represented as a single file by >> any normal file browser, but to be able to access the files with-in >> via Python. I will actually use the word archive to represent my >> mystical folder as a file concept for the rest of this message. Some >> additional things I would like to be possible: is for multiple copies >> of the program to write to the same archive, but different files >> with-in at the same time (Reading & Writing to the archive should not >> lock the archive as long as they are different files); and for just >> the desired files with-in the archive to be loaded to memory with out >> having to hold the entire archive in memory. >> Use case for these additional capabilities. I was reading about how >> some advanced word processing programs (MS Word) actually save >> multiple working copies of the file with-in a single file >> representation and then just prior to combining the working copies it >> locks the original file and saves the working changes. That is what I >> would like to do. I want the single file because it is easy for a user >> to grasp that they need to copy a single file or that they are working >> on a single file, but it is not so easy for them to grasp the multiple >> file concepts. > > As others have noted, this smells a lot like a .tar or similar archive. > > I'd suggest that it also smells like a scaled down and locally served > Concurrent Versioning System. CVS does exactly what you want in terms of > preserving only differences between edited versions of a file and it only > locks the particular file that has been checked out; also allows you to back > up to any previous version of a file. There are CVS-Python bindings (as well > as SVN-Python, SVN being a newer more modern version of CVS). Google will > turn up lots of references to both. > > -Bill
Hey that sounds really interesting I did not know that SVN or CVS was even an option, but can they work with an archive, I will have to experiment, but that would take care of the multiple working copies and final merges latter. Thanks for the idea! _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor