Re: [beginner] What's wrong?

2016-04-01 Thread William Ray Wing
> On Apr 1, 2016, at 6:57 PM, Mark Lawrence via Python-list > wrote: > >> On 01/04/2016 23:44, sohcahto...@gmail.com wrote: >>> On Friday, April 1, 2016 at 3:10:51 PM UTC-7, Michael Okuntsov wrote: >>> Nevermind. for j in range(1,8) should be for j in range(8). >> >> I

Re: Drowning in a teacup?

2016-04-01 Thread Vito De Tullio
Fillmore wrote: > I need to scan a list of strings. If one of the elements matches the > beginning of a search keyword, that element needs to snap to the front > of the list. I know this post regards the function passing, but, on you specific problem, can't you just ... sort the list with a

[issue5901] missing meta-info in documentation pdf

2016-04-01 Thread Berker Peksag
Berker Peksag added the comment: I get the following output when I try Python 3.5.1 docs: $ pdfinfo using.pdf Title: Subject: Keywords: Author: Creator:LaTeX with hyperref package Producer: pdfTeX-1.40.14 CreationDate: Sat Apr 2 00:17:54 2016

Re: [beginner] What's wrong?

2016-04-01 Thread Michael Selik
On Sat, Apr 2, 2016, 12:28 AM Random832 wrote: > On Fri, Apr 1, 2016, at 19:29, Michael Selik wrote: > > Humans have always had trouble with this, in many contexts. I remember > > being annoyed at folks saying the year 2000 was the first year of the new > > millennium,

Re: [beginner] What's wrong?

2016-04-01 Thread Random832
On Fri, Apr 1, 2016, at 19:29, Michael Selik wrote: > Humans have always had trouble with this, in many contexts. I remember > being annoyed at folks saying the year 2000 was the first year of the new > millennium, rather than 2001. They'd forgotten the Gregorian calendar > starts from AD 1.

[issue26647] ceval: use Wordcode, 16-bit bytecode

2016-04-01 Thread Demur Rumed
Demur Rumed added the comment: Got f_lasti working as -1. Applied PEP7. Unrelated: fixed a misnamed variable in test_grammar because it ran into a peephole bug (const -> jump_if_false erase didn't work when EXTENDED_ARGs were involved). dis has argval/arg set to None instead of the unused

Re: Drowning in a teacup?

2016-04-01 Thread Fillmore
On 04/01/2016 04:27 PM, Fillmore wrote: notorious pass by reference vs pass by value biting me in the backside here. Proceeding in order. Many thanks to all of those who replied! -- https://mail.python.org/mailman/listinfo/python-list

[issue26657] Directory traversal with http.server and SimpleHTTPServer on windows

2016-04-01 Thread Martin Panter
Martin Panter added the comment: Thomas: My check for os.path.devnull was just a half-hearted attempt to check for special device names like NUL on Windows. It is far from foolproof, and would fail my CON.fusion test that I mentioned above. Anyway, to address this specific bug it would be

Django Channels examples

2016-04-01 Thread justin walters
To all of my Web developer bros and broettes, You all should check out this github repo: https://github.com/andrewgodwin/channels-examples This is not my repo or my work. Channels is a package for Django that allows Django to work more easily with websockets through an asgi interface. The

[issue21069] test_fileno of test_urllibnet intermittently fails

2016-04-01 Thread Martin Panter
Martin Panter added the comment: Here is a patch implementing my ideas. Let me know what you think of the ideas and/or the patch :) If people think this change is too much for 3.5, I could try making a more minimal patch that calls something like socket.getpeername() rather than read(). That

[issue26679] curses: Descripton of KEY_NPAGE and KEY_PPAGE inverted

2016-04-01 Thread Berker Peksag
Berker Peksag added the comment: Thanks, Robert and SilentGhost. I verified the patch with the following script: import curses def main(stdscr): while True: c = stdscr.getch() if c == curses.KEY_PPAGE: stdscr.addstr('Page Up') elif c ==

[issue26679] curses: Descripton of KEY_NPAGE and KEY_PPAGE inverted

2016-04-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset f41d3321007f by Berker Peksag in branch '3.5': Issue #26679: Fix description of KEY_PPAGE and KEY_NPAGE constants https://hg.python.org/cpython/rev/f41d3321007f New changeset 23d986228c6b by Berker Peksag in branch 'default': Issue #26679: Fix

[issue26688] unittest2 referenced in unittest.mock documentation

2016-04-01 Thread Berker Peksag
Berker Peksag added the comment: Good catch, thanks Ashley! 3.3 and 3.4 are in security-fix-only mode so we don't fix documentation issues in those branches. -- nosy: +berker.peksag resolution: -> fixed stage: -> resolved status: open -> closed type: -> behavior versions: -Python

[issue26688] unittest2 referenced in unittest.mock documentation

2016-04-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset 73279e4a1107 by Berker Peksag in branch '3.5': Issue #26688: Fix module name in mock docs https://hg.python.org/cpython/rev/73279e4a1107 New changeset 24efe844e598 by Berker Peksag in branch 'default': Issue #26688: Fix module name in mock docs

Re: pow() & modulo QUESTION

2016-04-01 Thread MRAB
On 2016-04-02 00:08, vaulhau...@gmail.com wrote: Having trouble performing the pow() function with real numbers. I want to also take a modulo value Weirdly, this works fine ; pow(2,6000,400) = 176 However, this returns an error ; pow(1.4142, 6000, 400) I have tried also the math.pow()

[issue26488] hashlib command line interface

2016-04-01 Thread Martin Panter
Martin Panter added the comment: I left some replies to Rietveld comments (sending review emails seems buggy). For a chunk size, don’t worry too much about it. I would say keep it large enough to limit time spent executing Python code and syscalls, keep it small to avoid wasting high speed

[issue26678] Incorrect linking to elements in datetime package

2016-04-01 Thread Martin Panter
Martin Panter added the comment: Can you link to other methods? E.g. try io.IOBase.close(), which is done the normal way as a method indented under its class, and nntplib.NNTP.quit(), which is listed separately from its class definition. Regarding CRLFs in “configure”, all I can guess is

[issue26678] Incorrect linking to elements in datetime package

2016-04-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset 30e077f886cc by Martin Panter in branch '3.5': Issue #26678: Fix indexing of datetime.tzinfo and timezone classes https://hg.python.org/cpython/rev/30e077f886cc New changeset 854db1a2cd98 by Martin Panter in branch 'default': Issue #26678: Merge

Introduction

2016-04-01 Thread Dale Marvin
I just sent my first post, been using python for about 12 years to automate media production tasks. Lately I've been adding testing (Thanks Ned Batchelder: ), and documentation with Sphinx/rst. Thanks Dale Marvin digital OutPost --

Re: Grab metadata from images and save to file, batch mode

2016-04-01 Thread Dale Marvin
On 4/1/16 2:20 PM, accessnew...@gmail.com wrote: I have a directory (and sub-directories) full of images that I want to cycle through and grab certain metadata values and save those values to a single row in a cvs file. I would like to tack on the full path name to the row as a separate

Re: [beginner] What's wrong?

2016-04-01 Thread Michael Selik
Humans have always had trouble with this, in many contexts. I remember being annoyed at folks saying the year 2000 was the first year of the new millennium, rather than 2001. They'd forgotten the Gregorian calendar starts from AD 1. On Fri, Apr 1, 2016, 6:58 PM Mark Lawrence via Python-list <

pow() & modulo QUESTION

2016-04-01 Thread vaulhausen
Having trouble performing the pow() function with real numbers. I want to also take a modulo value Weirdly, this works fine ; pow(2,6000,400) = 176 However, this returns an error ; pow(1.4142, 6000, 400) I have tried also the math.pow() function but it doesnt work either. can any

Re: [beginner] What's wrong?

2016-04-01 Thread Mark Lawrence via Python-list
On 01/04/2016 23:44, sohcahto...@gmail.com wrote: On Friday, April 1, 2016 at 3:10:51 PM UTC-7, Michael Okuntsov wrote: Nevermind. for j in range(1,8) should be for j in range(8). I can't tell you how many times I've gotten bit in the ass with that off-by-one mistake whenever I use a range

Re: install open cv on windows 10 and python 3.5

2016-04-01 Thread MRAB
On 2016-04-01 22:37, Xristos Xristoou wrote: Τη Παρασκευή, 1 Απριλίου 2016 - 1:56:52 μ.μ. UTC+3, ο χρήστης Xristos Xristoou έγραψε: hello, i have windows 10 and python 3.5 and i want to use open cv but i think so opencv work only on python 2.7 ? and i install this

Re: Drowning in a teacup?

2016-04-01 Thread Steven D'Aprano
On Sat, 2 Apr 2016 07:27 am, Fillmore wrote: > > notorious pass by reference vs pass by value biting me in the backside > here. Proceeding in order. Python is NEITHER pass by reference nor pass by value. Please read this: http://import-that.dreamwidth.org/1130.html before asking any

Re: [beginner] What's wrong?

2016-04-01 Thread sohcahtoa82
On Friday, April 1, 2016 at 3:10:51 PM UTC-7, Michael Okuntsov wrote: > Nevermind. for j in range(1,8) should be for j in range(8). I can't tell you how many times I've gotten bit in the ass with that off-by-one mistake whenever I use a range that doesn't start at zero. I know that if I want to

Re: Strange range

2016-04-01 Thread Mark Lawrence via Python-list
On 01/04/2016 21:44, Marko Rauhamaa wrote: Rob Gaddi : Marko Rauhamaa wrote: There's a bit of a cognitive dissonance between iterables and iterators. On the one hand, they behave identically in many contexts. On the other hand, the distinction is crucial in

Re: [beginner] What's wrong?

2016-04-01 Thread Mark Lawrence via Python-list
On 01/04/2016 23:10, Michael Okuntsov wrote: Nevermind. for j in range(1,8) should be for j in range(8). Thank you for your correction, we in Python land greatly appreciate such things :) -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our

Re: Drowning in a teacup?

2016-04-01 Thread Mark Lawrence via Python-list
On 01/04/2016 21:27, Fillmore wrote: notorious pass by reference vs pass by value biting me in the backside here. Proceeding in order. It is pass by object. By definition your following analysis is wrong. To my knowledge this has been discussed at least twice a year for the past 15 years.

Re: [beginner] What's wrong?

2016-04-01 Thread Michael Okuntsov
Nevermind. for j in range(1,8) should be for j in range(8). -- https://mail.python.org/mailman/listinfo/python-list

[issue26646] Allow built-in module in package

2016-04-01 Thread Brett Cannon
Brett Cannon added the comment: Referring to the other issue was more about tying the two issues together than necessarily expecting the other patch to work. As for supporting packages as well as submodules, I'm not sure. It seems a little odd not to support the idea, but then again if

[issue26686] email.parser stops parsing headers too soon.

2016-04-01 Thread Martin Panter
Martin Panter added the comment: Also see Issue 24363, basically the same bug in the HTTP parser, which (ab?)uses the email package to do most of the work. In that case, according to my note the faulty header field ends with: X-Frame-Options: SAMEORIGIN\r\n Set-Cookie: mb-CookieP=; HttpOnly;

[issue26646] Allow built-in module in package

2016-04-01 Thread Daniel Shaulov
Daniel Shaulov added the comment: Hi Brett, I don't think that the patch from that issue is relevant anymore. I did take the test case that was proposed in that issue and I am attaching a fixed version here. I did realize from the discussion that my patch probably doesn't work on Windows (I

[beginner] What's wrong?

2016-04-01 Thread Michael Okuntsov
Hello, I have a Pascal code for some hash function. I've tried to rewrite it on Python but it doesn't give the right value (which is 32202). Please tell me where is the error. Thanks. ** Pascal program ** Program K_S; Var ST: String;

Re: install open cv on windows 10 and python 3.5

2016-04-01 Thread Xristos Xristoou
Τη Παρασκευή, 1 Απριλίου 2016 - 1:56:52 μ.μ. UTC+3, ο χρήστης Xristos Xristoou έγραψε: > hello, > > i have windows 10 and python 3.5 and i want to use > open cv but i think so opencv work only on python 2.7 ? > and i install this http://www.lfd.uci.edu/~gohlke/pythonlibs/#opencv > but not work

Grab metadata from images and save to file, batch mode

2016-04-01 Thread accessnewbie
I have a directory (and sub-directories) full of images that I want to cycle through and grab certain metadata values and save those values to a single row in a cvs file. I would like to tack on the full path name to the row as a separate value. Folder C:\Images\Family Brother.jpg Sister.jpg

Re: Strange range

2016-04-01 Thread Terry Reedy
On 4/1/2016 4:14 PM, Marko Rauhamaa wrote: There's a bit of a cognitive dissonance between iterables and iterators. On the one hand, they behave identically in many contexts. Because iterators *are* (a proper subset of) iterables This goes back to pre-iterator days when for-loops worked on

Re: Drowning in a teacup?

2016-04-01 Thread Ian Kelly
On Fri, Apr 1, 2016 at 3:10 PM, Chris Kaynor wrote: > The overall algorithm is O(n^2), as its doing a O(n) operation in a O(n) > loop: Depends on whether the OP expects to find only one match or potentially multiple matches in the list. E did say "if one of the elements

Re: Drowning in a teacup?

2016-04-01 Thread Ethan Furman
On 04/01/2016 01:27 PM, Fillmore wrote: notorious pass by reference vs pass by value biting me in the backside here. Proceeding in order. It's only notorious for folks that don't understand that Python uses neither. It also doesn't help when folks don't understand how name-binding works.

[issue26642] Replace stdout and stderr with simple standard printers at Python exit

2016-04-01 Thread STINNER Victor
STINNER Victor added the comment: +if (!closed) { +PyObject *res = PyObject_CallMethod(file, "close", ""); +PyErr_Clear(); +Py_XDECREF(res); +} +if (!dunder_closed) { +PyObject *res = PyObject_CallMethod(dunder_file, "close", ""); +

Re: Drowning in a teacup?

2016-04-01 Thread Chris Kaynor
On Fri, Apr 1, 2016 at 1:52 PM, Ian Kelly wrote: > On Fri, Apr 1, 2016 at 2:39 PM, Rob Gaddi > wrote: > > Fillmore wrote: > >> Nope, wrong! contrary to what I thought I had understood about how > >> parameters are passed in Python, the

[issue26668] Remove Lib/test/test_importlib/regrtest.py?

2016-04-01 Thread STINNER Victor
STINNER Victor added the comment: > once I/someone double-checks that all the tests in > test.test_importlib.import_ are doing the right thing in regards to > util.test_both(..., __import__=util.__import__). Ah, I didn't understand that it was a question. I'm not interested to check that.

writing to command line thru python gui

2016-04-01 Thread A. ElKader
I posted this question, no reply : Any advice : http://unix.stackexchange.com/questions/273573/write-to-terminal-in-tkinter-gui -- https://mail.python.org/mailman/listinfo/python-list

[issue26642] Replace stdout and stderr with simple standard printers at Python exit

2016-04-01 Thread STINNER Victor
STINNER Victor added the comment: Patch version 2: * check if the stream was already "closed" (see below and comment in the patch) * first replace stream and then close it and DECREF the object * don't close stdin anymore > 1. Is there a reason only name is closed, not dunder_name? (Josh's

Re: extract rar

2016-04-01 Thread Jianling Fan
Thanks, but the problem is that I am not allowed to install any software in my office PC, even free software. Normally, I use zip files but this time I need to extract a rar file. I don't like to go to IT guys because it takes time. That's why I am looking for an alternative way without installing

[issue26668] Remove Lib/test/test_importlib/regrtest.py?

2016-04-01 Thread Brett Cannon
Brett Cannon added the comment: Yes, I'm fine with removing it once I/someone double-checks that all the tests in test.test_importlib.import_ are doing the right thing in regards to util.test_both(..., __import__=util.__import__). -- ___ Python

Re: install open cv on windows 10 and python 3.5

2016-04-01 Thread Terry Reedy
On 4/1/2016 4:38 PM, saxr...@gmail.com wrote: Τη Παρασκευή, 1 Απριλίου 2016 - 1:56:52 μ.μ. UTC+3, ο χρήστης sax...@gmail.com έγραψε: hello, i have windows 10 and python 3.5 and i want to use open cv but i think so opencv work only on python 2.7 ? and i install this

Re: Drowning in a teacup?

2016-04-01 Thread Ian Kelly
On Fri, Apr 1, 2016 at 2:39 PM, Rob Gaddi wrote: > Fillmore wrote: >> Nope, wrong! contrary to what I thought I had understood about how >> parameters are passed in Python, the function is acting on a copy(!) and >> my original list is unchanged. >> > > Nope,

[issue26673] Tkinter error when opening IDLE configuration menu

2016-04-01 Thread Terry J. Reedy
Terry J. Reedy added the comment: I should have thought of .idlerc as being a possible problem. The usual fix is to delete its contents. For this tracker, exiting with a traceback is a behavior issue; a crash is something worse, a core dump or whatever the MAC equivalent is. .idlerc should

[issue26687] Use Py_RETURN_NONE in sqlite3 module

2016-04-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This patch and more can be generated by Сoccinelle [1] semantic patch. spatch --in-place --dir . --sp-file py_return_none_macro.cocci But be aware that some maintainers consider such sort of changes a code churn. [1] http://coccinelle.lip6.fr/

Re: Drowning in a teacup?

2016-04-01 Thread Michael Selik
Give this a shot def snap(keyword, words): matches = [i for i, s in enumerate(words) if s.startswith(keyword)] for i in matches: lst.insert(0, lst.pop(i)) Your current implementation is reassigning the local variable ``mylist`` to a new list inside the function.

Re: Drowning in a teacup?

2016-04-01 Thread MRAB
On 2016-04-01 21:27, Fillmore wrote: notorious pass by reference vs pass by value biting me in the backside here. Proceeding in order. I need to scan a list of strings. If one of the elements matches the beginning of a search keyword, that element needs to snap to the front of the list. I

Re: Strange range

2016-04-01 Thread Marko Rauhamaa
Rob Gaddi : > Marko Rauhamaa wrote: >> There's a bit of a cognitive dissonance between iterables and iterators. >> On the one hand, they behave identically in many contexts. On the other >> hand, the distinction is crucial in some special cases. > > You're

Re: Drowning in a teacup?

2016-04-01 Thread Rob Gaddi
Fillmore wrote: > > notorious pass by reference vs pass by value biting me in the backside > here. Proceeding in order. > > I need to scan a list of strings. If one of the elements matches the > beginning of a search keyword, that element needs to snap to the front > of the list. > I achieved

[issue26488] hashlib command line interface

2016-04-01 Thread Aviv Palivoda
Aviv Palivoda added the comment: Publishing another patch after SilentGhost and Victor CR. I also changed the block size to 256 KB. If someone can remove the dependency on issue 14156 (I don't think I have permissions). -- Added file:

Re: install open cv on windows 10 and python 3.5

2016-04-01 Thread saxri89
Τη Παρασκευή, 1 Απριλίου 2016 - 1:56:52 μ.μ. UTC+3, ο χρήστης sax...@gmail.com έγραψε: > hello, > > i have windows 10 and python 3.5 and i want to use > open cv but i think so opencv work only on python 2.7 ? > and i install this http://www.lfd.uci.edu/~gohlke/pythonlibs/#opencv > but not work

[issue26688] unittest2 referenced in unittest.mock documentation

2016-04-01 Thread Ashley Anderson
New submission from Ashley Anderson: I noticed a few references to `unittest2` in the documentation in the `unittest.mock` "getting started" section: https://docs.python.org/3.6/library/unittest.mock-examples.html#patch-decorators I am attaching a patch that just changes these occurrences

Re: install open cv on windows 10 and python 3.5

2016-04-01 Thread MRAB
On 2016-04-01 20:11, saxr...@gmail.com wrote: Τη Παρασκευή, 1 Απριλίου 2016 - 1:56:52 μ.μ. UTC+3, ο χρήστης sax...@gmail.com έγραψε: hello, i have windows 10 and python 3.5 and i want to use open cv but i think so opencv work only on python 2.7 ? and i install this

Re: Set type for datetime intervals

2016-04-01 Thread Michael Selik
Whoops, I mixed up tasks. Here's what I meant: def interval(start, stop, precision=60): a, b = start.timestamp(), stop.timestamp() return set(range(a, b, precision)) On Fri, Apr 1, 2016 at 4:31 PM Michael Selik wrote: > On Fri, Apr 1, 2016 at 1:32

Re: Set type for datetime intervals

2016-04-01 Thread Michael Selik
On Fri, Apr 1, 2016 at 1:32 AM Nagy László Zsolt wrote: > Does anyone know a library that already implements these functions? > What do you not like about the ones on PyPI? https://pypi.python.org/pypi?%3Aaction=search=interval=search Depending on the resolution you want,

Drowning in a teacup?

2016-04-01 Thread Fillmore
notorious pass by reference vs pass by value biting me in the backside here. Proceeding in order. I need to scan a list of strings. If one of the elements matches the beginning of a search keyword, that element needs to snap to the front of the list. I achieved that this way: for i in

Re: Strange range

2016-04-01 Thread Rob Gaddi
Marko Rauhamaa wrote: > Erik : > >> On 01/04/16 15:34, Marko Rauhamaa wrote: >>> Chris Angelico : >>> *A range object is not an iterator.* >>> >>> We now have learned as much. >>> >>> However, doesn't that extra level of indirection seem like an

Re: Strange range

2016-04-01 Thread Marko Rauhamaa
Erik : > On 01/04/16 15:34, Marko Rauhamaa wrote: >> Chris Angelico : >> >>> *A range object is not an iterator.* >> >> We now have learned as much. >> >> However, doesn't that extra level of indirection seem like an odd >> choice? > > [...] > > If you

Re: Strange range

2016-04-01 Thread Erik
On 01/04/16 15:34, Marko Rauhamaa wrote: Chris Angelico : *A range object is not an iterator.* We now have learned as much. However, doesn't that extra level of indirection seem like an odd choice? If you write your own class which has an __iter__ method, would you

[issue26606] logging.baseConfig is missing the encoding parameter

2016-04-01 Thread Vinay Sajip
Vinay Sajip added the comment: > and almost no one shows how to use the stream. Because most examples out there don't care about Unicode, etc. > I understand the redirection in the following way (also shown in the Dive > Into Python book) There's certainly no need to do that, and that would

[issue26668] Remove Lib/test/test_importlib/regrtest.py?

2016-04-01 Thread STINNER Victor
STINNER Victor added the comment: Do you mean that you are ok to remove this file in Python 3.6? The file is not used by test_importlib. -- ___ Python tracker

[issue26348] activate.fish sets VENV prompt incorrectly

2016-04-01 Thread Vinay Sajip
Vinay Sajip added the comment: Implementing this patch has led to another issue being raised: #26664. Dan - would you care to take a look and comment? Thanks. -- ___ Python tracker

[issue26295] Random failures when running test suite in parallel (-m test -j0) caused by test_regrtest

2016-04-01 Thread STINNER Victor
STINNER Victor added the comment: Finally, I fixed the issue differently: test_regrtest now creates a temporary directory and uses --testdir command line parameter. Before, using --testdir didn't work because regrtest always added "test." prefix to module names (ex: test_os => test.test_os).

[issue26606] logging.baseConfig is missing the encoding parameter

2016-04-01 Thread Jānis Šlapiņš
Jānis Šlapiņš added the comment: Many examples in the internet only show the usage of the filename parameter of basicConfig() and almost no one shows how to use the stream. That's why I wanted to use the filename parameter. But now I tested other options and they work for me. My case may be

[issue26509] asyncio: spurious ConnectionAbortedError logged on Windows

2016-04-01 Thread STINNER Victor
STINNER Victor added the comment: > Can someone please commit the patch? Done. -- resolution: -> fixed status: open -> closed ___ Python tracker ___

[issue26509] asyncio: spurious ConnectionAbortedError logged on Windows

2016-04-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset 68e694475483 by Victor Stinner in branch '3.5': asyncio: Don't log ConnectionAbortedError https://hg.python.org/cpython/rev/68e694475483 -- nosy: +python-dev ___ Python tracker

[issue26673] Tkinter error when opening IDLE configuration menu

2016-04-01 Thread wysaard
wysaard added the comment: I just fixed this problem. In my ~/.idlerc/ folder there was no `config-main.cfg` so I created it and used the settings found here: https://svn.python.org/projects/python/trunk/Mac/IDLE/config-main.def After doing that everything worked fine again. I'm not sure

RE: extract rar

2016-04-01 Thread Albert-Jan Roskam
> Date: Fri, 1 Apr 2016 13:22:12 -0600 > Subject: extract rar > From: fanjianl...@gmail.com > To: python-list@python.org > > Hello everyone, > > I am wondering is there any way to extract rar files by python without > WinRAR software? > > I tried Archive() and patool, but seems they required

[issue26509] asyncio: spurious ConnectionAbortedError logged on Windows

2016-04-01 Thread STINNER Victor
Changes by STINNER Victor : -- title: spurious ConnectionAbortedError logged on Windows -> asyncio: spurious ConnectionAbortedError logged on Windows ___ Python tracker

Re: extract rar

2016-04-01 Thread Random832
On Fri, Apr 1, 2016, at 15:22, Jianling Fan wrote: > Hello everyone, > > I am wondering is there any way to extract rar files by python without > WinRAR software? > > I tried Archive() and patool, but seems they required the WinRAR > software. Rar is a proprietary format. They do distribute a

[issue2943] Distutils should generate a better error message when the SDK is not installed

2016-04-01 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +haypo ___ Python tracker ___ ___

[issue26647] ceval: use Wordcode, 16-bit bytecode

2016-04-01 Thread STINNER Victor
STINNER Victor added the comment: I reviewed wpy3.patch. I concur with Raymond, it's really nice to have a regular structure for the bytecode. -- Serhiy proposed to *reduce* the size of bytecode by adding new specialized bytecode which include the argument. For example (LOAD_CONST, 0) =>

extract rar

2016-04-01 Thread Jianling Fan
Hello everyone, I am wondering is there any way to extract rar files by python without WinRAR software? I tried Archive() and patool, but seems they required the WinRAR software. Thanks, Regards, Jianling -- https://mail.python.org/mailman/listinfo/python-list

RE: A tool to add diagrams to sphinx docs

2016-04-01 Thread Albert-Jan Roskam
> Subject: Re: A tool to add diagrams to sphinx docs > From: irmen.nos...@xs4all.nl > Date: Fri, 1 Apr 2016 18:26:48 +0200 > To: python-list@python.org > > On 1-4-2016 17:59, George Trojan - NOAA Federal wrote: > > What graphics editor would you recommend to create diagrams that can be > >

Re: install open cv on windows 10 and python 3.5

2016-04-01 Thread saxri89
Τη Παρασκευή, 1 Απριλίου 2016 - 1:56:52 μ.μ. UTC+3, ο χρήστης sax...@gmail.com έγραψε: > hello, > > i have windows 10 and python 3.5 and i want to use > open cv but i think so opencv work only on python 2.7 ? > and i install this http://www.lfd.uci.edu/~gohlke/pythonlibs/#opencv > but not work

[issue18293] ssl.wrap_socket (cert_reqs=...), getpeercert, and unvalidated certificates

2016-04-01 Thread Sascha Silbe
Sascha Silbe added the comment: Has there been any progress on this? For my application I'd very much like "ssh-like" operation, using the public key itself as identifier rather than requiring some kind of automated CA setup. Being able to set a custom verification callback would be great,

[issue26687] Use Py_RETURN_NONE in sqlite3 module

2016-04-01 Thread STINNER Victor
STINNER Victor added the comment: py_return_none_macro.diff looks good to me. -- nosy: +haypo ___ Python tracker ___

[issue26673] Tkinter error when opening IDLE configuration menu

2016-04-01 Thread wysaard
wysaard added the comment: In the screen of `About IDLE` it shows "Tk version 8.6.4". It used to work, as least since last september (when I installed this) I've had no problems. I assumed reinstalling would solve it but that did nothing. I've removed the entire python package, made my package

[issue26687] Use Py_RETURN_NONE in sqlite3 module

2016-04-01 Thread Berker Peksag
New submission from Berker Peksag: The attached patch replaces all "Py_INCREF(Py_None); return Py_None;" lines with the Py_RETURN_NONE macro in sqlite3 module. -- components: Extension Modules messages: 262754 nosy: berker.peksag priority: normal severity: normal stage: patch review

[issue26687] Use Py_RETURN_NONE in sqlite3 module

2016-04-01 Thread Berker Peksag
Changes by Berker Peksag : -- keywords: +patch Added file: http://bugs.python.org/file42345/py_return_none_macro.diff ___ Python tracker

Re: install open cv on windows 10 and python 3.5

2016-04-01 Thread Terry Reedy
On 4/1/2016 6:56 AM, saxr...@gmail.com wrote: hello, i have windows 10 and python 3.5 and i want to use open cv but i think so opencv work only on python 2.7 ? The following link has binaries for 3.4 and 3.5 as well. I believe Gohlke tests his binaries, so I expect them to work. and i

[issue26683] Questionable terminology for describing what locals() does

2016-04-01 Thread Terry J. Reedy
Terry J. Reedy added the comment: I requested that we stop (mis)using 'free variable' in the docs years ago. A strong +1 from me. The 'locals' function what named when 'local' and 'non-global' were synonyms. When non-local, non-global names were added, nonlocals were included with 'locals'

[issue26686] email.parser stops parsing headers too soon.

2016-04-01 Thread SilentGhost
Changes by SilentGhost : -- components: +email nosy: +barry, r.david.murray versions: +Python 3.5 -Python 3.4 ___ Python tracker

[issue26673] Tkinter error when opening IDLE configuration menu

2016-04-01 Thread Terry J. Reedy
Terry J. Reedy added the comment: Serhiy, what do you make of the TclError? Could it be an ArchLinux-specific bug in tk? Here is the entire function: def SetFontSample(self, event=None): fontName = self.fontName.get() fontWeight = tkFont.BOLD if self.fontBold.get() else

[issue26686] email.parser stops parsing headers too soon.

2016-04-01 Thread Mark Sapiro
Mark Sapiro added the comment: Added Python 2.7 to versions: -- versions: +Python 2.7 ___ Python tracker ___

[issue26686] email.parser stops parsing headers too soon.

2016-04-01 Thread Mark Sapiro
New submission from Mark Sapiro: Given an admittedly defective (the folded Content-Type: isn't indented) message part with the following headers/body --- Content-Disposition: inline; filename="04EBD_._A546BB.zip" Content-Type: application/x-rar-compressed;

Re: [Python-ideas] Decorators for variables

2016-04-01 Thread Ian Kelly
On Fri, Apr 1, 2016 at 11:14 AM, Matthias welp wrote: >> An example of the transformation would help here > > An example, that detects cycles in a graph, and doesn't do an update if > the graph has cycles. Thanks. > class A(object): > def __init__(self, parent): >

[issue26488] hashlib command line interface

2016-04-01 Thread STINNER Victor
STINNER Victor added the comment: > The blocksize should be fixed and large (perhaps 256kB). I used strace to check md5sum & sha1sum: they use read() syscalls of 32,768 bytes. stat().st_blksize is 4,096 bytes. I'm not sure that it matters so much to use large read. But I don't really care,

[issue26664] find a bug in activate.fish of venv of cpython3.6

2016-04-01 Thread 鄭景文
鄭景文 added the comment: First, I use python 3.5.1 to create virtual environment. It works fine with fish. There is no $ in the activate.fish file. Second, after I removed the $, It works fine, both in ubuntu and arch linux. I guess it is because the $ is for bash not for fish, the activate.fish

[issue26488] hashlib command line interface

2016-04-01 Thread SilentGhost
SilentGhost added the comment: Left comments on Rietveld. -- ___ Python tracker ___ ___ Python-bugs-list

Re: A tool to add diagrams to sphinx docs

2016-04-01 Thread Irmen de Jong
On 1-4-2016 17:59, George Trojan - NOAA Federal wrote: > What graphics editor would you recommend to create diagrams that can be > included in sphinx made documentation? In the past I used xfig, but was not > happy with font quality. My understanding is the diagrams would be saved in > a .png file

[issue26606] logging.baseConfig is missing the encoding parameter

2016-04-01 Thread Vinay Sajip
Vinay Sajip added the comment: > you have also to remember to restore sys.stdout I'm not sure you understand how it works. The value of sys.stdout isn't changed, so why does it need to be restored? > for non-English languages it would be more appropriate to use codecs.open() > instead of

A tool to add diagrams to sphinx docs

2016-04-01 Thread George Trojan - NOAA Federal
What graphics editor would you recommend to create diagrams that can be included in sphinx made documentation? In the past I used xfig, but was not happy with font quality. My understanding is the diagrams would be saved in a .png file and I should use an image directive in the relevant .rst file.

Re: Set type for datetime intervals

2016-04-01 Thread Random832
More thoughts... sorry. On Fri, Apr 1, 2016, at 01:24, Nagy László Zsolt wrote: > > Hello, > > I need to compare sets of datetime intervals, and make set operations on > them: intersect, union, difference etc. One element of a set would be an > interval like this: > > element ::=

Re: Strange range

2016-04-01 Thread Marko Rauhamaa
Chris Angelico : > On Sat, Apr 2, 2016 at 1:34 AM, Marko Rauhamaa wrote: >> However, doesn't that extra level of indirection seem like an odd >> choice? > > No; a range object is an entity in itself. You can test if something's > within the range: > 5 in

  1   2   >