Re: cannot open file with non-ASCII filename

2015-12-15 Thread Ulli Horlacher
Laura Creighton wrote: > PyPy wrote its own pyreadline. > You can get it here. https://bitbucket.org/pypy/pyrepl As far as I can see, it has no getkey function. My users do not hit ENTER after drag&drop or copy&paste files. I need an input function with a timeout. -- Ullrich Horlacher

[no subject]

2015-12-15 Thread Malik Brahimi
Basically, I'm trying to make an event based system with pywin32 that handles spooled files that are to be printed. Users often print under the impression that their document has yet to emerge from the printer when it is in fact in queue. I'm creating a script that polls print jobs, saves them in

Need help - How to identify the cell display format?

2015-12-15 Thread Ezhilarasan Chandrasekar
Hi folks, I just want to find the cell display format in Excel. I have a Expected excel file and Actual Excel file. I have some knowledge about, how to check the cell value, cell font, alignment. But I also want to know about what type of cell format is being used. For example: If the cell value

Re: Need help - How to identify the cell display format?

2015-12-15 Thread Gonzalo V
Are you working with time series? saludos, desde un móvil. El dic 15, 2015 9:41 a.m., "Ezhilarasan Chandrasekar" escribió: > Hi folks, > > I just want to find the cell display format in Excel. I have a Expected > excel file and Actual Excel file. > > I have some knowledge about, how to check the

Re: Try: rather than if :

2015-12-15 Thread jmp
On 12/14/2015 11:38 PM, Vincent Davis wrote: In the code below try is used to check if handle has the attribute name. It seems an if statement could be used. Is there reason one way would be better than another? def write_header(self): handle = self.handle try: handle.write("#

wrapper api / proxying third party exception?

2015-12-15 Thread Benjamin Risher
Ok, here's my issue. I have a plugin framework I wrote that relies on a third party library that I can't change. As a part of that framework, I wrote a small stub library to proxy calls to the third party library, so that if their api ever changes, plugins written against the stub won't have t

subprocess.call with non-ASCII arguments?

2015-12-15 Thread Ulli Horlacher
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) leads to: File "fexit.py", line 971, in sendfile_retry status = subprocess.call(cmd) File "C:\Python27\lib\subprocess.py", line 52

Urgent: Last call for the CfP of PythonFOSDEM 2016

2015-12-15 Thread Stephane Wirtel
Hi all Because the deadline is imminent and because we have only received some proposals, we have extended the current deadline. The new submission deadline is 2015-12-20. Call For Proposals == This is the official call for sessions for the Python devroom at FOSDEM 2016. FOSDEM

Re: Need help - How to identify the cell display format?

2015-12-15 Thread Larry Martell
On Tue, Dec 15, 2015 at 2:29 AM, Ezhilarasan Chandrasekar wrote: > Hi folks, > > I just want to find the cell display format in Excel. I have a Expected > excel file and Actual Excel file. > > I have some knowledge about, how to check the cell value, cell font, > alignment. But I also want to know

Urgent: Last call for the CfP of PythonFOSDEM 2016

2015-12-15 Thread Stephane Wirtel
Hi all Because the deadline is imminent and because we have only received some proposals, we have extended the current deadline. The new submission deadline is 2015-12-20. Call For Proposals == This is the official call for sessions for the Python devroom at FOSDEM 2016. FOSDEM

Re: cannot open file with non-ASCII filename

2015-12-15 Thread Laura Creighton
In a message of Tue, 15 Dec 2015 08:26:37 +, Ulli Horlacher writes: >Laura Creighton wrote: > >> PyPy wrote its own pyreadline. >> You can get it here. https://bitbucket.org/pypy/pyrepl > >As far as I can see, it has no getkey function. >My users do not hit ENTER after drag&drop or copy&paste

subprocess.call with non-ASCII arguments?

2015-12-15 Thread Ulli Horlacher
(My first posting seems to got lost) 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) leads to: File "fexit.py", line 971, in sendfile_retry status = subprocess.call(cmd) File "C

Re: subprocess.call with non-ASCII arguments?

2015-12-15 Thread Ulli Horlacher
Ulli Horlacher wrote: > Instead of calling a 7z subprocess with non-ASCII arguments I tried to > call it with a listfile: it starts with a "@" and contains the names of > the files to be packed into the arcive. It is a special 7z feature. > > New code: > > fileslist = archive + '.list' > fl

Re: subprocess.call with non-ASCII arguments?

2015-12-15 Thread Laura Creighton
In a message of Tue, 15 Dec 2015 14:25:50 +, Ulli Horlacher writes: >(My first posting seems to got lost) > >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) > >leads to: > > File

Re: Question about figure plot

2015-12-15 Thread Robert Kern
On 2015-12-15 02:43, Robert wrote: Hi, When I run the following code, there is no figure shown in the end. // import pymc import numpy as np n = 5*np.ones(4,dtype=int) x = np.array([-.86,-.3,-.05,.73]) alpha = pymc.Normal('alpha',mu=0,tau=.01) beta = pymc.Normal('beta',mu=0,tau=.01)

Re: cannot open file with non-ASCII filename

2015-12-15 Thread eryk sun
On Tue, Dec 15, 2015 at 2:26 AM, Ulli Horlacher wrote: > Laura Creighton wrote: > >> PyPy wrote its own pyreadline. >> You can get it here. https://bitbucket.org/pypy/pyrepl > > As far as I can see, it has no getkey function. > My users do not hit ENTER after drag&drop or copy&paste files. > I ne

RE: Windows 10 and PYODBC

2015-12-15 Thread paul.hermeneutic
On Dec 13, 2015 7:20 AM, "William Abdo" wrote: > > Problem Resolved. > I have fixed the Oracle connection issue under Windows 10 with cx_Oracle . > PYODBC was only failing on the Oracle connection and worked fine on MS SQL under Windows 10. Please tell us what the fix is. Thanks. -- https://mail

subclassing collections.Counter

2015-12-15 Thread Pavlos Parissis
Hi, I need to store values for metrics and return the average for some and the sum for the rest. Thus, I thought I could extend collections.Counter class by returning averages for some keys. My class modifies the update() to increment a counter and the __getitem__ to perform the calculation. But,

Re: subclassing collections.Counter

2015-12-15 Thread Peter Otten
Pavlos Parissis wrote: > I need to store values for metrics and return the average for some > and the sum for the rest. Thus, I thought I could extend > collections.Counter class by returning averages for some keys. > > My class modifies the update() to increment a counter and the > __getitem__ t

Re: subclassing collections.Counter

2015-12-15 Thread Pavlos Parissis
On 15/12/2015 05:08 μμ, Peter Otten wrote: > Pavlos Parissis wrote: > >> I need to store values for metrics and return the average for some >> and the sum for the rest. Thus, I thought I could extend >> collections.Counter class by returning averages for some keys. >> >> My class modifies the upda

Re: subclassing collections.Counter

2015-12-15 Thread Ian Kelly
On Tue, Dec 15, 2015 at 8:49 AM, Pavlos Parissis wrote: > Hi, > > I need to store values for metrics and return the average for some > and the sum for the rest. Thus, I thought I could extend > collections.Counter class by returning averages for some keys. Leave Counter out of it, as this is not

Help on code comprehension from an example project of pymc

2015-12-15 Thread Robert
Hi, I find the useful small code project for me: #https://users.obs.carnegiescience.edu/cburns/ipynbs/PyMC.html It runs as expected. When I review the code, I find 'data' in the original line: data = pymc.Normal('data', mu=model, tau=tau, value=z_obs, observed=True) has not been referenced the

RE: Windows 10 and PYODBC

2015-12-15 Thread paul.hermeneutic
On Dec 15, 2015 9:22 AM, "William Abdo" wrote: > > So I started a search for an Oracle based ODBC client since PYODBC is still working with the Microsoft DB’s, I tried cx_Oracle and it worked perfectly after I managed to get the parameters correct on the call, It sounds like PYODBC cannot connect

RE: Windows 10 and PYODBC

2015-12-15 Thread William Abdo
Hi Paul Hermeneutic, The issue was it could not establish a connection , it threw an error ORA-01019 (1019) . So after some research it began to look like it was unable to connect via the TNS Names. I was unable to verify this since it was just dying and not logging the issue. So I started a se

Re: subclassing collections.Counter

2015-12-15 Thread Pavlos Parissis
On 15/12/2015 05:11 μμ, Ian Kelly wrote: > On Tue, Dec 15, 2015 at 8:49 AM, Pavlos Parissis > wrote: >> Hi, >> >> I need to store values for metrics and return the average for some >> and the sum for the rest. Thus, I thought I could extend >> collections.Counter class by returning averages for so

Re: subclassing collections.Counter

2015-12-15 Thread Pavlos Parissis
On 15/12/2015 05:18 μμ, Pavlos Parissis wrote: > On 15/12/2015 05:08 μμ, Peter Otten wrote: >> Pavlos Parissis wrote: >> >>> I need to store values for metrics and return the average for some >>> and the sum for the rest. Thus, I thought I could extend >>> collections.Counter class by returning ave

Re: cannot open file with non-ASCII filename

2015-12-15 Thread Ulli Horlacher
eryk sun wrote: > pyreadline looked promising for its extensive ctypes implementation of > the Windows console API [1], wrapped by high-level methods such as > peek, getchar, and getkeypress. It turns out it ignores the event > sequences you need for alt+numpad input (used when a file is dragged

Re: subclassing collections.Counter

2015-12-15 Thread Ian Kelly
On Tue, Dec 15, 2015 at 9:20 AM, Pavlos Parissis wrote: > On 15/12/2015 05:11 μμ, Ian Kelly wrote: >> On Tue, Dec 15, 2015 at 8:49 AM, Pavlos Parissis >> wrote: >>> Hi, >>> >>> I need to store values for metrics and return the average for some >>> and the sum for the rest. Thus, I thought I could

Re: subclassing collections.Counter

2015-12-15 Thread Pavlos Parissis
On 15/12/2015 06:22 μμ, Ian Kelly wrote: > On Tue, Dec 15, 2015 at 9:20 AM, Pavlos Parissis > wrote: >> On 15/12/2015 05:11 μμ, Ian Kelly wrote: >>> On Tue, Dec 15, 2015 at 8:49 AM, Pavlos Parissis >>> wrote: Hi, I need to store values for metrics and return the average for some >>

netcdf 4 time

2015-12-15 Thread jorge . conrado
Hi, I'm reading ndetcdf 4 data from NCEP Reanalyisis project. I use to read the data: air_2010_2014_850hPa_d.nc is four year daily data. mport matplotlib.pylab as plt from netCDF4 import Dataset, num2date, date2index, date2num import pandas as pd from mpl_toolkits.basemap import Basemap im

Re: subprocess.call with non-ASCII arguments?

2015-12-15 Thread Ulli Horlacher
Dennis Lee Bieber wrote: > Python has a zipfile library that is portable between OS. Along with > libraries for gzip, bzip2, and tarfiles... Ohh.. this is new to me! https://docs.python.org/2/library/tarfile.html https://docs.python.org/2/library/zipfile.html What is missing in the doc

Re: subclassing collections.Counter

2015-12-15 Thread Ian Kelly
On Tue, Dec 15, 2015 at 10:43 AM, Pavlos Parissis wrote: >> If you want your metrics container to act like a dict, then my >> suggestion would be to just use a dict, with pseudo-collections for >> the values as above. >> > > If I understood you correctly, you are saying store all metrics in a > di

RE: Windows 10 and PYODBC

2015-12-15 Thread paul.hermeneutic
On Dec 15, 2015 10:34 AM, "William Abdo" wrote: > > Yes Paul Hermeneutic , that is correct. > > I tried everything I could however, I was unable to make PYODBC talk to Oracle under Windows 10. It would be of help to everyone if you would file a bug report on the issue tracker. http://bugs.pyth

RE: Windows 10 and PYODBC

2015-12-15 Thread paul.hermeneutic
On Dec 15, 2015 12:00 PM, "William Abdo" wrote: > > As you wish, > > [issue577] PYODBC will not talk to Oracle under Windows 10. Where is this issue filed? I do not see it on http://bugs.python.org/ -- https://mail.python.org/mailman/listinfo/python-list

RE: Screenshots in Sphinx docs

2015-12-15 Thread Albert-Jan Roskam
> To: python-list@python.org > From: tjre...@udel.edu > Subject: Re: Screenshots in Sphinx docs > Date: Mon, 14 Dec 2015 14:01:03 -0500 > > On 12/14/2015 11:31 AM, Albert-Jan Roskam wrote: > > > I'd like to include up-to-date screenshots (of a tkinter app) > > into my Sphinx documentation. > >

Re: subclassing collections.Counter

2015-12-15 Thread Pavlos Parissis
On 15/12/2015 06:55 μμ, Ian Kelly wrote: > On Tue, Dec 15, 2015 at 10:43 AM, Pavlos Parissis > wrote: >>> If you want your metrics container to act like a dict, then my >>> suggestion would be to just use a dict, with pseudo-collections for >>> the values as above. >>> >> >> If I understood you co

Re: Help on code comprehension from an example project of pymc

2015-12-15 Thread Chris Angelico
On Wed, Dec 16, 2015 at 3:15 AM, Robert wrote: > When I review the code, I find 'data' in the original line: > > data = pymc.Normal('data', mu=model, tau=tau, value=z_obs, observed=True) > > has not been referenced thereafter. > If I comment out the line as: > > #data = pymc.Normal('data', mu=mode

Re: Help on code comprehension from an example project of pymc

2015-12-15 Thread Terry Reedy
On 12/15/2015 11:15 AM, Robert wrote: Hi, I find the useful small code project for me: #https://users.obs.carnegiescience.edu/cburns/ipynbs/PyMC.html It runs as expected. When I review the code, I find 'data' in the original line: data = pymc.Normal('data', mu=model, tau=tau, value=z_obs, obs

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

2015-12-15 Thread sgardne
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 multi-line string and I need to remove the very first line from >

error reading api with urllib

2015-12-15 Thread simian336
Hi, I am pretty new to python. I have a project reading an api with urllib. The problem is I have to sections of code almost exactly the same. The first url works great. They second one fails. If I manually copy and paste the url in the browser ti works great. The error I get back is... Bad Re

Re: error reading api with urllib

2015-12-15 Thread Simian
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 with a browser works fine. Simi -- https://mail.python.org/mailm

Re: TypeError: 'float' object is not iterable

2015-12-15 Thread scarrera53
Someone stealing my points, I don't know how someone do it, but they had stolen some of my points. -- https://mail.python.org/mailman/listinfo/python-list

Re: TypeError: 'float' object is not iterable

2015-12-15 Thread Chris Angelico
On Wed, Dec 16, 2015 at 4:40 PM, wrote: > Someone stealing my points, I don't know how someone do it, but they had > stolen some of my points. They were floating. You should fix them down. Also, you're replying to a years-old thread with no context. ChrisA -- https://mail.python.org/mailman/

Re: wrapper api / proxying third party exception?

2015-12-15 Thread dieter
Benjamin Risher writes: > Ok, here's my issue. I have a plugin framework I wrote that relies on a > third party library that I can't change. As a part of that framework, I > wrote a small stub library to proxy calls to the third party library, so that > if their api ever changes, plugins writ