What's your current complete code for generating the values and inserting
them in the db? What's an example of a complete file path and name within
the zip file as well as the contents of that file that is producing a value
like the ones below?
ya its in subfolder but with ' filename = name.split('/')[-1]' I am able to
> read the file names and with 'file_raw = zf.read(name) ' i am able to read
> the sequence in the file .But the other problem with table is not solved I
> am still getting unwanted information like file path for example like
> "web2py/PCGENE_Format/NGFP_TRK.1/home/praveen/web2py/web2py/PCGENE_Format/NP7C1TRK.1D/home/praveen/web2py/web2py/PCGENE_Format/NPKGTS1/home/praveen/web2py/web2p']||['home/praveen/web2py/web2py/sampleforma']||['home/praveen/web2py/web2py/sampleforma'........"
> with the sequence information .I think that the problem in the way I am
> inserting the records .I have used
> db.plugin_seq.insert(filename=filename,raw_seq=file_raw,processed_seq=rev)
> if db(db.plugin_seq.filename==filename).count():
> rec =
> db(db.plugin_seq.filename==filename).select().first()
> rec.update_record(raw_seq=file_raw,processed_seq=rev)
> db.commit()
> to insert and update record and to extract the processed sequence I am
> using
> def records():
> values = [r.processed_seq for r in
> db().select(db.plugin_seq.processed_seq)]
> return values
>
>
>
> I have tried that by removing the subfolder but its giving an error
>>> import zipfile
>>> def zipfolder():
>>> zf = zipfile.ZipFile('/home/**praveen/job_files/seq_data/**
>>> PCGENE_Format.zip')
>>> fil = zf.open('/home/praveen/job_**files/seq_data/PCGENE_Format.**
>>> zip/NPKGTS1')
>>> print fil
>>> error:
>>> There is no item named '/home/praveen/job_files/seq_**
>>> data/PCGENE_Format.zip/**NPKGTS1' in the archive"
>>>
>>
>> No, I was asking whether there were any subfolders inside the zip file
>> itself (you can zip an entire directory structure). If so, for files that
>> are inside subfolders *within* the zip file, I would think you would
>> have to refer to the entire path, not just the filename.
>>
>> Anthony
>>
>
>