Re: How can I get/save Pandas DataFrame help content?

2015-12-16 Thread Steven D'Aprano
On Thursday 17 December 2015 13:48, Robert wrote: > Hi, > > When I use Enthought/Canopy, help(DataFrame) has so much content that it > exceeds the display buffer, i.e. its head is cut off as I go up to see it. Step 1: report this as a bug to Enthought and/or the Python bug tracker. help(DataFr

Re: cannot open file with non-ASCII filename

2015-12-16 Thread eryk sun
On Tue, Dec 15, 2015 at 11:04 AM, Ulli Horlacher wrote: > > Ehhh... I started Python programming some weeks ago and I know nearly > nothing about Windows. I am a UNIX and VMS guy :-) You should feel right at home, then. The Windows NT kernel was designed and implemented by a team of former DEC en

Re: How can I get/save Pandas DataFrame help content?

2015-12-16 Thread Chris Angelico
On Thu, Dec 17, 2015 at 2:20 PM, Robert wrote: > On Wednesday, December 16, 2015 at 9:56:23 PM UTC-5, Chris Angelico wrote: >> On Thu, Dec 17, 2015 at 1:48 PM, Robert wrote: >> > Hi, >> > >> > When I use Enthought/Canopy, help(DataFrame) has so much content that it >> > exceeds the display buffer

Re: How can I get/save Pandas DataFrame help content?

2015-12-16 Thread Robert
On Wednesday, December 16, 2015 at 9:56:23 PM UTC-5, Chris Angelico wrote: > On Thu, Dec 17, 2015 at 1:48 PM, Robert wrote: > > Hi, > > > > When I use Enthought/Canopy, help(DataFrame) has so much content that it > > exceeds the display buffer, i.e. its head is cut off as I go up to see it. > > I

Re: How can I get/save Pandas DataFrame help content?

2015-12-16 Thread Chris Angelico
On Thu, Dec 17, 2015 at 1:48 PM, Robert wrote: > Hi, > > When I use Enthought/Canopy, help(DataFrame) has so much content that it > exceeds the display buffer, i.e. its head is cut off as I go up to see it. > I would like to know whether there is a way similar to Linux redirection to > save the he

How can I get/save Pandas DataFrame help content?

2015-12-16 Thread Robert
Hi, When I use Enthought/Canopy, help(DataFrame) has so much content that it exceeds the display buffer, i.e. its head is cut off as I go up to see it. I would like to know whether there is a way similar to Linux redirection to save the help DataFrame content to a file? I have search on-line Pan

Re: Help on error " ValueError: For numerical factors, num_columns must be an int "

2015-12-16 Thread Robert
On Wednesday, December 16, 2015 at 8:57:30 PM UTC-5, Josef Pktd wrote: > On Wednesday, December 16, 2015 at 9:50:35 AM UTC-5, Robert wrote: > > On Wednesday, December 16, 2015 at 6:34:21 AM UTC-5, Mark Lawrence wrote: > > > On 16/12/2015 10:44, Robert wrote: > > > > Hi, > > > > > > > > When I run t

Re: Help on error " ValueError: For numerical factors, num_columns must be an int "

2015-12-16 Thread Josef Pktd
On Wednesday, December 16, 2015 at 9:50:35 AM UTC-5, Robert wrote: > On Wednesday, December 16, 2015 at 6:34:21 AM UTC-5, Mark Lawrence wrote: > > On 16/12/2015 10:44, Robert wrote: > > > Hi, > > > > > > When I run the following code, there is an error: > > > > > > ValueError: For numerical factors

Re: Why my image is in bad quality ?

2015-12-16 Thread Nobody
On Wed, 16 Dec 2015 06:04:37 -0800, fsn761304 wrote: > pixbufObj = Gdk.pixbuf_get_from_window(window, x, y, width, height) ... > image = Image.frombuffer("RGB", (width, height), > pixbufObj.get_pixels(), 'raw', 'RGB', 0, 1) The second-to-last argument should proba

Re: How does one distribute Tkinter or Qt GUI apps Developed in Python

2015-12-16 Thread Denis Akhiyarov
On Wednesday, December 16, 2015 at 6:45:50 PM UTC-6, Rick Johnson wrote: > On Wednesday, December 16, 2015 at 6:03:55 PM UTC-6, Bruce Whealton wrote: > > > Surely, one is going to want to create GUI apps for users > > that are not Python Developers. I would not think to ask > > someone to install

Re: How does one distribute Tkinter or Qt GUI apps Developed in Python

2015-12-16 Thread Ben Finney
Bruce Whealton writes: > What seems to be blatantly missing is how this would be distributed. Distributing programs so that recipients can run them is an ongoing problem. Operating systems arenecessarily involved, and since not every recipient uses the exact same configuration of the exact same

asyncio for UNIX socket

2015-12-16 Thread Pavlos Parissis
Hi, I am trying to write UNIX socket client which sends 1 cmd and saves the received data to a file. Based on what I found on documentation I came up with:: import asyncio class UnixProtocol(asyncio.Protocol): def __init__(self, loop): self.cmd = 'show stat\n' self.loop = loop

Re: How does one distribute Tkinter or Qt GUI apps Developed in Python

2015-12-16 Thread Rick Johnson
On Wednesday, December 16, 2015 at 6:03:55 PM UTC-6, Bruce Whealton wrote: > Surely, one is going to want to create GUI apps for users > that are not Python Developers. I would not think to ask > someone to install Python on their system and make sure it > is added to the path. Maybe it is not so

Re: Tk alternative to askopenfilename and askdirectory?

2015-12-16 Thread Rick Johnson
On Wednesday, December 16, 2015 at 7:19:25 AM UTC-6, Ulli Horlacher wrote: > Is there an alternative to Tk's askopenfilename() and askdirectory()? > > I want to select a files and directories within one widget, but > askopenfilename() let me only select files and askdirectory() let me only > selec

Re: How does one distribute Tkinter or Qt GUI apps Developed in Python

2015-12-16 Thread Christian Gollwitzer
Am 17.12.15 um 01:03 schrieb Bruce Whealton: I watched one training video that discussed Python and Tkinter. Like many similar tutorials from online training sites, I was left scratching my head. What seems to be blatantly missing is how this would be distributed. In the first mentioned tutori

How does one distribute Tkinter or Qt GUI apps Developed in Python

2015-12-16 Thread Bruce Whealton
I watched one training video that discussed Python and Tkinter. Like many similar tutorials from online training sites, I was left scratching my head. What seems to be blatantly missing is how this would be distributed. In the first mentioned tutorial from Lynda.com the Tkinter app was related

Re: error reading api with urllib

2015-12-16 Thread Ian Kelly
On Wed, Dec 16, 2015 at 3:12 PM, John Gordon wrote: > In <9aa21642-765b-4666-8c66-a6dab9928...@googlegroups.com> > simian...@gmail.com writes: > >> Bad Request >> b'' > > > That probably means you aren't using one of the recognized methods > (i.e. GET, POST, etc.) > > It doesn't look like you are

Re: Why my image is in bad quality ?

2015-12-16 Thread BartC
On 16/12/2015 21:53, fsn761...@gmail.com wrote: On Thursday, December 17, 2015 at 1:36:55 AM UTC+4, BartC wrote: You need to test step by step to see at what point it goes wrong. You're scaling by 20 (which is a massive amount); what happens when scaling by 1? And anti-alias is turned off? (Wh

Re: error reading api with urllib

2015-12-16 Thread Ian Kelly
On Tue, Dec 15, 2015 at 7:46 PM, Simian wrote: > I added > > except urllib.error.HTTPError as e: > print('HTTP Errpr') > print('Error code: ', e.code) > > to my try and I recieve... > > 400: ('Bad Request', > 'Bad request syntax or unsupported method'), > > but processing the string

Re: error reading api with urllib

2015-12-16 Thread John Gordon
In <9aa21642-765b-4666-8c66-a6dab9928...@googlegroups.com> simian...@gmail.com writes: > Bad Request > b'' That probably means you aren't using one of the recognized methods (i.e. GET, POST, etc.) It doesn't look like you are specifying one of these methods on your Request object. Try doing t

Re: Why my image is in bad quality ?

2015-12-16 Thread fsn761304
On Thursday, December 17, 2015 at 1:36:55 AM UTC+4, BartC wrote: > On 16/12/2015 17:17, fsn761...@gmail.com wrote: > > ...here is the bad image: http://wikisend.com/download/748118/saved.png > > > > This is 3000x600 pixels; what was the original size? (150x30?) > > What does the original look lik

Re: Why my image is in bad quality ?

2015-12-16 Thread BartC
On 16/12/2015 17:17, fsn761...@gmail.com wrote: ...here is the bad image: http://wikisend.com/download/748118/saved.png This is 3000x600 pixels; what was the original size? (150x30?) What does the original look like? You need to test step by step to see at what point it goes wrong. You're s

Re: Python 3.1 test issue

2015-12-16 Thread Terry Reedy
On 12/16/2015 1:22 PM, George Trojan wrote: I installed Python 3.1 on RHEL 7.2. According to the output below, you installed 3.5.1. Much better than the years old 3.1. The command make test hangs (or takes a lot of time on test_subprocess [396/397] test_subprocess This indicates that eve

Re: geostationary satellite data

2015-12-16 Thread Robin Koch
Am 16.12.2015 um 18:30 schrieb Peter Pearson: On Thu, 17 Dec 2015 04:08:02 +1100, Chris Angelico wrote: >> It could be 16 bits per pixel. Without knowing a lot more about the source of the image and its format, it's hard to say with any certainty. Agreed. It's annoying when an agency goes t

Python 3.1 test issue

2015-12-16 Thread George Trojan
I installed Python 3.1 on RHEL 7.2. The command make test hangs (or takes a lot of time) on test_subprocess. [396/397] test_subprocess ^C Test suite interrupted by signal SIGINT. 5 tests omitted: test___all__ test_distutils test_site test_socket test_warnings 381 tests OK. 4 tests altered t

Re: geostationary satellite data

2015-12-16 Thread Peter Pearson
On Thu, 17 Dec 2015 04:37:26 +1100, Chris Angelico wrote: > On Thu, Dec 17, 2015 at 4:30 AM, Peter Pearson > wrote: >> Agreed. It's annoying when an agency goes to the trouble of making >> huge datasets available online, but fails to identify the format. >> >> But the 16-bits-per-pixel hypothesis

Re: geostationary satellite data

2015-12-16 Thread Chris Angelico
On Thu, Dec 17, 2015 at 4:30 AM, Peter Pearson wrote: > Agreed. It's annoying when an agency goes to the trouble of making > huge datasets available online, but fails to identify the format. > > But the 16-bits-per-pixel hypothesis is unlikely, given that each > byte tends to echo its predecessor

Re: geostationary satellite data

2015-12-16 Thread Peter Pearson
On Thu, 17 Dec 2015 04:08:02 +1100, Chris Angelico wrote: > On Thu, Dec 17, 2015 at 4:04 AM, Peter Pearson > wrote: >> The file is 65274016 bytes long. You claim the dimensions are >> 9896 x 3298, but that comes out to half that number (32637008), so I'll >> bet the real dimensions are 9896 x 659

Re: Why my image is in bad quality ?

2015-12-16 Thread fsn761304
...here is the bad image: http://wikisend.com/download/748118/saved.png -- https://mail.python.org/mailman/listinfo/python-list

Re: Tk alternative to askopenfilename and askdirectory?

2015-12-16 Thread Ulli Horlacher
Lorenzo Sutton wrote: > On 16/12/2015 14:18, Ulli Horlacher wrote: > > Is there an alternative to Tk's askopenfilename() and askdirectory()? > > > > I want to select a files and directories within one widget, but > > askopenfilename() let me only select files and askdirectory() let me only > > se

Re: geostationary satellite data

2015-12-16 Thread Chris Angelico
On Thu, Dec 17, 2015 at 4:04 AM, Peter Pearson wrote: > The file is 65274016 bytes long. You claim the dimensions are > 9896 x 3298, but that comes out to half that number (32637008), so I'll > bet the real dimensions are 9896 x 6596, with one byte per pixel. > I think this image format is called

Re: Why my image is in bad quality ?

2015-12-16 Thread fsn761304
On Wednesday, December 16, 2015 at 8:41:23 PM UTC+4, Chris Angelico wrote: > On Thu, Dec 17, 2015 at 3:33 AM, wrote: > > On Wednesday, December 16, 2015 at 6:33:56 PM UTC+4, Chris Angelico wrote: > >> On Thu, Dec 17, 2015 at 1:21 AM, wrote: > >> > I tried also another code (see below) and witho

Re: geostationary satellite data

2015-12-16 Thread Peter Pearson
On Wed, 16 Dec 2015 13:19:26 -0200, jorge.conr...@cptec.inpe.br wrote: > > I dowmloaded some data from the Mirador NASA site: > > http://mirador.gsfc.nasa.gov/cgi-bin/mirador/presentNavigation.pl?tree=project&dataset=Global-merged%20IR%20Brightness%20Temperature%20Data&project=TRMM&dataGroup=Ancill

RE: Windows 10 and PYODBC

2015-12-16 Thread paul.hermeneutic
On Dec 15, 2015 1:32 PM, "William Abdo" wrote: > > issue 25875 created > I put it in the wrong area the first time. > First time bug tracker user errors. My apologies, William. I thought bugs.python.org would be the right place to put it. I was wrong. -- https://mail.python.org/mailman/listinfo/

Re: does the order in which the modules are placed in a file matters ?

2015-12-16 Thread Carl Meyer
Hi Ganesh, On 12/16/2015 09:09 AM, Ganesh Pal wrote: > Iam on python 2.7 and linux .I need to know if we need to place the > modules in a particular or it doesn't matter at all > > order while writing the program As you've probably already noticed, it usually doesn't matter to Python (though it

Re: does the order in which the modules are placed in a file matters ?

2015-12-16 Thread Chris Angelico
On Thu, Dec 17, 2015 at 3:42 AM, Dan Strohl wrote: > For the general modules it doesn't matter, however using if you are using any > non-standard packages, and If there are duplicate names in any of the modules > and if you import them with a "*" (as some packages suggest), it can cause > you t

RE: does the order in which the modules are placed in a file matters ?

2015-12-16 Thread Dan Strohl
For the general modules it doesn't matter, however using if you are using any non-standard packages, and If there are duplicate names in any of the modules and if you import them with a "*" (as some packages suggest), it can cause you to end up referring to an object you were not intending to.

Re: Why my image is in bad quality ?

2015-12-16 Thread Chris Angelico
On Thu, Dec 17, 2015 at 3:33 AM, wrote: > On Wednesday, December 16, 2015 at 6:33:56 PM UTC+4, Chris Angelico wrote: >> On Thu, Dec 17, 2015 at 1:21 AM, wrote: >> > I tried also another code (see below) and without scaling by 20 quality of >> > recognition was very bad. >> > >> > from pytesser

Re: Why my image is in bad quality ?

2015-12-16 Thread fsn761304
On Wednesday, December 16, 2015 at 8:34:15 PM UTC+4, fsn7...@gmail.com wrote: > On Wednesday, December 16, 2015 at 6:33:56 PM UTC+4, Chris Angelico wrote: > > On Thu, Dec 17, 2015 at 1:21 AM, wrote: > > > I tried also another code (see below) and without scaling by 20 quality > > > of recognitio

Re: Why my image is in bad quality ?

2015-12-16 Thread fsn761304
On Wednesday, December 16, 2015 at 6:33:56 PM UTC+4, Chris Angelico wrote: > On Thu, Dec 17, 2015 at 1:21 AM, wrote: > > I tried also another code (see below) and without scaling by 20 quality of > > recognition was very bad. > > > > from pytesseract import image_to_string > > from PIL import Im

Re: Tk alternative to askopenfilename and askdirectory?

2015-12-16 Thread Lorenzo Sutton
On 16/12/2015 14:18, Ulli Horlacher wrote: Is there an alternative to Tk's askopenfilename() and askdirectory()? I want to select a files and directories within one widget, but askopenfilename() let me only select files and askdirectory() let me only select directories. I guess it would he

Re: geostationary satellite data

2015-12-16 Thread Mark Lawrence
On 16/12/2015 15:19, jorge.conr...@cptec.inpe.br wrote: Hi, I dowmloaded some data from the Mirador NASA site: http://mirador.gsfc.nasa.gov/cgi-bin/mirador/presentNavigation.pl?tree=project&dataset=Global-merged%20IR%20Brightness%20Temperature%20Data&project=TRMM&dataGroup=Ancillary&version

Re: does the order in which the modules are placed in a file matters ?

2015-12-16 Thread Chris Angelico
On Thu, Dec 17, 2015 at 3:09 AM, Ganesh Pal wrote: > Iam on python 2.7 and linux .I need to know if we need to place the > modules in a particular or it doesn't matter at all > > order while writing the program > > For Example > > import os > import shlex > import subprocess > import time > impor

does the order in which the modules are placed in a file matters ?

2015-12-16 Thread Ganesh Pal
Iam on python 2.7 and linux .I need to know if we need to place the modules in a particular or it doesn't matter at all order while writing the program For Example import os import shlex import subprocess import time import sys import logging import plaftform.cluster from util import run def

geostationary satellite data

2015-12-16 Thread jorge . conrado
Hi, I dowmloaded some data from the Mirador NASA site: http://mirador.gsfc.nasa.gov/cgi-bin/mirador/presentNavigation.pl?tree=project&dataset=Global-merged%20IR%20Brightness%20Temperature%20Data&project=TRMM&dataGroup=Ancillary&version=001&CGISESSID=97f4b9244878c87819b2a1144d31e270 Each da

Re: Help on error " ValueError: For numerical factors, num_columns must be an int "

2015-12-16 Thread Robert
On Wednesday, December 16, 2015 at 6:34:21 AM UTC-5, Mark Lawrence wrote: > On 16/12/2015 10:44, Robert wrote: > > Hi, > > > > When I run the following code, there is an error: > > > > ValueError: For numerical factors, num_columns must be an int > > > > > > > > import numpy as np

Re: Why my image is in bad quality ?

2015-12-16 Thread Chris Angelico
On Thu, Dec 17, 2015 at 1:21 AM, wrote: > I tried also another code (see below) and without scaling by 20 quality of > recognition was very bad. > > from pytesseract import image_to_string > from PIL import Image > > im = Image.open("screen.png") > print(im) > im = im.resize((214*20,26*20), Imag

Re: Why my image is in bad quality ?

2015-12-16 Thread fsn761304
On Wednesday, December 16, 2015 at 6:18:00 PM UTC+4, Denis McMahon wrote: > On Wed, 16 Dec 2015 06:04:37 -0800, fsn761304 wrote: > > > I'm trying to make OCR-recognition on a screenshot, after screenshot > > taken it goes to pibxbuffer, which content goes to pytesseract. > > But after using pixbuf

Re: Why my image is in bad quality ?

2015-12-16 Thread Denis McMahon
On Wed, 16 Dec 2015 06:04:37 -0800, fsn761304 wrote: > I'm trying to make OCR-recognition on a screenshot, after screenshot > taken it goes to pibxbuffer, which content goes to pytesseract. > But after using pixbuffer image quality is bad > image = image.resize((width*20,height*20), Image

Why my image is in bad quality ?

2015-12-16 Thread fsn761304
I'm trying to make OCR-recognition on a screenshot, after screenshot taken it goes to pibxbuffer, which content goes to pytesseract. But after using pixbuffer image quality is bad (I tried to save it in a directory, instead of pixbuffer, and looked at it). Below is the problematic snippets of cod

Tk alternative to askopenfilename and askdirectory?

2015-12-16 Thread Ulli Horlacher
Is there an alternative to Tk's askopenfilename() and askdirectory()? I want to select a files and directories within one widget, but askopenfilename() let me only select files and askdirectory() let me only select directories. -- Ullrich Horlacher Server und Virtualisierung Rechen

Re: subprocess.call with non-ASCII arguments?

2015-12-16 Thread Ulli Horlacher
Dennis Lee Bieber wrote: > >I want to create a zip file within a Python 2.7 program on windows. > > > >My code: > > > > cmd = ['7za.exe','a','-tzip',archive] + files > > status = subprocess.call(cmd) > > > My first thought would be... > > WHY spawn an OS dependent subprocess...

Re: Help on error " ValueError: For numerical factors, num_columns must be an int "

2015-12-16 Thread Mark Lawrence
On 16/12/2015 10:44, Robert wrote: Hi, When I run the following code, there is an error: ValueError: For numerical factors, num_columns must be an int import numpy as np import pandas as pd from patsy import dmatrices from sklearn.linear_model import LogisticRegression X = [

Re: Help on error " ValueError: For numerical factors, num_columns must be an int "

2015-12-16 Thread Robert
On Wednesday, December 16, 2015 at 5:57:04 AM UTC-5, Robert wrote: > On Wednesday, December 16, 2015 at 5:44:21 AM UTC-5, Robert wrote: > > Hi, > > > > When I run the following code, there is an error: > > > > ValueError: For numerical factors, num_columns must be an int > > > > > > ==

Re: Help on error " ValueError: For numerical factors, num_columns must be an int "

2015-12-16 Thread Robert
On Wednesday, December 16, 2015 at 5:44:21 AM UTC-5, Robert wrote: > Hi, > > When I run the following code, there is an error: > > ValueError: For numerical factors, num_columns must be an int > > > > import numpy as np > import pandas as pd > from patsy import dmatrices > fro

Help on error " ValueError: For numerical factors, num_columns must be an int "

2015-12-16 Thread Robert
Hi, When I run the following code, there is an error: ValueError: For numerical factors, num_columns must be an int import numpy as np import pandas as pd from patsy import dmatrices from sklearn.linear_model import LogisticRegression X = [0.5,0.75,1.0,1.25,1.5,1.75,1.75,2.0,

Re: How can I remove the first line of a multi-line string?

2015-12-16 Thread Steven D'Aprano
On Wed, 16 Dec 2015 11:42 am, sgar...@gmail.com wrote: > On Monday, September 2, 2013 at 11:53:32 AM UTC-5, MRAB wrote: >> On 02/09/2013 17:12, Chris "Kwpolska" Warrick wrote: >> > On Mon, Sep 2, 2013 at 6:06 PM, Anthony Papillion > > gmail.com> wrote: >> >> Hello Everyone, >> >> >> >> I have a mu

RE: Windows 10 and PYODBC

2015-12-16 Thread William Abdo
issue 25875 created I put it in the wrong area the first time. First time bug tracker user errors. Respectfully, William Abdo Software App Engineer II NTT America, an NTT Communications Company Office: +1 561.912.2434 Email:w.a...@ntta.com [https://rvip.team-cente

sublime textx 3 and python 35

2015-12-16 Thread Yaocheng Frank Yang
Dear Python Team, I'm trying to install python35 and use sublime text 3 to write code on it. After I change the path name to the python app location. I still have some problem. I wrote a simple print function in sublime text(I already saved the file with .py extension) and the console show "fini

RE: Windows 10 and PYODBC

2015-12-16 Thread William Abdo
As you wish, [issue577] PYODBC will not talk to Oracle under Windows 10. Respectfully, William Abdo Software App Engineer II NTT America, an NTT Communications Company Office: +1 561.912.2434 Email:w.a...@ntta.com [https://rvip.team-center.net/externals/images/email/

RE: Windows 10 and PYODBC

2015-12-16 Thread William Abdo
Yes Paul Hermeneutic , that is correct. I tried everything I could however, I was unable to make PYODBC talk to Oracle under Windows 10. Maybe there are smarter than me that can make this work. For me it was easier to just use cx_Oracle for the Oracle connection. Respectfully, William Abdo

Re: TypeError: 'float' object is not iterable

2015-12-16 Thread Ben Finney
scarrer...@gmail.com writes: > Someone stealing my points, I don't know how someone do it, but they > had stolen some of my points. Make new points, summarise them succinctly in the Subject field, and be prepared to defend them. -- \ “Pinky, are you pondering what I'm pondering?” “I th