[issue33293] Using datetime.datetime.utcnow().timestamp() in Python3.6.0 can't get correct UTC timestamp.

2018-04-16 Thread Han Shaowen
New submission from Han Shaowen : What I am talking is like: Python 3.6.0 (default, Feb 28 2018, 15:41:04) [GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.39.2)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import time >>> from

[issue33283] Mention PNG as a supported image format by Tcl/Tk

2018-04-16 Thread miss-islington
Change by miss-islington : -- pull_requests: +6196 ___ Python tracker ___

[issue33283] Mention PNG as a supported image format by Tcl/Tk

2018-04-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 4b685bf7192fff48c8effeeae4f4d64f9420ec0f by Serhiy Storchaka (Andrés Delfino) in branch 'master': bpo-33283: Mention PNG as a supported format by Tcl/Tk. (GH-6479)

[issue33292] Fix secrets.randbelow docstring

2018-04-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: What is wrong with the current docstring? -- nosy: +serhiy.storchaka, steven.daprano ___ Python tracker

[issue33283] Mention PNG as a supported image format by Tcl/Tk

2018-04-16 Thread miss-islington
Change by miss-islington : -- pull_requests: +6197 ___ Python tracker ___

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): >    

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

[issue21475] Support the Sitemap extension in robotparser

2018-04-16 Thread Steven Steven
Steven Steven added the comment: Kindly add a test for this issue -- nosy: +stevensalbert ___ Python tracker ___

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

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

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

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

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

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

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

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 =

[issue33286] Conflict between tqdm and multiprocessing on windows

2018-04-16 Thread Ronald Oussoren
Ronald Oussoren added the comment: Multiprocessing by default uses the fork system call to start new processes on Linux. This system call is not available on Windows, and there multiprocessing starts a fresh interpreter (see

[issue33286] Conflict between tqdm and multiprocessing on windows

2018-04-16 Thread schwemro
schwemro added the comment: On macOS it works perfectly for me as well. The issue is about running it on windows 10... -- ___ Python tracker

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.

[issue33287] "pip iinstall packageName.py" fails

2018-04-16 Thread Berker Peksag
Berker Peksag added the comment: There are two different problems here: 1. There is a possible networking issue. I'd try to use a proxy or something like that. 2. You are using a pip patched by Ubuntu/Debian developers. pip is normally a self-contained package and

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

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)

[issue33286] Conflict between tqdm and multiprocessing on windows

2018-04-16 Thread schwemro
schwemro added the comment: Here is the traceback: Python 3.6.5 | packaged by conda-forge | (default, Apr 6 2018, 16:13:55) [MSC v.1900 64 bit (AMD64)] Type "copyright", "credits" or "license" for more information. IPython 6.3.1 -- An enhanced Interactive Python.

[issue4806] Function calls taking a generator as star argument can mask TypeErrors in the generator

2018-04-16 Thread Jason R. Coombs
Jason R. Coombs added the comment: I believe I encountered this issue today on Python 2.7.14 (https://ci.appveyor.com/project/jaraco/jaraco-windows/build/31/job/lenh5l4dcmj137b9). In this case, I have an iterable (in itertools.imap) that raises a TypeError when evaluated,

[issue33287] "pip iinstall packageName.py" fails

2018-04-16 Thread antonio95100
New submission from antonio95100 : Hi all. I'm struggling with the installation of a pyton package under Ubuntu 16.4 and Python 7. I follow the statements of the pakage authors, but I obtaint the following errors (note that I have the same error for different packages

[issue33264] Remove to-be-deprecated urllib.request.urlretrieve function reference from HOWTO

2018-04-16 Thread miss-islington
Change by miss-islington : -- pull_requests: +6185 ___ Python tracker ___

[issue33264] Remove to-be-deprecated urllib.request.urlretrieve function reference from HOWTO

2018-04-16 Thread miss-islington
Change by miss-islington : -- pull_requests: +6186 ___ Python tracker ___

[issue33264] Remove to-be-deprecated urllib.request.urlretrieve function reference from HOWTO

2018-04-16 Thread Senthil Kumaran
Senthil Kumaran added the comment: Thank you, Andrés and Terry. This is merged in 3.8 and backported to 3.7 and 3.6 too. -- versions: +Python 3.6, Python 3.7 ___ Python tracker

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.

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

[issue31904] Python should support VxWorks RTOS

2018-04-16 Thread Ned Deily
Ned Deily added the comment: As I commented on the PR, I think this PR should not be merged until and if there is a consensus that this support belongs in the standard cpython repo and there is an agreed-upon plan how this platform would be supported on going. I think it

[issue33288] Spam

2018-04-16 Thread Zachary Ware
Change by Zachary Ware : -- Removed message: https://bugs.python.org/msg315364 ___ Python tracker ___

[issue33288] Spam

2018-04-16 Thread Zachary Ware
Change by Zachary Ware : -- Removed message: https://bugs.python.org/msg315363 ___ Python tracker ___

[issue33288] Spam

2018-04-16 Thread Zachary Ware
Change by Zachary Ware : -- nosy: -stevensalbert resolution: -> not a bug stage: -> resolved status: open -> closed title: Diethealth -> Spam ___ Python tracker

[issue33288] Diethealth

2018-04-16 Thread Steven Steven
Steven Steven added the comment: http://www.diethealthsupplements.com/ -- ___ Python tracker ___

[issue33288] Diethealth

2018-04-16 Thread Steven Steven
New submission from Steven Steven : sue -- messages: 315363 nosy: stevensalbert priority: normal severity: normal status: open title: Diethealth ___ Python tracker

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'] --

[issue33289] askcolor is returning floats for r, g, b values instead of ints

2018-04-16 Thread Bryan Oakley
New submission from Bryan Oakley : Even though the underlying tcl/tk interpreter is returning ints, askcolor is converting the values to floats. My guess is this is an oversight related to the change in functionality of the / operator in python3. this: return

[issue32232] building extensions as builtins is broken in 3.7

2018-04-16 Thread Xavier de Gaye
Change by Xavier de Gaye : -- pull_requests: +6188 ___ Python tracker ___ ___

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

[issue33266] 2to3 doesn't parse all valid string literals

2018-04-16 Thread miss-islington
Change by miss-islington : -- pull_requests: +6187 ___ Python tracker ___

[issue31947] names=None case is not handled by EnumMeta._create_ method

2018-04-16 Thread miss-islington
miss-islington added the comment: New changeset 3bcca488fe753ae8cef9178e32237f84927c938e by Miss Islington (bot) in branch '3.7': bpo-31947: remove None default for names param in Enum._create_ (GH-4288)

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

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',

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',

[issue32232] building extensions as builtins is broken in 3.7

2018-04-16 Thread Xavier de Gaye
Xavier de Gaye added the comment: The compilation failure is a consequence of the changes made in issue 30860. Simply adding '#include "internal/pystate.h"' in Modules/_elementtree.c fixes the compilation although this is not the correct fix. The modules configured in

[issue33290] Python.org macOS pkg installs pip3 as pip

2018-04-16 Thread Gilbert Wilson
New submission from Gilbert Wilson : The python-3.6.5-macosx10.6.pkg installs pip3 as pip. This means if you have both python2.7.x and 3.6.x you get unexpected and undesirable behavior. According to the release notes in 3.6.5: Python 3 and Python 2 Co-existence Python.org

[issue33205] GROWTH_RATE prevents dict shrinking

2018-04-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The capacity of the dict is 2/3 of its hashtable size: dk_usable < 2/3 * dk_size. Currently the dict grows if dk_usable > 1/4 * dk_size, and preserves the size if dk_usable < 1/4 * dk_size. Note that it it can grow twice if

[issue33285] pip upgrade runtime crash

2018-04-16 Thread Paul Moore
Paul Moore added the comment: Issues with pip should be reported at https://github.com/pypa/pip/issues rather than here. However, in this case, the issue is that you ran the command "pip install --upgrade pip" which will use the pip executable to upgrade itself,

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

[issue33234] Improve list() pre-sizing for inputs with known lengths

2018-04-16 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- keywords: +patch pull_requests: +6190 stage: -> patch review ___ Python tracker ___

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

[issue33291] Cannot Install Stegano Package - Python 3.6.5 Base

2018-04-16 Thread Adam Klinger
New submission from Adam Klinger : There seems to be an issue in the default setup.py which comes with the Python 3.6.5 installer. Upon trying to install an additional package through pip the below is observed: C:\Users\adamj\Desktop>pip install stegano Collecting

[issue33291] issue in the default setup.py which comes with the Python 3.6.5 installer

2018-04-16 Thread Adam Klinger
Change by Adam Klinger : -- title: Cannot Install Stegano Package - Python 3.6.5 Base -> issue in the default setup.py which comes with the Python 3.6.5 installer ___ Python tracker

[issue33290] Python.org macOS pkg installs pip3 as pip

2018-04-16 Thread Ned Deily
Ned Deily added the comment: Actually, this appears to be a pip upgrade issue. If you install 3.6.5 from the python.org installers, there is no pip link there, only pip3: $ cd /Library/Frameworks/Python.framework/Versions/3.6/bin $ ls -l total 272 lrwxr-xr-x 1 root admin

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

[issue33290] Python.org macOS pkg installs pip3 as pip

2018-04-16 Thread Ned Deily
Ned Deily added the comment: P.S. Of course, you'll probably need to manually remove that spurious pip command. -- ___ Python tracker

[issue32232] building extensions as builtins is broken in 3.7

2018-04-16 Thread Ned Deily
Ned Deily added the comment: Thanks, Xavier, for your analysis and your PR! We definitely meed to get this resolved before 3.7.0b4. Given the complexity and potential impact on this area and that we are approaching the final beta, I think we need a few pairs of eyes to

[issue23403] Use pickle protocol 4 by default?

2018-04-16 Thread Łukasz Langa
Change by Łukasz Langa : -- pull_requests: +6189 ___ Python tracker ___ ___

[issue33286] Conflict between tqdm and multiprocessing on windows

2018-04-16 Thread Ronald Oussoren
Ronald Oussoren added the comment: What's the specific exception you are getting? BTW. This involves third-party code and this may be a bug in that code. An important difference between linux and windows is how multiprocessing launches additional processes.

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

[issue33251] ConfigParser.items returns items present in vars

2018-04-16 Thread Łukasz Langa
Łukasz Langa added the comment: Well, now that I think about it, this is not even a *bug* fix since it's behavior that configparser had since 1997. So that will have to go straight to 3.8. -- versions: +Python 3.8 -Python 3.6 ___

[issue33251] ConfigParser.items returns items present in vars

2018-04-16 Thread Łukasz Langa
Change by Łukasz Langa : -- pull_requests: +6191 ___ Python tracker ___ ___

[issue33292] Fix secrets.randbelow docstring

2018-04-16 Thread Vex Woo
New submission from Vex Woo : - https://github.com/python/cpython/blob/master/Lib/secrets.py#L28 Please fix """Return a random int in the range [0, n).""" to """Return a random int in the range(0, n).""" -- components: Library (Lib) messages: 315376

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 > >

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'

[issue33251] ConfigParser.items returns items present in vars

2018-04-16 Thread Łukasz Langa
Łukasz Langa added the comment: Hm. The documentation change was done in issue12036 but it seems this was actually never the case, contrary to what the conversation on that other issue there states. I wouldn't change it for 3.6.6 anymore since it's pretty late in the release

[issue33251] ConfigParser.items returns items present in vars

2018-04-16 Thread miss-islington
Change by miss-islington : -- pull_requests: +6192 ___ Python tracker ___

[issue33251] ConfigParser.items returns items present in vars

2018-04-16 Thread miss-islington
Change by miss-islington : -- pull_requests: +6193 ___ Python tracker ___

[issue33292] Fix secrets.randbelow docstring

2018-04-16 Thread Roundup Robot
Change by Roundup Robot : -- keywords: +patch pull_requests: +6194 stage: -> patch review ___ Python tracker ___

[issue33286] Conflict between tqdm and multiprocessing on windows

2018-04-16 Thread schwemro
New submission from schwemro : Apparently, there occurs a conflict between tqdm and multiprocessing. There is an AttributeError displayed. I provide here an minimal working example. It works on UNIX but unfortunately not on windows. -- components: Windows files: