Re: Pandas printing in jupyter

2018-01-16 Thread Rustom Mody
On Sunday, January 14, 2018 at 3:28:02 AM UTC+5:30, bo...@questa.la.so wrote: > Rustom Mody writes: > > > Specifically and for starters, I want a numpy array — lets say 2D to > > start with — to be displayed(displayable) as elegantly as sympy does > > to (its) matrices > #

Re: Pandas printing in jupyter

2018-01-16 Thread Rustom Mody
On Tuesday, January 16, 2018 at 5:10:14 PM UTC+5:30, Rustom Mody wrote: > On Sunday, January 14, 2018 at 3:28:02 AM UTC+5:30, bo...@questa.la.so wrote: > > Rustom Mody writes: > > > > > Specifically and for starters, I want a numpy array — lets say 2D to > > > start with — to be displayed(display

Re: Pandas printing in jupyter

2018-01-16 Thread Rustom Mody
On Tuesday, January 16, 2018 at 6:04:06 PM UTC+5:30, Rustom Mody wrote: Had missed the mtd element ie changing elemfmt = """%d """ to elemfmt = """%d """ -- https://mail.python.org/mailman/listinfo/python-list

Re: requests / SSL blocks forever?

2018-01-16 Thread Nagy László Zsolt
>> Or maybe I misunderstood the docs and the timeout means the max. time >> elapsed between receiving two chunks of data from the server? > Yes. It's documented better here: > http://docs.python-requests.org/en/master/user/advanced/#timeouts > > You can't specify a "total time" within which the op

Right way to io.open(...) an existing file object in Python 2.7?

2018-01-16 Thread Skip Montanaro
I'd like to take advantage of the seekable() method of io.IOBase with existing open file objects, especially the standard in/out/err file objects. I know on Linux I can just do this: fp = io.open("/dev/stderr") but that's kind of cheating. File objects in Python 2.7 aren't created using the i

Re: Right way to io.open(...) an existing file object in Python 2.7?

2018-01-16 Thread Lele Gaifax
Skip Montanaro writes: > I don't see any sort of "fdopen" or "freopen" equivalent mentioned in the io > module documentation. Is this possible in a clean way? > There is an os.fdopen(), so maybe newf = os.fdopen(fp.fileno()) ciao, lele. -- nickname: Lele Gaifax | Quando vivrò di quello che

documentation on read.encode

2018-01-16 Thread Larry Martell
Looking for 2.7 docs on read.encode - googling did not turn up anything. Specifically, looking for the supported options for base64, and how to specify them, e.g. Base64.NO_WRAP -- https://mail.python.org/mailman/listinfo/python-list

Re: Right way to io.open(...) an existing file object in Python 2.7?

2018-01-16 Thread Jon Ribbens
On 2018-01-16, Skip Montanaro wrote: > I'd like to take advantage of the seekable() method of io.IOBase with > existing open file objects, especially the standard in/out/err file > objects. If it's difficult to imagine a circumstance in which you would want to seek on stdio/out/err where you were

Re: Right way to io.open(...) an existing file object in Python 2.7?

2018-01-16 Thread Skip Montanaro
> If it's difficult to imagine a circumstance in which you would want to > seek on stdio/out/err where you were not making some considerable error. > But they are already io objects so you can just call sys.stdin.seekable > or whatever. Alas, in Python 2.7 sys.stdin/stdout/stderr are traditional (

Re: Right way to io.open(...) an existing file object in Python 2.7?

2018-01-16 Thread Skip Montanaro
>> I don't see any sort of "fdopen" or "freopen" equivalent mentioned in the io >> module documentation. Is this possible in a clean way? >> > > There is an os.fdopen(), so maybe > > newf = os.fdopen(fp.fileno()) Correct, but that just returns another File object which will still lack the API pr

Re: documentation on read.encode

2018-01-16 Thread Larry Martell
On Tue, Jan 16, 2018 at 12:00 PM, Larry Martell wrote: > Looking for 2.7 docs on read.encode - googling did not turn up anything. > > Specifically, looking for the supported options for base64, and how to > specify them, e.g. Base64.NO_WRAP So I just realized that encode() is not a method of read

Re: Right way to io.open(...) an existing file object in Python 2.7?

2018-01-16 Thread eryk sun
On Tue, Jan 16, 2018 at 4:00 PM, Skip Montanaro wrote: > I'd like to take advantage of the seekable() method of io.IOBase with > existing open file objects, especially the standard in/out/err file > objects. io.open can open a file descriptor. If you don't use a duplicated FD (os.dup), then you p

Re: documentation on read.encode

2018-01-16 Thread Gene Heskett
On Tuesday 16 January 2018 14:19:38 Larry Martell wrote: > On Tue, Jan 16, 2018 at 12:00 PM, Larry Martell wrote: > > Looking for 2.7 docs on read.encode - googling did not turn up > > anything. > > > > Specifically, looking for the supported options for base64, and how > > to specify them, e.g.

Re: documentation on read.encode

2018-01-16 Thread Larry Martell
On Tue, Jan 16, 2018 at 2:35 PM, Gene Heskett wrote: > On Tuesday 16 January 2018 14:19:38 Larry Martell wrote: > >> On Tue, Jan 16, 2018 at 12:00 PM, Larry Martell > wrote: >> > Looking for 2.7 docs on read.encode - googling did not turn up >> > anything. >> > >> > Specifically, looking for the

Re: documentation on read.encode

2018-01-16 Thread Ned Batchelder
On 1/16/18 2:19 PM, Larry Martell wrote: On Tue, Jan 16, 2018 at 12:00 PM, Larry Martell wrote: Looking for 2.7 docs on read.encode - googling did not turn up anything. Specifically, looking for the supported options for base64, and how to specify them, e.g. Base64.NO_WRAP So I just realized

Re: documentation on read.encode

2018-01-16 Thread Larry Martell
On Tue, Jan 16, 2018 at 3:17 PM, Ned Batchelder wrote: > On 1/16/18 2:19 PM, Larry Martell wrote: >> >> On Tue, Jan 16, 2018 at 12:00 PM, Larry Martell >> wrote: >>> >>> Looking for 2.7 docs on read.encode - googling did not turn up anything. >>> >>> Specifically, looking for the supported option

Re: documentation on read.encode

2018-01-16 Thread Jon Ribbens
On 2018-01-16, Larry Martell wrote: > Yeah I saw it mentioned in a SO post that was java related. Wondering > if there is some way to do the same in python. base64.b64encode(foo) -- https://mail.python.org/mailman/listinfo/python-list

Re: documentation on read.encode

2018-01-16 Thread MRAB
On 2018-01-16 19:52, Larry Martell wrote: On Tue, Jan 16, 2018 at 2:35 PM, Gene Heskett wrote: On Tuesday 16 January 2018 14:19:38 Larry Martell wrote: On Tue, Jan 16, 2018 at 12:00 PM, Larry Martell wrote: > Looking for 2.7 docs on read.encode - googling did not turn up > anything. > > Sp

[ANN] python-ghostscript 0.6

2018-01-16 Thread Hartmut Goebel
I'm pleased to announce the new release vor python-ghostscript: python-ghostscript 0.6 A Python-Interface to the Ghostscript C-API using ctypes :License: GNU Public License v3 (GPLv3) :Author:  Hartmut Goebel :Homepage: https://gitlab.com/pdftools/python-ghostscript :Download:

Re: Right way to io.open(...) an existing file object in Python 2.7?

2018-01-16 Thread Skip Montanaro
io.open can open a file descriptor. Ah, thanks. I'd missed that in my initial reading of the io.open documentation. Skip -- https://mail.python.org/mailman/listinfo/python-list