how do i give it in the f orm of a file handle???? instead of a string??? i dint get that..cud u clear it for me?
On Mon, Jun 14, 2010 at 9:21 PM, <bangpypers-requ...@python.org> wrote: > Send BangPypers mailing list submissions to > bangpypers@python.org > > To subscribe or unsubscribe via the World Wide Web, visit > http://mail.python.org/mailman/listinfo/bangpypers > or, via email, send a message with subject or body 'help' to > bangpypers-requ...@python.org > > You can reach the person managing the list at > bangpypers-ow...@python.org > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of BangPypers digest..." > > > Today's Topics: > > 1. Re: file handling (Supreet Sethi) > 2. biopython (madhuri vio) > 3. biopython (madhuri vio) > 4. Re: biopython (Guruprasad) > 5. Live update of cmdline output on browser? (Vikas BN) > 6. Re: Live update of cmdline output on browser? (Noufal Ibrahim) > 7. biopython (madhuri vio) > 8. Re: biopython (Noufal Ibrahim) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Mon, 14 Jun 2010 10:48:14 +0100 > From: Supreet Sethi <supreet.se...@gmail.com> > To: Bangalore Python Users Group - India <bangpypers@python.org> > Subject: Re: [BangPypers] file handling > Message-ID: <1276508894.2900.22.ca...@shakti> > Content-Type: text/plain; charset="UTF-8" > > On Mon, 2010-06-14 at 11:48 +0530, madhuri vio wrote: > > a = open("human","rb") > > print a.readlines() > > > > > > > > this is the code i have > > written to read a text file but i am unable to .. > > i get a very weird output... > > > "PK\x03\x04\x14\x00\x00\x00\x00\x00\xd6+\xce<^\xc62\x0c'\x00\x00\x00'\x00\x00\x00\x08\x00\x00\x00mimetypeapplication/vnd.oasis.opendocument.textPK\x03\x04\x14\x00\x00\x00\x00\x00\xd6+\xce<\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1a\x00\x00\x00Configurations2/statusbar/PK\x03\x04\x14\x00\x08\x00\x08\x00\xd6+\xce<\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\x00\x00\x00Configurations2/accelerator/current.xml\x03\x00PK\x07\x08\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00PK\x03\x04\x14\x00\x00\x00\x00\x00\xd6+\xce<\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00Configurations2/floater/PK\x03\x04\x14\x00\x00\x00\x00\x00\xd6+\xce<\x00\x00\x00\x00\x00 > > > > i am unable to proceed > > You could try open via this sequence > > >> import zipfile > >> z = zipfile.ZipFile("<filename here>") > >> z.infolist() > > See if it helps > > >> help(z) for further reference on interactive python shell. > > > > -- > Supreet Sethi > Ph UK: +447859172473 > Ph IN: +919811143517 > Ph Skype: d_j_i_n_n > Profile: http://www.google.com/profiles/supreet.sethi > Twt: http://twitter.com/djinn > > > > > ------------------------------ > > Message: 2 > Date: Mon, 14 Jun 2010 19:23:05 +0530 > From: madhuri vio <madhuri....@gmail.com> > To: bangpypers@python.org > Subject: [BangPypers] biopython > Message-ID: > <aanlktinilywsbne5fiem1xrb13acr38awodykswgf...@mail.gmail.com> > Content-Type: text/plain; charset=ISO-8859-1 > > i cudnt run this!!!!!! > > and this was the error occured > > for seq_record in SeqIO.parse("ls_MTbH37Rv. > fasta","fasta"): > ... print seq_record.id > ... print repr(seq_record.seq) > ... print len(seq_record) > ... > Traceback (most recent call last): > File "<stdin>", line 1, in <module> > File "/var/lib/python-support/python2.6/Bio/SeqIO/__init__.py", line 342, > in parse > raise TypeError("Need a file handle, not a string (i.e. not a > filename)") > TypeError: Need a file handle, not a string (i.e. not a filename) > > how do i handle this??? > i am waiting for the reply > -- > madhuri :) > > > ------------------------------ > > Message: 3 > Date: Mon, 14 Jun 2010 19:32:33 +0530 > From: madhuri vio <madhuri....@gmail.com> > To: pythonlist <python-l...@python.org>, bangpypers@python.org > Subject: [BangPypers] biopython > Message-ID: > <aanlktil7yupm18lihvgdcaeji5oeyb3suaobbwa7v...@mail.gmail.com> > Content-Type: text/plain; charset=ISO-8859-1 > > i have tried this still unable to get an output > > from Bio import Seq > from Bio import SeqIO > from Bio import SeqRecord > > for seq_record in SeqIO.read("ls_MTbH37Rv.fasta", "fasta"): > print seq_record.id > print repr(seq_record.seq) > print len(seq_record) > > python bio.py > Traceback (most recent call last): > File "bio.py", line 10, in <module> > for seq_record in SeqIO.read("ls_MTbH37Rv.fasta", "fasta"): > File "/var/lib/python-support/python2.6/Bio/SeqIO/__init__.py", line 433, > in read > iterator = parse(handle, format, alphabet) > File "/var/lib/python-support/python2.6/Bio/SeqIO/__init__.py", line 342, > in parse > raise TypeError("Need a file handle, not a string (i.e. not a > filename)") > TypeError: Need a file handle, not a string (i.e. not a filename) > -- > madhuri :) > > > ------------------------------ > > Message: 4 > Date: Mon, 14 Jun 2010 19:36:34 +0530 > From: Guruprasad <lgp171...@gmail.com> > To: Bangalore Python Users Group - India <bangpypers@python.org> > Subject: Re: [BangPypers] biopython > Message-ID: > <aanlktinlnbljwwidgbqxoycuxdlja7r297nisrfgm...@mail.gmail.com> > Content-Type: text/plain; charset=ISO-8859-1 > > Hi, > > On Mon, Jun 14, 2010 at 7:32 PM, madhuri vio <madhuri....@gmail.com> > wrote: > > i have tried this still unable to get an output > > TypeError: Need a file handle, not a string (i.e. not a filename) > > Isn't this error kind of obvious of what is going wrong? I haven't > used any of these stuff but I think passing a file handle of the file > as an argument instead of a string in whichever line number the error > is referring to should solve the problem. Also avoid posting duplicate > mails to the list or cross-posting. > > Regards, > Guruprasad > > > ------------------------------ > > Message: 5 > Date: Mon, 14 Jun 2010 20:06:57 +0530 > From: Vikas BN <vikas...@gmail.com> > To: Bangalore Python Users Group - India <bangpypers@python.org> > Subject: [BangPypers] Live update of cmdline output on browser? > Message-ID: > <aanlktinrrqktqcmr6cajg8sz4z2i6b5okpqcau0kk...@mail.gmail.com> > Content-Type: text/plain; charset=ISO-8859-1 > > Hi All, > > I'm writing a django-based web app. One of the components involve > executing > a cmd-line script on the server. This script takes quite a bit of time > (anywhere > between a minute to about 20minutes) and is quite verbose. > > Is there a way to 'tail' the output of this script to the browser? I > searched on the > internet, but apparently my skills in that area seem to have fallen short > in this case :( > > TIA, > Vikas > > > ------------------------------ > > Message: 6 > Date: Mon, 14 Jun 2010 20:53:32 +0530 > From: Noufal Ibrahim <nou...@gmail.com> > To: Bangalore Python Users Group - India <bangpypers@python.org> > Subject: Re: [BangPypers] Live update of cmdline output on browser? > Message-ID: > <aanlktin0hcpqmphrpro2mhfxunr8sugduge3ffw-r...@mail.gmail.com> > Content-Type: text/plain; charset=ISO-8859-1 > > On Mon, Jun 14, 2010 at 8:06 PM, Vikas BN <vikas...@gmail.com> wrote: > [..] > > ?Is there a way to 'tail' the output of this script to the browser? I > > searched on the > > ?internet, but apparently my skills in that area seem to have fallen > short > > in this case :( > > Not Python specific but Ajax term > (http://antony.lesuisse.org/software/ajaxterm/) and it's predecessor > anyterm implement web based terminals. You might be able to steal some > ideas from there. As far as I know, they implement a simple polling > mechanism with something like exponential back off to read back new > data on the remote process. > > > -- > ~noufal > http://nibrahim.net.in > > > ------------------------------ > > Message: 7 > Date: Mon, 14 Jun 2010 21:15:50 +0530 > From: madhuri vio <madhuri....@gmail.com> > To: pythonlist <python-l...@python.org>, bangpypers@python.org > Subject: [BangPypers] biopython > Message-ID: > <aanlktil-lxi9rucl7zuvmyvipe9vu6rkfl8pvvr7z...@mail.gmail.com> > Content-Type: text/plain; charset=ISO-8859-1 > > i am still waiting for some help..... > -- > madhuri :) > > > ------------------------------ > > Message: 8 > Date: Mon, 14 Jun 2010 21:21:41 +0530 > From: Noufal Ibrahim <nou...@gmail.com> > To: Bangalore Python Users Group - India <bangpypers@python.org> > Subject: Re: [BangPypers] biopython > Message-ID: > <aanlktilp9-1lbf9qsqbhcbt5vtbk87bm-unoe914s...@mail.gmail.com> > Content-Type: text/plain; charset=ISO-8859-1 > > On Mon, Jun 14, 2010 at 9:15 PM, madhuri vio <madhuri....@gmail.com> > wrote: > > i am still waiting for some help..... > > 1. Read http://www.catb.org/~esr/faqs/smart-questions.html#urgent > first and then read the entire article. This is volunteer mailing > list. > 2. Don't cross post (i.e. post to multiple lists in the same email). > 3. Don't start threads which don't mean anything. "biopython" is > hardly a descriptive subject and this thread just says that you're > waiting for help (which doesn't obligate anyone to help you). > > Your original question was something trivial to which there was a > reply. Did you try that? What error did you see? Why did it happen? > Did you try to solve the problem? What hurdle did you hit? > > > -- > ~noufal > http://nibrahim.net.in > > > ------------------------------ > > _______________________________________________ > BangPypers mailing list > BangPypers@python.org > http://mail.python.org/mailman/listinfo/bangpypers > > > End of BangPypers Digest, Vol 34, Issue 27 > ****************************************** > -- madhuri :) _______________________________________________ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers