tags:

views:

130

answers:

1

Hi i am having a one xml file and some image files, i am making my one concatenate file (ie as like tar file) from all these file (i am having my own scripts for tarring and untarring).

before i describe what exactly i want you have to look the current situation.

As of now i have to untar the all files into a directory then i am able to read the xml file which is part of the tar file.Then i read the data from xml file and then i am able to draw image mention in xml ( image names are mention in xml attribute value) on corresponding panels.

Now i want when someone click on my tar file, i should able to read the xml file and then i am able to read all the other images ( data) and i can draw on the corresponding panel with extract specifically in to a directory.

Is any method or any help really help me alot. Thanks in advance.

+2  A: 

The tarfile module gives you access to tarballs. It won't be random access, but you can read out any files you need and put them in a temporary directory, or just store them in strings.

Ignacio Vazquez-Abrams
i am not using standard tar module for concatenation of files. My file is concatenated file but not standard tar file. i am manually doing concatenation of file to build a tar file
mukul sharma
If it doesn't follow the standards for a tar file then it isn't one and calling it such is dishonest.
Ignacio Vazquez-Abrams
yeah thats true but every time i am writing concatenate file (ie as like tar file).If you still can help me out, its really great act for me.
mukul sharma
Without some sort of real spec everything you're doing is pointless busywork. Just make it a tarball.
Ignacio Vazquez-Abrams