RE: Python Import Impossibility

2018-04-16 Thread 森平 直樹
Steven, I would like to modify then following: (Error) ‘py -m install openpyxl’ (Correct) ‘py -m pip install openpyxl’ Sorry for my carelessness. Best Regards, - Naoki Morihira TEL: 01181-90-6460-6265 - 差出人: 森平 直樹 送信日時:

Can I execute a python code written in Python 2.7 (using numpy and tensor flow executed in linux) in Winpython 3.6 on Windows?

2018-04-16 Thread Rishika Sen
Here is the code that has been written in Python 2.7, numpy, tensorflow: https://drive.google.com/open?id=1JZe7wfRcdlEF6Z5C0ePBjtte_2L4Kk-7 Can you please let me know what changes I have to make to execute it on WinPython 3.6? Else, is there a version on Python 2.7 in Winpython? I have Winpython

Re: How to save xarray data to csv

2018-04-16 Thread shalu . ashu50
On Tuesday, 17 April 2018 01:56:25 UTC+8, Rhodri James wrote: > On 16/04/18 15:55, shalu.ash...@gmail.com wrote: > > Hello All, > > > > I have used xarray to merge several netcdf files into one file and then I > > subset the data of my point of interest using lat/long. Now I want to save > > t

Re: How to save xarray data to csv

2018-04-16 Thread shalu . ashu50
On Tuesday, 17 April 2018 02:01:19 UTC+8, Chris Angelico wrote: > On Tue, Apr 17, 2018 at 3:50 AM, Rhodri James wrote: > > You don't say, but I assume you're using Python 2.x > > > > [snip] > > > >> getting this error - TypeError: a bytes-like object is required, not 'str' > > Actually, based on

Re: Instance variables question

2018-04-16 Thread Steven D'Aprano
On Mon, 16 Apr 2018 09:03:47 -0700, Irv Kalb wrote: > I have been writing OOP code for many years in other languages and for > the past few years in Python. I am writing new curriculum for a course > on OOP in Python. If you're going to be teaching Python, please don't teach terminology which

Re: specifying the same argument multiple times with argparse

2018-04-16 Thread Larry Martell
On Mon, Apr 16, 2018 at 6:19 PM, Gary Herron wrote: > On 04/16/2018 02:31 PM, larry.mart...@gmail.com wrote: >> >> Is there a way using argparse to be able to specify the same argument >> multiple times and have them all go into the same list? >> >> For example, I'd like to do this: >> >> script.p

Re: specifying the same argument multiple times with argparse

2018-04-16 Thread Gary Herron
On 04/16/2018 02:31 PM, larry.mart...@gmail.com wrote: Is there a way using argparse to be able to specify the same argument multiple times and have them all go into the same list? For example, I'd like to do this: script.py -foo bar -foo baz -foo blah and have the dest for foo have ['bar', 'b

Re: specifying the same argument multiple times with argparse

2018-04-16 Thread Peter Otten
Larry Martell wrote: > Is there a way using argparse to be able to specify the same argument > multiple times and have them all go into the same list? action="append" > For example, I'd like to do this: > > script.py -foo bar -foo baz -foo blah > > and have the dest for foo have ['bar', 'baz

specifying the same argument multiple times with argparse

2018-04-16 Thread Larry Martell
Is there a way using argparse to be able to specify the same argument multiple times and have them all go into the same list? For example, I'd like to do this: script.py -foo bar -foo baz -foo blah and have the dest for foo have ['bar', 'baz', 'blah'] -- https://mail.python.org/mailman/listinfo

Re: how to set timeout for os.popen

2018-04-16 Thread eryk sun
On Mon, Apr 16, 2018 at 1:33 PM, Jugurtha Hadjar wrote: > On 04/15/2018 12:01 PM, Ho Yeung Lee wrote: >> >> while 1: >> runner = os.popen("tracert -d www.hello.com") >> o=runner.read() >> >> how to set timeout and know that this is timeout? > > @contextmanager > def timeout(duration, handler): >

Re: Slow tarfile extract on armv7l Linux machine

2018-04-16 Thread Dan Stromberg
I'm not super-familiar with tarfile, though I did use it in one project. First off, note that CPython is commonly 4x slower than C. In fact, it can be much worse at times. Also... Have you considered trying your code on Pypy3? On Mon, Apr 16, 2018 at 9:10 AM, Jim MacArthur wrote: > Hi, I'm se

ANN: distlib 0.2.7 released on PyPI

2018-04-16 Thread Vinay Sajip via Python-list
I've just released version 0.2.7 of distlib on PyPI [1]. For newcomers, distlib is a library of packaging functionality which is intended to be usable as the basis for third-party packaging tools. The main changes in this release are as follows: * Addressed #102: InstalledDistributions now have a

Re: Instance variables question

2018-04-16 Thread Peter Otten
Chris Angelico wrote: > On Tue, Apr 17, 2018 at 3:34 AM, Peter Otten <__pete...@web.de> wrote: >> Irv Kalb wrote: >> >>> I have been writing OOP code for many years in other languages and for >>> the >>> past few years in Python. I am writing new curriculum for a course on >>> OOP >>> in Python.

Re: Instance variables question

2018-04-16 Thread Chris Angelico
On Tue, Apr 17, 2018 at 3:34 AM, Peter Otten <__pete...@web.de> wrote: > Irv Kalb wrote: > >> I have been writing OOP code for many years in other languages and for the >> past few years in Python. I am writing new curriculum for a course on OOP >> in Python. In order to see how others are explai

Re: How to save xarray data to csv

2018-04-16 Thread Chris Angelico
On Tue, Apr 17, 2018 at 3:50 AM, Rhodri James wrote: > You don't say, but I assume you're using Python 2.x > > [snip] > >> getting this error - TypeError: a bytes-like object is required, not 'str' Actually, based on this error, I would suspect Python 3.x. But you're right that (a) the Python ver

Re: How to save xarray data to csv

2018-04-16 Thread Rhodri James
On 16/04/18 15:55, shalu.ash...@gmail.com wrote: Hello All, I have used xarray to merge several netcdf files into one file and then I subset the data of my point of interest using lat/long. Now I want to save this array data (time,lat,long) into csv file but I am getting an error with my code:

Re: Instance variables question

2018-04-16 Thread Irv Kalb
> On Apr 16, 2018, at 9:48 AM, duncan smith wrote: > > On 16/04/18 17:03, Irv Kalb wrote: >> I have been writing OOP code for many years in other languages and for the >> past few years in Python. I am writing new curriculum for a course on OOP >> in Python. In order to see how others are ex

Re: Instance variables question

2018-04-16 Thread Peter Otten
Irv Kalb wrote: > I have been writing OOP code for many years in other languages and for the > past few years in Python. I am writing new curriculum for a course on OOP > in Python. In order to see how others are explaining OOP concepts, I have > been reading as many books and watching as many v

Slow tarfile extract on armv7l Linux machine

2018-04-16 Thread Jim MacArthur
Hi, I'm seeing a very slow extraction of an uncompressed tar file using 'tarfile' in Python 3.5.3 vs. the native Debian tar tool. This is a console log from my machine: jimm@scw-01:~$ time tar xf update.tar real    0m3.436s user    0m0.430s sys 0m2.870s jimm@scw-01:~$ rm -rf home j

Re: Instance variables question

2018-04-16 Thread duncan smith
On 16/04/18 17:03, Irv Kalb wrote: > I have been writing OOP code for many years in other languages and for the > past few years in Python. I am writing new curriculum for a course on OOP in > Python. In order to see how others are explaining OOP concepts, I have been > reading as many books a

Re: Instance variables question

2018-04-16 Thread Thomas Jollans
On 2018-04-16 18:03, Irv Kalb wrote: > He gives a demonstration using the following example: > > class PartyAnimal(): > x = 0 > > def party(self): > self.x = self.x + 1 > print('So far', self.x) > > [snip] > > But there is something there that seems odd. My understandin

Re: Instance variables question

2018-04-16 Thread Joseph L. Casale
From: Python-list on behalf of Irv Kalb Sent: Monday, April 16, 2018 10:03 AM To: python-list@python.org Subject: Instance variables question   > class PartyAnimal(): >     x = 0 > >     def party(self): >     self.x = self.x + 1 >     print('So far', self.x) Your not accessing the

Instance variables question

2018-04-16 Thread Irv Kalb
I have been writing OOP code for many years in other languages and for the past few years in Python. I am writing new curriculum for a course on OOP in Python. In order to see how others are explaining OOP concepts, I have been reading as many books and watching as many videos as I can. I've

How to save xarray data to csv

2018-04-16 Thread shalu . ashu50
Hello All, I have used xarray to merge several netcdf files into one file and then I subset the data of my point of interest using lat/long. Now I want to save this array data (time,lat,long) into csv file but I am getting an error with my code: dsmerged = xarray.open_mfdataset('F:/NTU_PDF__Wo

ANN: Python Meeting Düsseldorf - 18.04.2018

2018-04-16 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 Tref

Re: how to set timeout for os.popen

2018-04-16 Thread Jugurtha Hadjar
On 04/15/2018 12:01 PM, Ho Yeung Lee wrote: while 1: runner = os.popen("tracert -d www.hello.com") o=runner.read() print(o) runner.close() runner = os.popen("tracert -d www.hello.com") o=runner.read() print(o) runner.close() runner = os.popen("tracert -d www.hello.com") o=runner.read() print(o) r

Re: Python installer hangs in Windows 7

2018-04-16 Thread jtshah619
On Monday, February 6, 2017 at 10:46:24 AM UTC+5:30, Jean-Claude Roy wrote: >   I am trying to install Python 3.6.0 on a Windows 7 computer. > The download of 29.1 MB is successful and I get the nextwindow.  I choose the > "install now" selection and thatopens the Setup Program window. > Now the t