ANN: Python Meeting Düsseldorf - 12.06.2019

2019-06-11 Thread eGenix Team: M.-A. Lemburg
[This announcement is in German since it targets a local user group meeting in Düsseldorf, Germany] ANKÜNDIGUNG Python Meeting Düsseldorf http://pyddf.de/ Ein Tr

pysftp / paramiko problem

2019-06-11 Thread Robin Becker
I am trying to convert older code that uses ftplib as the endpoint has switched to sftp only. I am using the pysftp wrapper around paramiko. The following script fails def main(): import pysftp with pysftp.Connection('ftp.remote.com', username='me', password='xx') as sftp:

Why I am getting IndexError: tuple index out of range when converting a float value to a string?

2019-06-11 Thread madhavanbomidi
I wrote the following lines of code: xm = np.nanmean(x[indx],axis=None,dtype=float) xsd = np.nanstd(x[indx],axis=None,dtype=float) type(xm)# np.float64 type(xsd# np.float64 print(xm) # 0.5414720812182742 print(xsd) # 0.15748041033663002 print(str("{6.5f}".format(xm))) I

Re: Why I am getting IndexError: tuple index out of range when converting a float value to a string?

2019-06-11 Thread Rob Gaddi
On 6/11/19 9:52 AM, madhavanbom...@gmail.com wrote: I wrote the following lines of code: xm = np.nanmean(x[indx],axis=None,dtype=float) xsd = np.nanstd(x[indx],axis=None,dtype=float) type(xm)# np.float64 type(xsd# np.float64 print(xm) # 0.5414720812182742 print(xsd) # 0.157480

Re: Why I am getting IndexError: tuple index out of range when converting a float value to a string?

2019-06-11 Thread Terry Reedy
On 6/11/2019 1:04 PM, Rob Gaddi wrote: On 6/11/19 9:52 AM, madhavanbom...@gmail.com wrote: I wrote the following lines of code: xm = np.nanmean(x[indx],axis=None,dtype=float) xsd = np.nanstd(x[indx],axis=None,dtype=float) type(xm)    # np.float64 type(xsd    # np.float64 print(xm)  # 0.54

Re: FDs will be closed after exception automatically in python2.7?

2019-06-11 Thread Alan Bawden
D'Arcy Cain writes: > On 2019-06-10 15:46, Alan Bawden wrote: > > D'Arcy Cain writes: > >> with open("file","w+") as fd: > > > > That makes the window smaller, but it doesn't actually eliminate it. Look > > at the generated byte code. In both cases the call to open() is over and > > the open f

Re: pysftp / paramiko problem

2019-06-11 Thread dieter
Robin Becker writes: > I am trying to convert older code that uses ftplib as the endpoint has > switched to sftp only. > > I am using the pysftp wrapper around paramiko. > > The following script fails > > def main(): > import pysftp > with pysftp.Connection('ftp.remote.com', username='me'