Re: Reading structured text file (non-CSV) into Pandas Dataframe

2017-04-13 Thread breamoreboy
On Thursday, April 13, 2017 at 11:09:23 AM UTC+1, David Shi wrote: > http://www.ebi.ac.uk/ena/data/warehouse/search?query=%22geo_circ(-0.587,-90.5713,170)%22=sequence_release=text > The above is a web link to a structured text file.  It is not a CSV. > How can this text file be read into a Pandas

Re: reading a text file

2009-08-19 Thread Paul Rubin
superpollo u...@example.net writes: while True: try: sys.stdout.write(sys.stdin.next().upper()) except StopIteration: break Maybe there is some subtle difference, but it looks like you really mean for line in sys.stdin: sys.stdout.write(line.upper()) --

Re: reading a text file

2009-08-19 Thread Peter Otten
superpollo wrote: hi clp what's the difference between: while True: input_line = sys.stdin.readline() if input_line: sys.stdout.write(input_line.upper()) else: break and: while True: try:

Re: reading a text file

2009-08-19 Thread Tino Wildenhain
superpollo wrote: hi clp what's the difference between: while True: input_line = sys.stdin.readline() if input_line: sys.stdout.write(input_line.upper()) else: break and: while True: try: sys.stdout.write(sys.stdin.next().upper())

Re: Reading from text file

2008-08-26 Thread Fredrik Lundh
A. Joseph wrote: I want to read from text file, 25 lines each time i press enter key, just like the python documentation. you can use pydoc's pager from your program: import pydoc text = open(filename).read() pydoc.pager(text) /F --

Re: reading hebrew text file

2005-10-18 Thread hagai26
realy thanks hagai -- http://mail.python.org/mailman/listinfo/python-list

Re: reading hebrew text file

2005-10-17 Thread Alex Martelli
[EMAIL PROTECTED] wrote: I have a hebrew text file, which I want to read in python I don't know which encoding I need to use how I do that As for the how, look to the codecs module -- but if you don't know what codec the textfile is written in, I know of no ways to guess from here!-) Alex

Re: reading hebrew text file

2005-10-17 Thread jepler
I looked for VAV in the files in the encodings directory (/usr/lib/python2.4/encodings/*.py on my machine). I found that the following character encodings seem to include hebrew characters: cp1255 cp424 cp856 cp862 iso8859-8 A file containing hebrew text

Re: reading hebrew text file

2005-10-17 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: I have a hebrew text file, which I want to read in python I don't know which encoding I need to use that's not a good start. but maybe it's one of these: http://sites.huji.ac.il/tex/hebtex_fontsrep.html ? how I do that f = open(myfile) text =