Re: Integers with leading zeroes
Michael Torrie wrote: A credit card number is indeed a number, and there are mathematical formulas for determining if a particular number is a valid (as in well-formed) credit card number, If you're talking about the check-digit algorithm, that doesn't treat the whole number as an integer, it works on the individual digits: http://www.datagenetics.com/blog/july42013/ and possibly to identify what kind of card it is. That's determined by the leading digits, and can be done just as well by treating them as characters. -- Greg -- https://mail.python.org/mailman/listinfo/python-list
Re: Integers with leading zeroes
On Fri, Jul 24, 2015 at 4:23 PM, Gregory Ewing greg.ew...@canterbury.ac.nz wrote: Michael Torrie wrote: A credit card number is indeed a number, and there are mathematical formulas for determining if a particular number is a valid (as in well-formed) credit card number, If you're talking about the check-digit algorithm, that doesn't treat the whole number as an integer, it works on the individual digits: http://www.datagenetics.com/blog/july42013/ and possibly to identify what kind of card it is. That's determined by the leading digits, and can be done just as well by treating them as characters. So, the definition of a number is: Something on which you perform numeric operations. Aside from being circular, wouldn't this mean that rope is a number, since its square root is string? ChrisA -- https://mail.python.org/mailman/listinfo/python-list
[issue24620] Segfault with nonsensical random state
Changes by Serhiy Storchaka storch...@gmail.com: -- resolution: - fixed stage: patch review - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24620 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
Re: Fwd: ImportError: No module named site
hi: Do you know, where can I download the python2.7.10-xcompile.patch file?thanks. On 07/24/2015 10:20 AM, Christopher Mullins wrote: What did you set those variables to? Also, output from python -v would be helpful. On Jul 23, 2015 10:15 PM, Laura Creighton l...@openend.se mailto:l...@openend.se wrote: In a message of Fri, 24 Jul 2015 09:37:35 +0800, chenc...@inhand.com.cn mailto:chenc...@inhand.com.cn write s: hi: I'm Needing to get python 2.7.10 to cross compile correctly for an ARM embedded device. When I execute python using shell, it comes out this error:ImportError: No module named site.I have setted environment varible:PYTHONHOME and PYTHONPATH. Is there some good idea to sovle this issue? You might want to try that question over here: https://mail.python.org/mailman/listinfo/mobile-sig I think you have an issue with dynamic library linking, but I don't know how to find out for sure. People there do. Laura -- https://mail.python.org/mailman/listinfo/python-list -- https://mail.python.org/mailman/listinfo/python-list
[issue24620] Segfault with nonsensical random state
Roundup Robot added the comment: New changeset 0933c00c2765 by Serhiy Storchaka in branch '3.4': Issue #24620: Random.setstate() now validates the value of state last element. https://hg.python.org/cpython/rev/0933c00c2765 New changeset 84070c1225c5 by Serhiy Storchaka in branch '2.7': Issue #24620: Random.setstate() now validates the value of state last element. https://hg.python.org/cpython/rev/84070c1225c5 New changeset d8229c26dd92 by Serhiy Storchaka in branch '3.5': Issue #24620: Random.setstate() now validates the value of state last element. https://hg.python.org/cpython/rev/d8229c26dd92 New changeset f6e399ae670f by Serhiy Storchaka in branch 'default': Issue #24620: Random.setstate() now validates the value of state last element. https://hg.python.org/cpython/rev/f6e399ae670f -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24620 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24704] Dereferencing a Null Pointer
Serhiy Storchaka added the comment: LGTM. -- assignee: - serhiy.storchaka nosy: +serhiy.storchaka stage: - commit review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24704 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19475] Add timespec optional flag to datetime isoformat() to choose the precision
Changes by STINNER Victor victor.stin...@gmail.com: -- title: Add microsecond flag to datetime isoformat() - Add timespec optional flag to datetime isoformat() to choose the precision ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19475 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19475] Add microsecond flag to datetime isoformat()
STINNER Victor added the comment: 'seconds' - %H:%M:%S 'us' - %H:%M:%S.%f 'us' is not consistent with the datetime module: it should be 'microseconds. datetime.datetime.now().second 50 datetime.timedelta(seconds=1) datetime.timedelta(0, 1) datetime.datetime.now().microsecond 123710 datetime.timedelta(microseconds=1) datetime.timedelta(0, 0, 1) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19475 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19475] Add microsecond flag to datetime isoformat()
Changes by Berker Peksag berker.pek...@gmail.com: -- stage: resolved - needs patch superseder: datetime: add ability to parse RFC 3339 dates and times - versions: +Python 3.6 -Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19475 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24704] Dereferencing a Null Pointer
Roundup Robot added the comment: New changeset a1a1e3fe837a by Serhiy Storchaka in branch '2.7': Issue #24704: Fixed possible NULL pointer dereferencing in the _json module https://hg.python.org/cpython/rev/a1a1e3fe837a -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24704 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24704] Dereferencing a Null Pointer
New submission from Pankaj Sharma: Hi, Reporting bugs for dereferencing a pointer m might be NULL. the respective patch have been attached ,please check and review it. thanks! -- components: Extension Modules, Library (Lib) files: Python-2.7.10-json.patch keywords: patch messages: 247262 nosy: benjamin.peterson, pankaj.s01 priority: normal severity: normal status: open title: Dereferencing a Null Pointer type: crash versions: Python 2.7 Added file: http://bugs.python.org/file40005/Python-2.7.10-json.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24704 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24302] Dead Code of Handler check in function faulthandler_fatal_error()
STINNER Victor added the comment: The check is required to fix a compiler warning. Please keep it, it doesn't bite. Maybe add a comment to explain it. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24302 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24697] Add CoroutineReturn and CoroutineExit builtin exceptions for coroutines
Nick Coghlan added the comment: My initial inclination is to agree with Stefan. At the moment, we have a slightly leaky abstraction where the exceptions used mean that coroutines still expose the fact that under the covers they're defined in terms of generator semantics. However, that leak in the abstraction reveals an underlying truth - coroutine semantics *are* derived from generator semantics, and they *do* share common underlying infrastructure. We may eventually find pragmatic reasons for wanting to plug that leak and use separately named exceptions, but unlike the situation with coroutines themselves, I'm not currently seeing a clear gain in either usability or comprehensibility as a payoff for the extra complexity. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24697 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24704] Dereferencing a Null Pointer
Serhiy Storchaka added the comment: Thank you for your contribution Pankaj. -- resolution: - fixed stage: commit review - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24704 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22737] Provide a rejected execution model and implementations for futures.
Changes by Mehdi ABAAKOUK sil...@sileht.net: -- nosy: +sileht ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22737 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
Re: what windows compiler for python 3.5?
On Fri, Jul 24, 2015 at 8:25 PM, Robin Becker ro...@reportlab.com wrote: On 24/07/2015 11:20, Robin Becker wrote: I read this https://docs.python.org/dev/whatsnew/3.5.html which incidentally marks the release as 3.6.0a0 :) but failed to find any details regarding which windows compiler is required. more searching I find this on the 3.5 b1 download page Windows users: The Windows binaries were built with Microsoft Visual Studio 2015, which is not yet officially released. (It's currently offered in Preview mode, which is akin to a beta.) It is our intention to ship Python 3.5 using VS2015, although right now VS2015's final release date is unclear. That would be correct, if you're seeking to match the python.org builds (eg if you're building an extension module). I've no idea what the compiler requirements are if you simply want to build CPython from source. ChrisA -- https://mail.python.org/mailman/listinfo/python-list
Re: ANN: decorator-4.0.0 released
Ops! Cut and paste error from an old announcement. Of course now there is a single documentation both for Python 2 and 3, so the only valid link is https://github.com/micheles/decorator/blob/4.0.0/documentation.rst -- https://mail.python.org/mailman/listinfo/python-announce-list Support the Python Software Foundation: http://www.python.org/psf/donations/
Re: what windows compiler for python 3.5?
On Fri, Jul 24, 2015 at 8:53 PM, Robin Becker ro...@reportlab.com wrote: yes I build extensions for reportlab. Unfortunately, despite our MSDN subscription to the Visual Studio stuff we have no access to the Visual Studio Version 2015. Last one in my downloads is currently 2013. Pity. Ah. You may well be somewhat out of luck for the moment, then; I've no idea what status is during the betas. Once Python 3.5 is released, VS 2015 should also be available, or else the official compiler for CPython 3.5 will probably be changed. In the meantime, you could possibly ask on python-dev; Steve Dower of Microsoft hangs out there, and he's the one who's driving the compiler choice - he may be able to advise as to where to get the prerelease compiler. ChrisA -- https://mail.python.org/mailman/listinfo/python-list
Re: problem with selecting remote procedure calls
- Original Message - From: Irmen de Jong irmen.nos...@xs4all.nl Eric, if you're concerned about performance, Pyro4 (the source distribution) comes with several examples that do simple performance related tests. You could run these and see what figures you get on your setup to see if it's anywhere acceptable, before even building anything with Pyro yourself. sounds like a plan. I managed to get around the initial problem I had because apparently the natlink extension for NaturallySpeaking is semi-persistent. Sometimes the statically created RPC connection would work, other times it wouldn't. The current workaround is to place the RPC connection initialization in the code that activates the grammar. blockquote Interesting project btw. /blockquote it has been a long time since a project like this has made me smile ear-to-ear. For example, yesterday I had to create twelve open VPN configuration files and key pairs. With broken hands like mine, it would be an extremely painful hour to two hours to entering the data over and over again even with easy RSA. I was able to complete this task in about 10 to 15 minutes. Now that's what accessibility is all about. I believe my experiment shows that a two dimensional grid with names for both rows and columns can allow a speech recognition dependent user much faster data entry than one could have with straight speech recognition. With some enhancements, it should be possible to use this technique to remember something on the fly. ideally I'd like to take a tool like treesheets , put some Python power underneath the grid, and explore how a grid tool can help accessibility but I'd need a volunteer to make that happen. -- https://mail.python.org/mailman/listinfo/python-list
what windows compiler for python 3.5?
I read this https://docs.python.org/dev/whatsnew/3.5.html which incidentally marks the release as 3.6.0a0 :) but failed to find any details regarding which windows compiler is required. -- Robin Becker -- https://mail.python.org/mailman/listinfo/python-list
ANN: decorator-4.0.0 released
The decorator module is over ten years old, but still alive and kicking. It is used by several frameworks and has been stable for a long time. It is your best option if you want to preserve the signature of decorated functions in a consistent way across Python releases. Version 4.0 is fully compatible with the past, except for one thing: support for Python 2.4 and 2.5 has been dropped and now there is an unified code base for Python 2.6, 2.7, 3.0, 3.1, 3.2, 3.3, 3.4, 3.5. You can download the new release from PyPI with the usual $ pip install decorator The source code and the documentation are on GitHub: https://github.com/micheles/decorator/blob/4.0.0/documentation.rst (for Python 2.X) https://github.com/micheles/decorator/blob/4.0.0/documentation3.rst (for Python 3.X) What's new - Since now there is a single manual for all Python versions, I took the occasion for overhauling the documentation. Therefore, even if you are an old time user, you may want to read the docs again, since several examples have been improved. The packaging has been improved and I am distributing the code in wheel format too. The integration with setuptools has been improved and now you can use ``python setup.py test`` to run the tests. A new utility function ``decorate(func, caller)`` has been added, doing the same job that in the past was done by ``decorator(caller, func)``. The old functionality is still there for compatibility sake, but it is deprecated and not documented anymore. Apart from that, there is a new experimental feature. The decorator module now includes an implementation of generic (multiple dispatch) functions. The API is designed to mimic the one of ``functools.singledispatch`` (introduced in Python 3.4) but the implementation is much simpler; moreover all the decorators involved preserve the signature of the decorated functions. Enjoy! Michele Simionato -- https://mail.python.org/mailman/listinfo/python-announce-list Support the Python Software Foundation: http://www.python.org/psf/donations/
Re: what windows compiler for python 3.5?
On 24/07/2015 11:20, Robin Becker wrote: I read this https://docs.python.org/dev/whatsnew/3.5.html which incidentally marks the release as 3.6.0a0 :) but failed to find any details regarding which windows compiler is required. more searching I find this on the 3.5 b1 download page Windows users: The Windows binaries were built with Microsoft Visual Studio 2015, which is not yet officially released. (It's currently offered in Preview mode, which is akin to a beta.) It is our intention to ship Python 3.5 using VS2015, although right now VS2015's final release date is unclear. -- Robin Becker -- https://mail.python.org/mailman/listinfo/python-list
[issue23496] Steps for Android Native Build of Python 3.4.2
Cyd Haselton added the comment: I'm compiling for ARM, not ARM64, on an armv7 device. On July 23, 2015 7:10:35 PM CDT, Russell Keith-Magee rep...@bugs.python.org wrote: Russell Keith-Magee added the comment: What hardware architecture are you compiling for? If it's ARM64, and you're not using a trunk version of libffi, that segfault in test_ctypes is to be expected. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23496 ___ -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23496 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
Re: what windows compiler for python 3.5?
On 24/07/2015 11:38, Chris Angelico wrote: On Fri, Jul 24, 2015 at 8:25 PM, Robin Becker ro...@reportlab.com wrote: ... more searching I find this on the 3.5 b1 download page Windows users: The Windows binaries were built with Microsoft Visual Studio 2015, which is not yet officially released. (It's currently offered in Preview mode, which is akin to a beta.) It is our intention to ship Python 3.5 using VS2015, although right now VS2015's final release date is unclear. That would be correct, if you're seeking to match the python.org builds (eg if you're building an extension module). I've no idea what the compiler requirements are if you simply want to build CPython from source. ... yes I build extensions for reportlab. Unfortunately, despite our MSDN subscription to the Visual Studio stuff we have no access to the Visual Studio Version 2015. Last one in my downloads is currently 2013. Pity. -- Robin Becker -- https://mail.python.org/mailman/listinfo/python-list
Re: what windows compiler for python 3.5?
On 24/07/2015 11:53, Robin Becker wrote: On 24/07/2015 11:38, Chris Angelico wrote: On Fri, Jul 24, 2015 at 8:25 PM, Robin Becker ro...@reportlab.com wrote: ... more searching I find this on the 3.5 b1 download page Windows users: The Windows binaries were built with Microsoft Visual Studio 2015, which is not yet officially released. (It's currently offered in Preview mode, which is akin to a beta.) It is our intention to ship Python 3.5 using VS2015, although right now VS2015's final release date is unclear. That would be correct, if you're seeking to match the python.org builds (eg if you're building an extension module). I've no idea what the compiler requirements are if you simply want to build CPython from source. ... yes I build extensions for reportlab. Unfortunately, despite our MSDN subscription to the Visual Studio stuff we have no access to the Visual Studio Version 2015. Last one in my downloads is currently 2013. Pity. I'm successfully building with Visual Studio Version 2015 Community Edition RC. It's a good job that modern drives have so much space as it takes up *EIGHT GIG* of space, so the download and install takes quite a time. I'm aware that Steve Dower is trying to get a much smaller install made available for those who just want to build from the command line. -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence -- https://mail.python.org/mailman/listinfo/python-list
[issue24699] TemporaryDirectory is cleaned up twice
Robert Collins added the comment: I think you may need to instrument TemporaryDirectory._cleanup to be sure, but it sounds like its being run twice. now, you're not using it like a context manager (at least as far as your code shows), so it must be happening from the weakref. https://docs.python.org/3/library/weakref.html#weakref.finalize is the relevant docs for that. The code looks ok as long as finalize triggers once and only once. Perhaps it should call the finalize() rather than manually calling _cleanup, in cleanup, but I don't see that that should make much difference. I would have thought it a deliberate attempt to avoid some bit of code (e.g. the resource warning), but since its a shared helper, thats not it. And finalize._exitfunc looks entirely sane to me. So - I suggest adding a call to print_stack in TemporaryDirectory._cleanup, to see the entire stack, and then hopefully we'll see two such printouts when this error happens, and be able to pinpoint how it's being called twice. -- nosy: +rbcollins ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24699 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23906] poplib maxline behaviour may be wrong
Chris Smowton added the comment: Created #24706 to describe the unflushed connection problem. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23906 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15657] Error in Python 3 docs for PyMethodDef
Serhiy Storchaka added the comment: In 3.5 it would be better to make METH_KEYWORDS == METH_VARARGS | METH_KEYWORDS. Current definition: #define METH_VARARGS 0x0001 #define METH_KEYWORDS 0x0002 Should be: #define METH_VARARGS 0x0001 #define METH_KEYWORDS 0x0003 But it can't be applied in maintained releases. In 3.4 and 2.7 we should add explicit test as in the patch or change the documentation. If fix the code rather than documentation in 3.4 and 2.7, then the versionchanged directive in 3.5 shouldn't be added. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15657 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23906] poplib maxline behaviour may be wrong
Chris Smowton added the comment: Why wouldn't that fix the problem? The issue is poplib not tolerating server behaviour seen in the wild, and if you limit by message size not line length you shouldn't see this problem? (Side note, I'm surprised not to have been emailed when you replied, any idea what I'm missing?) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23906 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10708] Misc/porting should be folded into the development FAQ or the devguide
Carol Willing added the comment: Thanks Berker for the commit review. Paul Anton Letnes, thanks for your contribution to the devguide. Nicely done. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10708 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
Re: OT Re: Math-embarrassment results in CS [was: Should non-security 2.7 bugs be fixed?]
On 2015-07-24, Paul Rubin no.email@nospam.invalid wrote: Grant Edwards invalid@invalid.invalid writes: You can always pick out the topologist at a conference: he's the one trying to dunk his coffee cup in his doughnut. Did you hear about the idiot topologist? He couldn't tell his butt from a hole in the ground, but he *could* tell his butt from two holes in the ground. Wow. Now I know _two_ topologist jokes. The girls are going to be impressed! -- Grant Edwards grant.b.edwardsYow! I just got my PRINCE at bumper sticker ... But now gmail.comI can't remember WHO he is ... -- https://mail.python.org/mailman/listinfo/python-list
[issue10708] Misc/porting should be folded into the development FAQ or the devguide
Roundup Robot added the comment: New changeset d6e10dfbeab1 by Berker Peksag in branch 'default': Issue #10708: Add a FAQ entry about porting Python to a new platform. https://hg.python.org/devguide/rev/d6e10dfbeab1 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10708 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24707] Assertion failed in pymonotonic_new
New submission from Berker Peksag: From http://buildbot.python.org/all/builders/AMD64%20Debian%20root%203.x/builds/2436: python: Python/pytime.c:633: pymonotonic_new: Assertion `!last_set || last = *tp' failed. Fatal Python error: Aborted Full log is here: http://buildbot.python.org/all/builders/AMD64%20Debian%20root%203.x/builds/2436/steps/test/logs/stdio -- components: Interpreter Core messages: 247288 nosy: berker.peksag, haypo priority: normal severity: normal status: open title: Assertion failed in pymonotonic_new type: behavior versions: Python 3.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24707 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
Re: OT Re: Math-embarrassment results in CS [was: Should non-security 2.7 bugs be fixed?]
On 24/07/2015 15:13, Grant Edwards wrote: On 2015-07-24, Paul Rubin no.email@nospam.invalid wrote: Grant Edwards invalid@invalid.invalid writes: You can always pick out the topologist at a conference: he's the one trying to dunk his coffee cup in his doughnut. Did you hear about the idiot topologist? He couldn't tell his butt from a hole in the ground, but he *could* tell his butt from two holes in the ground. Wow. Now I know _two_ topologist jokes. The girls are going to be impressed! Here comes the third. Q: How many topologists does it take to change a light bulb? A: It really doesn't matter, since they'd rather knot. https://www.ocf.berkeley.edu/~mbarrien/jokes/lightblb.txt -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence -- https://mail.python.org/mailman/listinfo/python-list
ANN: Bokeh 0.9.2 released
Hi all, On behalf of the Bokeh team, I am excited to announce the release of version 0.9.2 of Bokeh, an interactive web plotting library for Python... and other languages! This release focused mainly in provide several bugfixes over our last 0.9.1 release bugs. Additionally, we also updated the MPL compatibility layer. You should expect some more point releases before 0.10.0 which is in active development in a separate branch. Some of the highlights are: * Several nan-related fixes including the slow rendering of plots * Removed some unused dependencies * Fixes in our automated release process * Fixed the patchs vanishing on selection * More control over ticks and gridlines * MPL compatibility updated * Several examples updated See the CHANGELOG https://github.com/bokeh/bokeh/blob/master/CHANGELOG for full details. If you are using Anaconda/miniconda, you can install it with conda: *conda install bokeh* or directly from our Binstar main channel with: *conda install -c bokeh bokeh* Alternatively, you can also install it with pip: *pip install bokeh* If you want to use Bokeh in standalone Javascript applications, BokehJS is available by CDN at: * http://cdn.pydata.org/bokeh/release/bokeh-0.9.2.min.js * http://cdn.pydata.org/bokeh/release/bokeh-0.9.2.min.css Additionally, BokehJS is also installable with the Node Package Manager at https://www.npmjs.com/package/bokehjs Issues, enhancement requests, and pull requests can be made on the Bokeh Github page: https://github.com/bokeh/bokeh Questions can be directed to the Bokeh mailing list: bo...@continuum.io Cheers. -- *Damián Avila* *Software Developer* *@damian_avila* *dav...@continuum.io dav...@continuum.io* *+5492215345134 | cell (ARG)* -- https://mail.python.org/mailman/listinfo/python-announce-list Support the Python Software Foundation: http://www.python.org/psf/donations/
[issue24695] Don't print traceback header if traceback is None in TracebackException
Roundup Robot added the comment: New changeset b45077269aaa by Berker Peksag in branch '3.5': Issue #24695: Fix a regression in traceback.print_exception() https://hg.python.org/cpython/rev/b45077269aaa New changeset 2825c87d3f72 by Berker Peksag in branch 'default': Issue #24695: Fix a regression in traceback.print_exception() https://hg.python.org/cpython/rev/2825c87d3f72 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24695 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24695] Don't print traceback header if traceback is None in TracebackException
Berker Peksag added the comment: Fixed in 3.5 and default branches. Thank you for your review, Raymond. -- resolution: - fixed stage: patch review - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24695 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
Re: OT Re: Math-embarrassment results in CS [was: Should non-security 2.7 bugs be fixed?]
Grant Edwards invalid@invalid.invalid writes: Did you hear about the idiot topologist? He couldn't tell his butt from a hole in the ground, but he *could* tell his butt from two holes in the ground. Wow. Now I know _two_ topologist jokes. The girls are going to be impressed! I got it from here: http://mathoverflow.net/questions/1083/do-good-math-jokes-exist -- https://mail.python.org/mailman/listinfo/python-list
register cleanup handler
I have code like: if (condition): do_something_needing_cleanup code_executed_unconditionally cleanup has to happen here if required, even if above did return, continue or exception Now, how can I make sure cleanup happens? Actually, what I really would like, is: if (condition): do_something_needing_cleanup register_scoped_cleanup (cleanup_fnc) code_executed_unconditionally So, any thoughts/hopes of python being able to do something like this? I know we have try/finally, but I don't think that helps here, because code_executed_unconditionally couldn't be inside the try. Or am I missing something obvious? -- https://mail.python.org/mailman/listinfo/python-list
Re: register cleanup handler
In a message of Fri, 24 Jul 2015 10:57:30 -0400, Neal Becker writes: I know we have try/finally, but I don't think that helps here, because code_executed_unconditionally couldn't be inside the try. Or am I missing something obvious? I think so. Either that or I am badly misunderstanding you. What is wrong with try: if (condition): do_something_needing_cleanup else: do_something_else code_executed_unconditionally finally: do_cleanup Laura -- https://mail.python.org/mailman/listinfo/python-list
Re: register cleanup handler
Laura Creighton wrote: In a message of Fri, 24 Jul 2015 10:57:30 -0400, Neal Becker writes: I know we have try/finally, but I don't think that helps here, because code_executed_unconditionally couldn't be inside the try. Or am I missing something obvious? I think so. Either that or I am badly misunderstanding you. What is wrong with try: if (condition): do_something_needing_cleanup else: do_something_else code_executed_unconditionally finally: do_cleanup Laura do_cleanup has do be done only if do_something_needing_cleanup was done first. This would work, but is not very elegant. I hope for a better way. need_cleanup = False try: if (condition): do_something_needing_cleanup need_cleanup = True else: do_something_else code_executed_unconditionally finally: if need_cleanup: do_cleanup -- https://mail.python.org/mailman/listinfo/python-list
Re: register cleanup handler
On Fri, 24 Jul 2015 12:01:58 -0400, Neal Becker wrote: This would work, but is not very elegant. I hope for a better way. need_cleanup = False try: if (condition): do_something_needing_cleanup need_cleanup = True else: do_something_else code_executed_unconditionally finally: if need_cleanup: do_cleanup if condition: try: do_something_needing_cleanup() code_executed_unconditionally() finally: do_cleanup() else: do_something_else() code_executed_unconditionally() -- Rob Gaddi, Highland Technology -- www.highlandtechnology.com Email address domain is currently out of order. See above to fix. -- https://mail.python.org/mailman/listinfo/python-list
Re: 42**1000000 is CPU time free
On 24/07/2015 21:54, candide wrote: Of course, computing 42**100 is not free: # -- import time a=time.clock() N=100 42**N b=time.clock() print(CPU TIME :, b - a) # -- ~~ CPU TIME : 2.37 real0m2.412s user0m2.388s sys 0m0.016s ~~ So please, explain the following: # -- import time a=time.clock() 42**100 b=time.clock() print(CPU TIME :, b - a) # -- ~~ CPU TIME : 0.0 real0m2.410s user0m2.400s sys 0m0.008s ~~ (focus on the CPU TIME!!) I suggest that you use the dis module to compare the code generated for the snippet using 'N' and that using the constant 100. -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence -- https://mail.python.org/mailman/listinfo/python-list
Re: 42**1000000 is CPU time free
On Friday 24 Jul 2015 22:54 CEST, candide wrote: Of course, computing 42**100 is not free: # -- import time a=time.clock() N=100 42**N b=time.clock() print(CPU TIME :, b - a) # -- ~~ CPU TIME : 2.37 real0m2.412s user0m2.388s sys 0m0.016s ~~ So please, explain the following: # -- import time a=time.clock() 42**100 b=time.clock() print(CPU TIME :, b - a) # -- ~~ CPU TIME : 0.0 real0m2.410s user0m2.400s sys 0m0.008s ~~ (focus on the CPU TIME!!) I cannot reproduce this. The first gives: CPU TIME : 0.62627899 and the second: CPU TIME : 0.6343649 -- Cecil Westerhof Senior Software Engineer LinkedIn: http://www.linkedin.com/in/cecilwesterhof -- https://mail.python.org/mailman/listinfo/python-list
Re: About this mailing list
On 24/07/2015 21:27, Stéphane Wirtel wrote: Hi all, This mail is just to check if you receive it because I think I have a problem with this list. Could you reply me to check it works ? Thank you -- Stéphane Wirtel - http://wirtel.be - @matrixise No, sorry :) -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence -- https://mail.python.org/mailman/listinfo/python-list
Re: password authentication failed (SOLVED)
On 07/22/2015 04:44 PM, Chris Angelico wrote: On Thu, Jul 23, 2015 at 9:35 AM, Gary Roach gary719_li...@verizon.net wrote: At this point, I'm confused about a few things. Does the postgresql server and my archivedb reside globally or are they inside my archivedb virtual environment. I think globally. Your virtual environment is a Python construct only. That's where Python packages get installed, so if you don't activate it, you might not be able to use psycopg2, but as you surmise, the database itself is elsewhere on the system. To get pgAdmin3 to work, I have to have it set so that it logs in as gary ( no choice with this) and set group to root. Then in application advanced options set run as different user to root. This assumes that you are using a KDE4 desktop and have these option by right clicking the icons. pgAdmin3 data: Server Group Server(1) archivedb |_ Host name - 127.0.0.1 |_ username - archive |_ connected - no Archivedb requires a password to go deeper and takes the xx password that is in the django settings.py file. This opens up access to archivedb and lists archivedb Schema(1) public tables(10). At this point I found that all of the sequences and all of the tables are owned by root. This is probably the root (no pun intended) cause. Now what do I do about it. I'm not sure how this came about so don't know how to fix it. Ah, all owned by root. Okay! I've never actually tried this, but you might be able to directly reassign a bunch of things: http://www.postgresql.org/docs/9.4/static/sql-reassign-owned.html Make sure you have a backup. Reassigning root in this way is quite possibly a bad idea. If there aren't too many tables, you could use ALTER TABLE: http://www.postgresql.org/docs/9.4/static/sql-altertable.html ALTER TABLE tablename OWNER TO archives; But in theory, you shouldn't need to worry about owners at all - just make sure permissions are all assigned. Which you have done. So it's entirely possible none of this will change anything. :( Worst case, you may need to do an SQL dump of the entire database, then check the export, make sure ownership is correct, and reimport into a brand new database. Tedious, but it's certain to fix the problem. ChrisA pgAdmin3 showed two potential problems. The first connection listed in pg_hba.conf was: local all postgres radius. I removed this line so that the first line would be: local all all trust. Since all connections will be handled through Django? there should not be a problem with keeping loose security at this point. The second problem was that all fo the sequence and table files in archivedb showed the owner to be root. I changed them all to archive - the user listed in Django's settings.py file. Python manage.py migrate now works with no errors. Thank you for your help. I found an O'Reilly book - PosgreSQL Up Running, 2nd Edition, by Regina Obe and Leo Hsu that is very good. If I had read the book first, I would have avoided some of these problems. One of the things that I have found very frustrating is that most of the documentation is too compartmentalized. If an author is writing about Django they get sloppy with the database setup and visa versa. It now seems to me that: Postgresql should be set up first, the setup being completely disconnected from the Python / Django project All communication with the database will pass through Django with the exception of admin maintenance. Please correct me if I'm wrong. Gary R. -- https://mail.python.org/mailman/listinfo/python-list
[issue24685] collections.OrderedDict collaborative subclassing
Eric Frederich added the comment: I understand that in the general case you cannot just swap the order around and get the same behaviour. This LoggingDict just prints some stuff to the screen and delegates to super and so I believe it should work wherever it is placed in a cooperative hierarchy. Do you agree? Now, I understand that OrderedDict is not cooperative. You stated that this is a design decision and I respect that choice, but you also stated that classes can be made to be cooperative by creating a wrapper. The reason I re-opened this bug is because I fail to see a way in which to create such a wrapper for Python3. Do you believe that it should be possible to create a cooperative wrapper? If it is possible (and its just my inability to create one) then I have no issue and the bug should be closed. If it is not possible, then perhaps it could be noted somewhere that its not cooperative and impossible to make it cooperative and it should be listed last when using multiple inheritance. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24685 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24695] Don't print traceback header if traceback is None in TracebackException
Adam Bartoš added the comment: Thank you all for a quick reaction. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24695 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24706] poplib: Line too long error causes knock-on failure to retrieve all subsequent messages
New submission from Chris Smowton: As mentioned in #23906, when poplib bails from receiving a message with a 'line too long' error it neither flushes nor re-establishes the TCP connection. This means that subsequent commands fail because instead of the expected response we receive part of the unflushed data from the message that triggered the original error. -- components: Library (Lib) messages: 247283 nosy: Chris Smowton priority: normal severity: normal status: open title: poplib: Line too long error causes knock-on failure to retrieve all subsequent messages versions: Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24706 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10708] Misc/porting should be folded into the development FAQ or the devguide
Berker Peksag added the comment: Applied it with minor changes. Thanks for the great patch, Paul Anton Letnes. -- resolution: - fixed stage: commit review - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10708 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24379] operator.subscript
Joe Jevnik added the comment: Any more comments? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24379 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
Re: Which GUI?
On Friday 24 Jul 2015 20:37 CEST, Christopher Mullins wrote: You might checkout pyqtgraph. I think a ton of the examples will be relevant to your use case. Top-posting is (rightly) frowned upon in this group. Could you use inline posting next time? A3: Please. Q3: Should I avoid top posting on this mailing list? A2: Because, by reversing the order of a conversation, it leaves the reader without much context, and makes them read a message in an unnatural order. Q2: Why is top posting irritating? A1: It is the practice of putting your reply to a message before the quoted message, instead of after the (trimmed) message. Q1: What is top posting? On Fri, Jul 24, 2015 at 1:31 PM, Paulo da Silva p_s_d_a_s_i_l_v_a...@netcabo.pt wrote: Hi all! I am about to write an application (python3 in linux) that needs: 1. Display time series graphics dynamically changed as the application runs, i.e. the graphics should reflect some internal variables states. 2. The same but for some network like diagrams. Basically nodes and connections (straight lines). Nodes can have different colors depending on their activity levels and also, together with connection lines, may be created and deleted dynamically. 3. Interaction with the user (not sure yet, here). 4. Some modules may need to be moved to C++ in case of lack of enough speed. So, the possibility of the GUI libs be used with C++ may be an advantage. Anyway I can always stay in Python and write a C++ extension. 5. Several multi processor segments. 6. For now single user - possible but unlikely multi-user in the future. Which technology is better? matplotlib? tkinter? wxwidgets? qt? Web: ajax (I don't know much about this - need to learn), using cherrypy or django? Any other? Thanks for any help or comments. -- https://mail.python.org/mailman/listinfo/python-list -- Cecil Westerhof Senior Software Engineer LinkedIn: http://www.linkedin.com/in/cecilwesterhof -- https://mail.python.org/mailman/listinfo/python-list
About this mailing list
Hi all, This mail is just to check if you receive it because I think I have a problem with this list. Could you reply me to check it works ? Thank you -- Stéphane Wirtel - http://wirtel.be - @matrixise -- https://mail.python.org/mailman/listinfo/python-list
42**1000000 is CPU time free
Of course, computing 42**100 is not free: # -- import time a=time.clock() N=100 42**N b=time.clock() print(CPU TIME :, b - a) # -- ~~ CPU TIME : 2.37 real0m2.412s user0m2.388s sys 0m0.016s ~~ So please, explain the following: # -- import time a=time.clock() 42**100 b=time.clock() print(CPU TIME :, b - a) # -- ~~ CPU TIME : 0.0 real0m2.410s user0m2.400s sys 0m0.008s ~~ (focus on the CPU TIME!!) -- https://mail.python.org/mailman/listinfo/python-list
Re: About this mailing list
Blast ;) On 24 Jul 2015, at 22:38, Mark Lawrence wrote: On 24/07/2015 21:27, Stéphane Wirtel wrote: Hi all, This mail is just to check if you receive it because I think I have a problem with this list. Could you reply me to check it works ? Thank you -- Stéphane Wirtel - http://wirtel.be - @matrixise No, sorry :) -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence -- https://mail.python.org/mailman/listinfo/python-list -- Stéphane Wirtel - http://wirtel.be - @matrixise -- https://mail.python.org/mailman/listinfo/python-list
Re: 42**1000000 is CPU time free
On Fri, Jul 24, 2015 at 3:54 PM, candide c.cand...@laposte.net wrote: Of course, computing 42**100 is not free: So please, explain the following: (focus on the CPU TIME!!) In your second example, the peephole optimizer gets hold of it and does the calculation at compile time: Python 3.4.3 (v3.4.3:9b73f1c3e601, Feb 23 2015, 02:52:03) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin Type help, copyright, credits or license for more information. from dis import dis def with_var(): N = 100; return 42**N ... def no_var(): return 42**100 ... dis(with_var) 1 0 LOAD_CONST 1 (100) 3 STORE_FAST 0 (N) 6 LOAD_CONST 2 (42) 9 LOAD_FAST0 (N) 12 BINARY_POWER 13 RETURN_VALUE dis(no_var) 1 0 LOAD_CONST 3 (211314374101136073653004404552311399169887833071358006126447793439156491987549688215057732151811172029315247932158994879668553186145824710950394684126712037376) 3 RETURN_VALUE -- Zach -- https://mail.python.org/mailman/listinfo/python-list
Re: 42**1000000 is CPU time free
As you are doing an operation on a literal, Python is computing the value at import time, which occurs before your time.clock() calls run. Basically, what you really wrote in your code is: import time a = time.clock() 42000...00 # Replace the ... with zeros until you have the actual value. b = time.clock() The computation time is still being shown in the real and user times reported by the external call. Similarly, if you were to put time.clock() calls around the import statement, you would see the time there, for the first import statement (Python caches imports, so they generally only run once per instance). The first example can measure the time as you are using a variable, which bypasses Python's literal optimization. Chris On Fri, Jul 24, 2015 at 1:54 PM, candide c.cand...@laposte.net wrote: Of course, computing 42**100 is not free: # -- import time a=time.clock() N=100 42**N b=time.clock() print(CPU TIME :, b - a) # -- ~~ CPU TIME : 2.37 real0m2.412s user0m2.388s sys 0m0.016s ~~ So please, explain the following: # -- import time a=time.clock() 42**100 b=time.clock() print(CPU TIME :, b - a) # -- ~~ CPU TIME : 0.0 real0m2.410s user0m2.400s sys 0m0.008s ~~ (focus on the CPU TIME!!) -- https://mail.python.org/mailman/listinfo/python-list -- https://mail.python.org/mailman/listinfo/python-list
[issue24685] collections.OrderedDict collaborative subclassing
Eric Frederich added the comment: Éric (Araujo), Combinding defaultdict and OrderedDict is a little easier since one of them (defaultdict) has special behavior on getitem while the other (OrderedDict) has special behavior on setitem. I played with mixing those two myself and saw some issues and found that I had to explicitly call __init__ on both base classes to get them primed properly. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24685 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24685] collections.OrderedDict collaborative subclassing
Éric Araujo added the comment: FWIW I once helped a friend combine OrderedDict and defaultdict: https://gist.github.com/merwok/11268759 The behavior can be surprising if we don’t know what Raymond said about design choices in OrderedDict, but it was not hard (in the default+ordered case) to work around. -- nosy: +eric.araujo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24685 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24707] Assertion failed in pymonotonic_new
Chris Angelico added the comment: The host is running Debian Jessie (newer than the Debian Wheezy of the VM). Linux sikorsky 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt9-3~deb8u1 (2015-04-24) x86_64 GNU/Linux What info are you after re hardware virtualization? VirtualBox 4.3.28 r100309 manages the VM. Any other information that would help? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24707 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20366] SQLite FTS (full text search)
Changes by Mark Summerfield m...@qtrac.eu: -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20366 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24707] Assertion failed in pymonotonic_new
Changes by STINNER Victor victor.stin...@gmail.com: -- nosy: +Rosuav ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24707 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
How may I learn Python Web Frameworks
Dear Group, I am slightly new in Python Web Frameworks. I could learn bit of Django, Flask and Bottle. But I am looking for a good web based tutorial like Python or NLTK. Somehow, I did not find documentations for web frameworks are very good, one has to do lot of experiments even to learn basic things. I am looking for a good book like Dive into Python or some good web based tutorials. I tried to search but unfortunately could not find. I am using Python2.7+ on Windows 7. If any one of the members may kindly suggest. Regards, Subhabrata Banerjee. -- https://mail.python.org/mailman/listinfo/python-list
Re: How may I learn Python Web Frameworks
web2py http://www.web2py.com/ has extensive tutorials, videos, and a book. Laura -- https://mail.python.org/mailman/listinfo/python-list
[issue24707] Assertion failed in pymonotonic_new
STINNER Victor added the comment: This buildbot runs in a VM. I need more information on the host (machine running the VM): OS, OS version, kernel version, hardware virtualization?, version of qemu/kvm?, etc. It's probably a bug in the virtualization. In the PEP 418, we decided to _not_ handle this error (monotonic clock running backward). Maybe we should document the bug and remove the assertion (it only exists when Python is compiled in debug mode). Note: I already saw this assertion error on the same buildbot. http://buildbot.python.org/all/builders/AMD64%20Debian%20root%203.x/builds/2436/steps/test/logs/stdio == CPython 3.6.0a0 (default:2825c87d3f72, Jul 25 2015, 01:29:19) [GCC 4.7.2] == Linux-3.2.0-4-amd64-x86_64-with-debian-7.7 little-endian == hash algorithm: siphash24 64bit == /root/buildarea/3.x.angelico-debian-amd64/build/build/test_python_27852 http://buildbot.python.org/all/buildslaves/angelico-debian-amd64 Slave information * Buildbot-Slave 0.8.6p1 * Debian AMD64 running tests as root - VM with two Intel i5 cores -- nosy: +Chris ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24707 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24707] Assertion failed in pymonotonic_new
Changes by STINNER Victor victor.stin...@gmail.com: -- nosy: -Chris ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24707 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24613] array.fromstring Use After Free
John Leitch added the comment: I understand the desire for consistency and I will create such a patch when I get some slack space (hopefully tonight), but I believe it will constitute a breaking change; in 2.7, passing self to array.fromstring works as expected most of the time. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24613 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
Which GUI?
Hi all! I am about to write an application (python3 in linux) that needs: 1. Display time series graphics dynamically changed as the application runs, i.e. the graphics should reflect some internal variables states. 2. The same but for some network like diagrams. Basically nodes and connections (straight lines). Nodes can have different colors depending on their activity levels and also, together with connection lines, may be created and deleted dynamically. 3. Interaction with the user (not sure yet, here). 4. Some modules may need to be moved to C++ in case of lack of enough speed. So, the possibility of the GUI libs be used with C++ may be an advantage. Anyway I can always stay in Python and write a C++ extension. 5. Several multi processor segments. 6. For now single user - possible but unlikely multi-user in the future. Which technology is better? matplotlib? tkinter? wxwidgets? qt? Web: ajax (I don't know much about this - need to learn), using cherrypy or django? Any other? Thanks for any help or comments. -- https://mail.python.org/mailman/listinfo/python-list
[issue23906] poplib maxline behaviour may be wrong
R. David Murray added the comment: Sorry, I was unclear. In order to implement maximum message size we have to do a bit more to the logic than just use the max message size as the readline limit. But it does seem like the right approach to me. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23906 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24708] strop.replace Integer Overflow
New submission from John Leitch: The Python strop.replace() method suffers from an integer overflow that can be exploited to write outside the bounds of the string buffer and potentially achieve code execution. The issue can be triggered by performing a large substitution that overflows the arithmetic used in mymemreplace() to calculate the size of the new string: static char * mymemreplace(const char *str, Py_ssize_t len, /* input string */ const char *pat, Py_ssize_t pat_len, /* pattern string to find */ const char *sub, Py_ssize_t sub_len, /* substitution string */ Py_ssize_t count, /* number of replacements */ Py_ssize_t *out_len) { [...] new_len = len + nfound*(sub_len - pat_len); Unchecked arithmetic can overflow here. if (new_len == 0) { /* Have to allocate something for the caller to free(). */ out_s = (char *)PyMem_MALLOC(1); if (out_s == NULL) return NULL; out_s[0] = '\0'; } else { assert(new_len 0); new_s = (char *)PyMem_MALLOC(new_len); An allocation is performed using overflowed value. if (new_s == NULL) return NULL; out_s = new_s; for (; count 0 len 0; --count) { Memory is copied to new_s using len, which can be greater than the overflowed new_len value. /* find index of next instance of pattern */ offset = mymemfind(str, len, pat, pat_len); if (offset == -1) break; /* copy non matching part of input string */ memcpy(new_s, str, offset); str += offset + pat_len; len -= offset + pat_len; /* copy substitute into the output string */ new_s += offset; memcpy(new_s, sub, sub_len); new_s += sub_len; } /* copy any remaining values into output string */ if (len 0) memcpy(new_s, str, len); } [...] } The following script demonstrates the issue: import strop strop.replace(\x75*0xEAAA,\x75,AA*0x) When run under a debugger, it produces the following exception: 0:000 r eax=01e4cfd0 ebx=5708fc94 ecx=3c7a edx= esi=01e3dde8 edi=57096000 eip=7026ae7a esp=0027fc98 ebp=0027fca0 iopl=0 nv up ei pl nz ac pe nc cs=0023 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00010216 MSVCR90!memcpy+0x5a: 7026ae7a f3a5rep movs dword ptr es:[edi],dword ptr [esi] 0:000 db edi-0x10 57095ff0 41 41 41 41 41 41 41 41-41 41 41 41 41 41 41 41 57096000 ?? ?? ?? ?? ?? ?? ?? ??-?? ?? ?? ?? ?? ?? ?? ?? 57096010 ?? ?? ?? ?? ?? ?? ?? ??-?? ?? ?? ?? ?? ?? ?? ?? 57096020 ?? ?? ?? ?? ?? ?? ?? ??-?? ?? ?? ?? ?? ?? ?? ?? 57096030 ?? ?? ?? ?? ?? ?? ?? ??-?? ?? ?? ?? ?? ?? ?? ?? 57096040 ?? ?? ?? ?? ?? ?? ?? ??-?? ?? ?? ?? ?? ?? ?? ?? 57096050 ?? ?? ?? ?? ?? ?? ?? ??-?? ?? ?? ?? ?? ?? ?? ?? 57096060 ?? ?? ?? ?? ?? ?? ?? ??-?? ?? ?? ?? ?? ?? ?? ?? 0:000 db esi 01e3dde8 41 41 41 41 41 41 41 41-41 41 41 41 41 41 41 41 01e3ddf8 41 41 41 41 41 41 41 41-41 41 41 41 41 41 41 41 01e3de08 41 41 41 41 41 41 41 41-41 41 41 41 41 41 41 41 01e3de18 41 41 41 41 41 41 41 41-41 41 41 41 41 41 41 41 01e3de28 41 41 41 41 41 41 41 41-41 41 41 41 41 41 41 41 01e3de38 41 41 41 41 41 41 41 41-41 41 41 41 41 41 41 41 01e3de48 41 41 41 41 41 41 41 41-41 41 41 41 41 41 41 41 01e3de58 41 41 41 41 41 41 41 41-41 41 41 41 41 41 41 41 0:000 k ChildEBP RetAddr 0027fca0 1e056efc MSVCR90!memcpy+0x5a [f:\dd\vctools\crt_bld\SELF_X86\crt\src\INTEL\memcpy.asm @ 188] 0027fcd0 1e05700b python27!mymemreplace+0xfc [c:\build27\cpython\modules\stropmodule.c @ 1139] 0027fd18 1e0aaed7 python27!strop_replace+0xbb [c:\build27\cpython\modules\stropmodule.c @ 1185] 0027fd30 1e0edcc0 python27!PyCFunction_Call+0x47 [c:\build27\cpython\objects\methodobject.c @ 81] 0027fd5c 1e0f012a python27!call_function+0x2b0 [c:\build27\cpython\python\ceval.c @ 4035] 0027fdcc 1e0f1100 python27!PyEval_EvalFrameEx+0x239a [c:\build27\cpython\python\ceval.c @ 2684] 0027fe00 1e0f1162 python27!PyEval_EvalCodeEx+0x690 [c:\build27\cpython\python\ceval.c @ 3267] 0027fe2c 1e1170ca python27!PyEval_EvalCode+0x22 [c:\build27\cpython\python\ceval.c @ 674] 0027fe44 1e118215 python27!run_mod+0x2a [c:\build27\cpython\python\pythonrun.c @ 1371] 0027fe64 1e1187b0 python27!PyRun_FileExFlags+0x75 [c:\build27\cpython\python\pythonrun.c @ 1358] 0027fea4 1e119129 python27!PyRun_SimpleFileExFlags+0x190 [c:\build27\cpython\python\pythonrun.c @ 950] 0027fec0 1e038cb5 python27!PyRun_AnyFileExFlags+0x59 [c:\build27\cpython\python\pythonrun.c @ 753]
[issue24708] strop.replace Integer Overflow
John Leitch added the comment: Attaching repro. -- Added file: http://bugs.python.org/file40007/strop.replace_Integer_Overflow.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24708 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
Re: 42**1000000 is CPU time free
Thanks to all for your response, I was not aware that the interpreter evaluated pure litteral expressions at compile time. -- https://mail.python.org/mailman/listinfo/python-list
[issue24710] Class name hardcoded in TracebackException.from_exception()
New submission from Berker Peksag: Here is a patch that changes to use cls() instead of hardcoded TracebackException. Serhiy also suggested on IRC to use the from_exception() classmethod in TracebackException's __init__ method. -- components: Library (Lib) files: classmethod.diff keywords: patch messages: 247301 nosy: berker.peksag, rbcollins, serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Class name hardcoded in TracebackException.from_exception() type: enhancement versions: Python 3.5, Python 3.6 Added file: http://bugs.python.org/file40008/classmethod.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24710 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
Re: Which GUI?
On 24/07/2015 23:20, Frank Miles wrote: On Fri, 24 Jul 2015 19:31:36 +0100, Paulo da Silva wrote: [snip] Which technology is better? matplotlib? tkinter? wxwidgets? qt? Sadly - I don't think wxpython has been ported to python3 yet. http://wxpython.org/Phoenix/docs/html/main.html -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence -- https://mail.python.org/mailman/listinfo/python-list
[issue24712] Docs page's sidebar vibrates on mouse wheel scroll on Chrome.
New submission from Biwin John: The sidebar on the documentation pages ex. https://docs.python.org/2/library/collections.html vibrates/flashes on mouse wheel scroll. The sidebar with class sphinxsidebar, works okay when scrolling with the scrollbar, Firefox but not with mouse wheel on Chrome. please consider fixing it. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24712 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
Re: How may I learn Python Web Frameworks
The official Django docs is pretty detailed https://docs.djangoproject.com/en/1.8/ You could also look at the Django book but it confesses to being written for version 1.4 even though it goes ahead to assure us that it's not outdated https://django-book.readthedocs.org/en/latest/ -- https://mail.python.org/mailman/listinfo/python-list
[issue24712] Docs page's sidebar vibrates on mouse wheel scroll on Chrome.
Changes by Biwin John biwin...@gmail.com: -- assignee: docs@python components: Documentation nosy: Biwin John, docs@python priority: normal severity: normal status: open title: Docs page's sidebar vibrates on mouse wheel scroll on Chrome. type: behavior versions: Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24712 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24603] Update OpenSSL to 1.0.2d in Windows and OS X installer
Roundup Robot added the comment: New changeset 7ba239d4efbb by Ned Deily in branch '2.7': Issue #24603: Update the OS X 32-bit installer build to use OpenSSL 1.0.2d. https://hg.python.org/cpython/rev/7ba239d4efbb New changeset 436b8902b305 by Ned Deily in branch '3.4': Issue #24603: Update the OS X 32-bit installer build to use OpenSSL 1.0.2d. https://hg.python.org/cpython/rev/436b8902b305 New changeset 78254d483573 by Ned Deily in branch '3.5': Issue #24603: merge from 3.4 https://hg.python.org/cpython/rev/78254d483573 New changeset d205e7e5f9aa by Ned Deily in branch 'default': Issue #24603: merge from 3.5 https://hg.python.org/cpython/rev/d205e7e5f9aa -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24603 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24603] Update OpenSSL to 1.0.2d in Windows and OS X installer
Changes by Ned Deily n...@acm.org: -- resolution: - fixed stage: - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24603 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
Re: About this mailing list
On Fri, Jul 24, 2015 at 9:27 PM, Stéphane Wirtel steph...@wirtel.be wrote: Hi all, This mail is just to check if you receive it because I think I have a problem with this list. Could you reply me to check it works ? We hear you loud and clear Thank you You are welcome -- Stéphane Wirtel - http://wirtel.be - @matrixise -- https://mail.python.org/mailman/listinfo/python-list -- https://mail.python.org/mailman/listinfo/python-list
ANN: tsWxGTUI_PyVx 0.0.0 (pre-alpha) has been released.
ANN: tsWxGTUI_PyVx 0.0.0 (pre-alpha) has been released. What is it? === tsWxGTUI_PyVx is a foundation for developing, operating and troubleshooting Python and Python Curses based application programs embedded in local and remote 32-/64-bit computer systems used to monitor and control mission critical equipment. The architecture features Python 2x Python 3x based Command Line Interfaces (CLI) and Python Curses-based wxPython-style, Graphical-Text User Interfaces (GUI). The tsWxGTUI_PyVx Application Programming Interface (API) for the CLI and GUI are identical for the Python 2x and Python 3x versions. There are only minor internal differences in the source code. With it, you get that cross-platform, pixel-mode wxPython feeling on character-mode 8-/16-color (xterm-family) non-color (vt100-family) terminals and terminal emulators. What's new in version 0.0.0? Though the repository is extractable from its zip file after download, only the two Site-Packages in its Source-Distribution are installable. The extensive engineering notebook documention and two Developer-Sand- boxes are not installable because they are provided only to facilitate software development, maintenance and troubleshooting. The two Site-Packages may be installed and verified via the approprite install commands: 1. Example for installing and verifying the Python 2.x site-package: a. cd ./tsWxGTUI_PyVx_Repository/SourceDistributions/ Site-Packages/tsWxGTUI_PyVx/Python-2x b. python2.7 setup.py install c. Follow the demonstration and test instructions in: ./tsWxGTUI_PyVx_Repository/Documents/Demo.txt 2. Example for installing and verifying the Python 3.x site-package: a. cd ./tsWxGTUI_PyVx_Repository/SourceDistributions/ Site-Packages/tsWxGTUI_PyVx/Python-3x b. python3.4 setup.py install c. Follow the demonstration and test instructions in: ./tsWxGTUI_PyVx_Repository/Documents/Demo.txt Features: = 1. Launching from command line interface mode 2. Frames, Dialogs, Scrolled Windows 3. Panels 4. Buttons, CheckBoxes, Radio Boxes/Buttons 5. Text Entry and Password Entry (still under development) 6. Splash Screen display constructed or re-used during launch 7. 68-color palette (mapped into 8-/16-color Curses palette) 8. Logging to Screen and Files 9. Event Handling (not yet general purpose) 10. Task Bar (not yet capable of changing focus) 11. Position and dimensions accepted in Pixel (default) or Character (option) cell units. Capabilities: = 1. A library of general-purpose, re-usable building block modules for embedded systems. The building blocks: a. Provides both Command Line and Graphical-style User Interfaces that enable application developers to focus on the application specific functionality and not waste effort reinventing the functionality typical of Command Line and Graphical User Interfaces. b. Can operate in an isolated system (Stand-Alone mode) or in a networked system (Stand-Among mode). c. Are implemented in Python 2.x. d. Are ported to Python 3.x using a Python program (2to3) which reads Python 2.x source code and applies a series of fixers to transform it into valid Python 3.x code. Debugging of the Python 3.x code may be required to identify and resolve such runtime issues as decoding the type of data returned by Python curses modules. 2. Cross-platform designs run, without change, on Linux, Mac OS X and Microsoft Windows (the latter requires Cygwin, a Linux-like command line interface and GNU tool add-on from Red Hat). 3. Command Line Interface includes building blocks that create a sophisticated POSIX-/ Unix-like terminal interface. It features: a. Command line keyword/value pair option and positional argument parsing (using the most recent Python argparse, optparse or getopt package that is available). Default parser supports typical options: -h/--help, -a/--about, -d/--debug, -v/--version -V/--Verbose; b. Error/exception handling displays messages on console and returns Unix-style 8-bit exit code to coordinate a sequence of multiple applications. c. Event logging to application designated terminals, files or devices. d. Launching, event dispatching and terminating of the Graphical-style User Interface. e. Wrapper used to ensure that each application termin- ates with the exit code and message appropriate for co-ordination of a sequence of multiple applications. f. Tool to scan an operator designated directory tree and strip lines of source code of any superfluous trailing blank characters. g. Tool to create a copy of an operator designated directory tree after stripping comments and doc strings from Python source code to reduce required
Re: what windows compiler for python 3.5?
Brian Gladman wrote: Visual Studio 2015 Community was relased earlier this week so there is no need to work with the prerelease version. Hope MS have fixed all the internal compiler errors. E.g. trying to compile GeoIpApi-C [1], consistently reports: libGeoIP/regionName.c(7596): fatal error C1026: parser stack overflow, program too complex here. The regionName.c look pretty lame, but not that complex IMHO. [1] https://github.com/maxmind/geoip-api-c/blob/master/libGeoIP/regionName.c -- https://mail.python.org/mailman/listinfo/python-list
Re: Which GUI?
You might checkout pyqtgraph. I think a ton of the examples will be relevant to your use case. On Fri, Jul 24, 2015 at 1:31 PM, Paulo da Silva p_s_d_a_s_i_l_v_a...@netcabo.pt wrote: Hi all! I am about to write an application (python3 in linux) that needs: 1. Display time series graphics dynamically changed as the application runs, i.e. the graphics should reflect some internal variables states. 2. The same but for some network like diagrams. Basically nodes and connections (straight lines). Nodes can have different colors depending on their activity levels and also, together with connection lines, may be created and deleted dynamically. 3. Interaction with the user (not sure yet, here). 4. Some modules may need to be moved to C++ in case of lack of enough speed. So, the possibility of the GUI libs be used with C++ may be an advantage. Anyway I can always stay in Python and write a C++ extension. 5. Several multi processor segments. 6. For now single user - possible but unlikely multi-user in the future. Which technology is better? matplotlib? tkinter? wxwidgets? qt? Web: ajax (I don't know much about this - need to learn), using cherrypy or django? Any other? Thanks for any help or comments. -- https://mail.python.org/mailman/listinfo/python-list -- https://mail.python.org/mailman/listinfo/python-list
Re: Which GUI?
You may be interested in bokeh. http://bokeh.pydata.org/en/latest/ It's a python interactive visualisation library. Laura -- https://mail.python.org/mailman/listinfo/python-list
[issue24613] array.fromstring Use After Free
John Leitch added the comment: To clarify one point, passing self to array.fromstring works as expected almost all the time in 2.7. My testing revealed anomalous behavior 1% of the time, and it was almost always non-fatal corruption of the buffer. It stands to reason that legacy code may exist that relies on similar operations, and such code would be broken by the requested change. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24613 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
Re: How may I learn Python Web Frameworks
you'll find a very extensive Flask tutorial at http://blog.miguelgrinberg.com/post/the-flask-mega-tutorial-part-i-hello-world . -- https://mail.python.org/mailman/listinfo/python-list
[issue24613] array.fromstring Use After Free
Serhiy Storchaka added the comment: This is not about consistency, this is about that don't encourage users to write new code incompatible with 3.x. For now passing self to array.fromstring() doesn't work in 3.x and doesn't work (sporadically crashes) and never worked in 2.7. What you think about this Benjamin? -- nosy: +benjamin.peterson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24613 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
Re: what windows compiler for python 3.5?
On 24/07/2015 11:53, Robin Becker wrote: yes I build extensions for reportlab. Unfortunately, despite our MSDN subscription to the Visual Studio stuff we have no access to the Visual Studio Version 2015. Last one in my downloads is currently 2013. Pity. I received an email today re my work MSDN subscription telling me VS2015 was now available to download. Sorry I didn't study it to see if all the versions were available now or just some. I've only just started using VS2013 at work so wasn't worried about VS2015! -- https://mail.python.org/mailman/listinfo/python-list
[issue24709] Unix build uses '-Wno-unused-result', which icc doesn't recognize
New submission from Zachary Ware: It would be nice to leave out '-Wno-unused-result' when CC=icc to prevent superfluous warnings like: icc: command line warning #10006: ignoring unknown option '-Wno-unused-result' -- components: Build messages: 247299 nosy: zach.ware priority: low severity: normal stage: needs patch status: open title: Unix build uses '-Wno-unused-result', which icc doesn't recognize type: behavior versions: Python 2.7, Python 3.4, Python 3.5, Python 3.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24709 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
ANN: Scipy 0.16.0 release
Hi all, On behalf of the Scipy development team I'm pleased to announce the availability of Scipy 0.16.0. This release contains some exciting new features (see release notes below) and more than half a years' worth of maintenance work. 93 people contributed to this release. This release requires Python 2.6, 2.7 or 3.2-3.4 and NumPy 1.6.2 or greater. Sources, binaries and release notes can be found at https://github.com/scipy/scipy/releases/tag/v0.16.0 Enjoy, Ralf -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 == SciPy 0.16.0 Release Notes == SciPy 0.16.0 is the culmination of 7 months of hard work. It contains many new features, numerous bug-fixes, improved test coverage and better documentation. There have been a number of deprecations and API changes in this release, which are documented below. All users are encouraged to upgrade to this release, as there are a large number of bug-fixes and optimizations. Moreover, our development attention will now shift to bug-fix releases on the 0.16.x branch, and on adding new features on the master branch. This release requires Python 2.6, 2.7 or 3.2-3.4 and NumPy 1.6.2 or greater. Highlights of this release include: - - A Cython API for BLAS/LAPACK in `scipy.linalg` - - A new benchmark suite. It's now straightforward to add new benchmarks, and they're routinely included with performance enhancement PRs. - - Support for the second order sections (SOS) format in `scipy.signal`. New features Benchmark suite - --- The benchmark suite has switched to using `Airspeed Velocity http://spacetelescope.github.io/asv/`__ for benchmarking. You can run the suite locally via ``python runtests.py --bench``. For more details, see ``benchmarks/README.rst``. `scipy.linalg` improvements - --- A full set of Cython wrappers for BLAS and LAPACK has been added in the modules `scipy.linalg.cython_blas` and `scipy.linalg.cython_lapack`. In Cython, these wrappers can now be cimported from their corresponding modules and used without linking directly against BLAS or LAPACK. The functions `scipy.linalg.qr_delete`, `scipy.linalg.qr_insert` and `scipy.linalg.qr_update` for updating QR decompositions were added. The function `scipy.linalg.solve_circulant` solves a linear system with a circulant coefficient matrix. The function `scipy.linalg.invpascal` computes the inverse of a Pascal matrix. The function `scipy.linalg.solve_toeplitz`, a Levinson-Durbin Toeplitz solver, was added. Added wrapper for potentially useful LAPACK function ``*lasd4``. It computes the square root of the i-th updated eigenvalue of a positive symmetric rank-one modification to a positive diagonal matrix. See its LAPACK documentation and unit tests for it to get more info. Added two extra wrappers for LAPACK least-square solvers. Namely, they are ``*gelsd`` and ``*gelsy``. Wrappers for the LAPACK ``*lange`` functions, which calculate various matrix norms, were added. Wrappers for ``*gtsv`` and ``*ptsv``, which solve ``A*X = B`` for tri-diagonal matrix ``A``, were added. `scipy.signal` improvements - --- Support for second order sections (SOS) as a format for IIR filters was added. The new functions are: * `scipy.signal.sosfilt` * `scipy.signal.sosfilt_zi`, * `scipy.signal.sos2tf` * `scipy.signal.sos2zpk` * `scipy.signal.tf2sos` * `scipy.signal.zpk2sos`. Additionally, the filter design functions `iirdesign`, `iirfilter`, `butter`, `cheby1`, `cheby2`, `ellip`, and `bessel` can return the filter in the SOS format. The function `scipy.signal.place_poles`, which provides two methods to place poles for linear systems, was added. The option to use Gustafsson's method for choosing the initial conditions of the forward and backward passes was added to `scipy.signal.filtfilt`. New classes ``TransferFunction``, ``StateSpace`` and ``ZerosPolesGain`` were added. These classes are now returned when instantiating `scipy.signal.lti`. Conversion between those classes can be done explicitly now. An exponential (Poisson) window was added as `scipy.signal.exponential`, and a Tukey window was added as `scipy.signal.tukey`. The function for computing digital filter group delay was added as `scipy.signal.group_delay`. The functionality for spectral analysis and spectral density estimation has been significantly improved: `scipy.signal.welch` became ~8x faster and the functions `scipy.signal.spectrogram`, `scipy.signal.coherence` and `scipy.signal.csd` (cross-spectral density) were added. `scipy.signal.lsim` was rewritten - all known issues are fixed, so this function can now be used instead of ``lsim2``; ``lsim`` is orders of magnitude faster than ``lsim2`` in most cases. `scipy.sparse` improvements - --- The function `scipy.sparse.norm`, which computes sparse matrix norms, was added. The function `scipy.sparse.random`, which allows to draw random variates
Re: register cleanup handler
On 24-7-2015 16:57, Neal Becker wrote: I have code like: if (condition): do_something_needing_cleanup code_executed_unconditionally cleanup has to happen here if required, even if above did return, continue or exception Now, how can I make sure cleanup happens? Actually, what I really would like, is: if (condition): do_something_needing_cleanup register_scoped_cleanup (cleanup_fnc) code_executed_unconditionally So, any thoughts/hopes of python being able to do something like this? I know we have try/finally, but I don't think that helps here, because code_executed_unconditionally couldn't be inside the try. Or am I missing something obvious? Sounds like you want a context manager, see https://docs.python.org/3/library/contextlib.html#replacing-any-use-of-try-finally-and-flag-variables Irmen -- https://mail.python.org/mailman/listinfo/python-list
Re: register cleanup handler
Irmen de Jong wrote: On 24-7-2015 16:57, Neal Becker wrote: I have code like: if (condition): do_something_needing_cleanup code_executed_unconditionally cleanup has to happen here if required, even if above did return, continue or exception Now, how can I make sure cleanup happens? Actually, what I really would like, is: if (condition): do_something_needing_cleanup register_scoped_cleanup (cleanup_fnc) code_executed_unconditionally So, any thoughts/hopes of python being able to do something like this? I know we have try/finally, but I don't think that helps here, because code_executed_unconditionally couldn't be inside the try. Or am I missing something obvious? Sounds like you want a context manager, see https://docs.python.org/3/library/contextlib.html#replacing-any-use-of-try-finally-and-flag-variables Irmen Yes, that looks great! I'm using py2.7.10, so I tried 'contexter' package. if (condition): with ExitStack() as stack: if condition: do_something() def cleanup_resources(): some_cleanup_using_closure() stack.callback(cleanup_resources) unconditionally_executed_code_no_worrying_about_cleanup() -- https://mail.python.org/mailman/listinfo/python-list
[issue20366] SQLite FTS (full text search)
Changes by Zachary Ware zachary.w...@gmail.com: -- resolution: - wont fix stage: - resolved ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20366 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
Re: Which GUI?
On Fri, 24 Jul 2015 19:31:36 +0100, Paulo da Silva wrote: [snip] Which technology is better? matplotlib? tkinter? wxwidgets? qt? Sadly - I don't think wxpython has been ported to python3 yet. -- https://mail.python.org/mailman/listinfo/python-list
[issue24711] Document getpass.getpass behavior on ^C
New submission from Markus Unterwaditzer: getpass.getpass doesn't enter a newline when the user aborts input with ^C, while input/raw_input does. This behavior is surprising and can lead to mis-formatting of subsequent output. However, since this behavior exists since 2.7 and applications may have started to rely on it, I'd add a note to the documentation. -- assignee: docs@python components: Documentation messages: 247302 nosy: docs@python, untitaker priority: normal severity: normal status: open title: Document getpass.getpass behavior on ^C versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4, Python 3.5, Python 3.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24711 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24708] strop.replace Integer Overflow
John Leitch added the comment: Oops. Here's a corrected patch. -- Added file: http://bugs.python.org/file40009/strop.replace_Integer_Overflow.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24708 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24708] strop.replace Integer Overflow
Changes by John Leitch john.leit...@gmail.com: Removed file: http://bugs.python.org/file40006/strop.replace_Integer_Overflow.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24708 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24647] Document argparse.REMAINDER as being equal to ...
Changes by Ned Deily n...@acm.org: -- assignee: - docs@python components: +Documentation -Library (Lib) nosy: +bethard, docs@python versions: +Python 2.7, Python 3.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24647 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
scalar vs array and program control
Hello, I'm fairly new to Python, struggling to write in a more object-oriented, functional style. I just wrote a function that takes two arrays representing sine (y) and cosine (x) angle coordinates, and returns the angle in degrees. I had initially written the function to take array-like arguments x/y, but I'd like to generalize and take scalars as well. However, the function has a subsetting operations, which don't work with scalars: vmag = np.sqrt((x ** 2) + (y ** 2)) ang = np.arctan2(y, x) ang[ang 0] = ang[ang 0] + (2 * np.pi) # output range 0 - 2*pi ang[vmag == 0] = 0 # when magnitude is 0 the angle is also 0 ang[ang == 0] = 2 * np.pi # convention If I want to take scalars x/y, I naively thought about implementing an if/else statement right before the subsetting operations. However, my intuition tells me there must be a proper object-oriented solution to this. Any tips appreciated. Cheers, -- Seb -- https://mail.python.org/mailman/listinfo/python-list
[issue24613] array.fromstring Use After Free
Benjamin Peterson added the comment: I think it should raise an exception. It's hard to feel too bad about preventing corruption even if only occasional. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24613 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com