Calling dunder methods manually

2017-04-12 Thread Steven D'Aprano
Should you call dunder methods (Double leading and trailing UNDERscores) manually? For example: my_number.__add__(another_number) The short answer is: NO! In general, you shouldn't do it. Guido recently commented: I agree that one shouldn't call __init__ manually (and in fact Python

RE: Visit All URLs with selenium python

2017-04-12 Thread Deborah Swanson
Nicole wrote, on Wednesday, April 12, 2017 9:49 PM > > browser.get('https://www.google.co.uk/search?q=Rashmi=Rashm > i=chrome..69i57j69i60l3.6857j0j1=chrome=UTF-8# q=Rashmi+Custom+Tailors') > time.sleep(5) > > try: > p_links = >

Re: Python and the need for speed

2017-04-12 Thread Jussi Piitulainen
bart4...@gmail.com writes: > On Wednesday, 12 April 2017 16:50:01 UTC+1, Jussi Piitulainen wrote: >> bart4...@gmail.com writes: >> >> > On Wednesday, 12 April 2017 12:56:32 UTC+1, Jussi Piitulainen wrote: >> >> bartc writes: >> >> >> > >> >> > These are straightforward language enhancements.

Visit All URLs with selenium python

2017-04-12 Thread Nicole
browser.get('https://www.google.co.uk/search?q=Rashmi=Rashmi=chrome..69i57j69i60l3.6857j0j1=chrome=UTF-8#q=Rashmi+Custom+Tailors') time.sleep(5) try: p_links = browser.find_elements_by_css_selector('div > h3 > a') url_list = []

Re: Merging multiple sorted sequences.

2017-04-12 Thread Paul Rubin
Erik writes: > I need to be able to lazily merge a variable number of > already-sorted(*) variable-length sequences If the number of sequences is large, the traditional way is with the heapq module. -- https://mail.python.org/mailman/listinfo/python-list

Re: Python and the need for speed

2017-04-12 Thread Paul Rubin
Michael Torrie writes: > Equivalent to the JNI and Lisp FFI is the CFFI [1]. The JNI, the FFI, > and the CFFI, are all for calling native code from within their > respective languages, if I understand correctly. They don't define a > standard way for native code to call into

Re: Python and the need for speed

2017-04-12 Thread Paul Rubin
Marko Rauhamaa writes: > Traditionally, disk access in Linux has been considered nonblocking. > There is AIO, but that hasn't been used much. AIO is asynchronous but it's for dealing with already-opened files. There doesn't seem to be a way to asynchronously OPEN a file. > I

[issue30045] Bad parameter name in re.escape()

2017-04-12 Thread Mandeep Bhutani
Mandeep Bhutani added the comment: I agree that pattern seems right. However I think that the parameter in the docs should be changed from string to pattern for consistency purposes. -- nosy: +mandeepb ___ Python tracker

Re: Python and the need for speed

2017-04-12 Thread Paul Rubin
Brecht Machiels writes: > However, rinohtype is located in a very different niche and it would > greatly benefit a lot from a speed boost. Rendering the Sphinx > documentation (311 pages) takes almost 10 minutes on my i7 Yikes... > As for moving to a compiled language

Re: closing image automatically in for loop , python

2017-04-12 Thread William Ray Wing
> On Apr 12, 2017, at 7:18 AM, Masoud Afshari wrote: > > Dear all > > I have several *.sfd files which created by a simulation code. I wrote a > program containing a for Loop which reads each time one .sfd file and plot > the requested Parameters. I have two request:

[issue29692] contextlib.contextmanager may incorrectly unchain RuntimeError

2017-04-12 Thread Mariatta Wijaya
Changes by Mariatta Wijaya : -- pull_requests: +1244 ___ Python tracker ___ ___

[issue26985] Information about CodeType in inspect documentation is outdated

2017-04-12 Thread Xiang Zhang
Changes by Xiang Zhang : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue26985] Information about CodeType in inspect documentation is outdated

2017-04-12 Thread Xiang Zhang
Xiang Zhang added the comment: New changeset 72b1d419ac5f7cd9ef82ffd2ffe21aa9b34e21d2 by Xiang Zhang in branch '3.5': bpo-26985: Add missing info of code object in inspect documentation (GH-1090) (GH-1100) https://github.com/python/cpython/commit/72b1d419ac5f7cd9ef82ffd2ffe21aa9b34e21d2

[issue29861] multiprocessing Pool keeps objects (tasks, args, results) alive too long

2017-04-12 Thread Xiang Zhang
Xiang Zhang added the comment: Hi, Antoine, after this change, I sometimes see tests fail for 3.5 branch, for example http://buildbot.python.org/all/builders/x86%20Ubuntu%20Shared%203.5/builds/194/steps/test/logs/stdio. -- nosy: +xiang.zhang ___

[issue26985] Information about CodeType in inspect documentation is outdated

2017-04-12 Thread Xiang Zhang
Xiang Zhang added the comment: New changeset 14944c62300f741488c2f28cb91ad1e3fef7343b by Xiang Zhang in branch '3.6': bpo-26985: Add missing info of code object in inspect documentation (GH-1090) (GH-1099) https://github.com/python/cpython/commit/14944c62300f741488c2f28cb91ad1e3fef7343b

Re: Python Command Line Arguments

2017-04-12 Thread ian . stegner
On Thursday, April 13, 2017 at 12:38:48 PM UTC+10, MRAB wrote: > On 2017-04-13 02:59, ian.steg...@gmail.com wrote: > > I have this code which I got from > > https://www.tutorialspoint.com/python/python_command_line_arguments.htm The > > example works fine but when I modify it to what I need, it

[issue30047] Typos in Doc/library/select.rst

2017-04-12 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: Backported to 3.6. Closing this now. Thanks all :) -- resolution: -> fixed stage: backport needed -> resolved status: open -> closed ___ Python tracker

[issue30047] Typos in Doc/library/select.rst

2017-04-12 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: New changeset f0c416799b33742af36d7c6608b9a422615fb3d2 by Mariatta in branch '3.6': [3.6] bpo-30047: Fix a typo in Doc/library/select.rst (GH-1086) (GH-1098) https://github.com/python/cpython/commit/f0c416799b33742af36d7c6608b9a422615fb3d2 --

Re: Merging multiple sorted sequences.

2017-04-12 Thread Cameron Simpson
On 12Apr2017 23:15, Erik wrote: I need to be able to lazily merge a variable number of already-sorted(*) variable-length sequences into a single sorted sequence. The merge should continue until the longest sequence has been exhausted. (*) They may in practice be a

[issue26985] Information about CodeType in inspect documentation is outdated

2017-04-12 Thread Xiang Zhang
Changes by Xiang Zhang : -- pull_requests: +1243 ___ Python tracker ___ ___

Re: homework confusion

2017-04-12 Thread MRAB
On 2017-04-13 03:13, Lauren Fugate wrote: [snip] Read the last 2 paragraphs again: ""So you should be able to create Lockable objects with commands* like Lockable("front door", "in the foyer", house_key, False, True) (returning an object that starts out closed and locked), or

[issue26985] Information about CodeType in inspect documentation is outdated

2017-04-12 Thread Xiang Zhang
Changes by Xiang Zhang : -- pull_requests: +1242 ___ Python tracker ___ ___

[issue30047] Typos in Doc/library/select.rst

2017-04-12 Thread Mariatta Wijaya
Changes by Mariatta Wijaya : -- pull_requests: +1241 ___ Python tracker ___ ___

Re: homework confusion

2017-04-12 Thread Jason Friedman
> > The example command is: Lockable("diary", "under Sam's bed", tiny_key, > True) > > And I keep getting a NameError: tiny_key is not defined. > > What do I do? > Without knowing what your professor intends this is a guess: define tiny_key. For example tiny_key = "some string" thing =

[issue30063] DeprecationWarning in json/encoder.py

2017-04-12 Thread Paul Durack
Paul Durack added the comment: I have attempted to quieten these using: In [2]: import warnings ...: warnings.filterwarnings('ignore', category=DeprecationWarning) In [3]: import vcs /home/user/anaconda2/envs/cdatcmornclnco/lib/python2.7/json/encoder.py:207: DeprecationWarning: Interpreting

[issue30063] DeprecationWarning in json/encoder.py

2017-04-12 Thread Paul Durack
New submission from Paul Durack: I have started receiving the following warnings which are starting to prevent an ipython session from functioning: /home/user/anaconda2/envs/cdatcmornclnco/lib/python2.7/json/encoder.py:207: DeprecationWarning: Interpreting naive datetime as local 2017-04-12

Re: Python Command Line Arguments

2017-04-12 Thread MRAB
On 2017-04-13 02:59, ian.steg...@gmail.com wrote: I have this code which I got from https://www.tutorialspoint.com/python/python_command_line_arguments.htm The example works fine but when I modify it to what I need, it only half works. The problem is the try/except. If you don't specify an

Re: Moderating the list [was: Python and the need for speed]

2017-04-12 Thread Jason Friedman
> > However, it's simply a technical fact: the thing which we moderate is the >> mailing list. We can control which posts make it through from the newsgroup >> by blocking them at the gateway. But the posts will continue to appear on >> comp.lang.python which is, as the description says,

Re: Merging multiple sorted sequences.

2017-04-12 Thread Terry Reedy
On 4/12/2017 7:15 PM, Erik wrote: Hi Peter, On 12/04/17 23:42, Peter Otten wrote: Erik wrote: I need to be able to lazily merge a variable number of already-sorted(*) variable-length sequences into a single sorted sequence. https://docs.python.org/dev/library/heapq.html#heapq.merge

[issue26985] Information about CodeType in inspect documentation is outdated

2017-04-12 Thread Xiang Zhang
Xiang Zhang added the comment: New changeset a6902e662c18dc837d40664eaafe50a44aae6366 by Xiang Zhang in branch 'master': bpo-26985: Add missing info of code object in inspect documentation (GH-1090) https://github.com/python/cpython/commit/a6902e662c18dc837d40664eaafe50a44aae6366 --

Re: Python Command Line Arguments

2017-04-12 Thread Jason Friedman
> > I have this code which I got from https://www.tutorialspoint. > com/python/python_command_line_arguments.htm The example works fine but > when I modify it to what I need, it only half works. The problem is the > try/except. If you don't specify an input/output, they are blank at the end > but

homework confusion

2017-04-12 Thread Lauren Fugate
Hello! So I have a homework assignment that I can't seem to understand. The problems are talking about classes and subclasses. My issue is that the examples use objects as arguments and I don't know how to make that happen without getting a name error. The question is: Create a subclass of

Python Command Line Arguments

2017-04-12 Thread ian . stegner
I have this code which I got from https://www.tutorialspoint.com/python/python_command_line_arguments.htm The example works fine but when I modify it to what I need, it only half works. The problem is the try/except. If you don't specify an input/output, they are blank at the end but it

[issue30048] If a task is canceled at the right moment, the cancellation is ignored

2017-04-12 Thread INADA Naoki
Changes by INADA Naoki : -- pull_requests: +1240 ___ Python tracker ___ ___

Re: What is the difference between x[:]=y and x=y[:]?

2017-04-12 Thread jfong
Peter Otten at 2017/4/12 UTC+8 PM 8:13:53 wrote: > I should add that you can write > > lr = [[1], [0]] > lx = [] > for i in range(len(lr)): > > ... lx = lr[i][:] > > ... lx.append(0) > > ... lr[i].append(1) > > ... lr.append(lx) > > ... > lr > >[[1, 1], [0, 1],

[issue30048] If a task is canceled at the right moment, the cancellation is ignored

2017-04-12 Thread INADA Naoki
INADA Naoki added the comment: > In Evgeny's example the 'task' is 'coro1' (not 'coro2'). It has plenty of > yield points after being cancelled. Since coro1 waiting coro2 when cancelling, Task(coro1).cancel() redirect to Task(coro2).cancel(). But I was wrong about "CancelledError is thrown

[issue30048] If a task is canceled at the right moment, the cancellation is ignored

2017-04-12 Thread Yury Selivanov
Yury Selivanov added the comment: In Evgeny's example the 'task' is 'coro1' (not 'coro2'). It has plenty of yield points after being cancelled. -- ___ Python tracker

Re: Merging multiple sorted sequences.

2017-04-12 Thread Erik
Hi Ian, On 13/04/17 00:09, Erik wrote: On 12/04/17 23:44, Ian Kelly wrote: I would just use "lowest = min(items, key=itemgetter(0))". I had it in my head for some reason that min() would return the smallest key, not the object (and hence I wouldn't be able to know which sequence object to

Re: "Goto" statement in Python

2017-04-12 Thread Rob Gaddi
On 04/12/2017 04:42 PM, Mikhail V wrote: On 12 April 2017 at 02:44, Nathan Ernst wrote: goto is a misunderstood and much misaligned creature. It is a very useful feature, but like nearly any programming construct can be abused. Constructs like 'break', 'continue' or

[issue30048] If a task is canceled at the right moment, the cancellation is ignored

2017-04-12 Thread INADA Naoki
INADA Naoki added the comment: > The problem is that the task doesn't catch CancelledError, yet it disappears. The problem is CancelledError is not raised, even it's thrown. Task can't catch exception not raised. See below example which demonstrates how task works. --- from asyncio import

RE: Namedtuples: some unexpected inconveniences

2017-04-12 Thread Deborah Swanson
Deborah Swanson wrote, on Wednesday, April 12, 2017 4:29 PM > > Peter Otten wrote, on Wednesday, April 12, 2017 3:15 PM > > > > >> Indeed you cannot change the namedtuple's attributes. Like the > > >> "normal" tuple it is designed to be immutable. If you want changes in > > >> one list (the

"Goto" statement in Python

2017-04-12 Thread Mikhail V
On 12 April 2017 at 02:44, Nathan Ernst wrote: > goto is a misunderstood and much misaligned creature. It is a very useful > feature, but like nearly any programming construct can be abused. > > Constructs like 'break', 'continue' or 'next' in languages like Python or >

Re: Python and the need for speed

2017-04-12 Thread bart4858
On Thursday, 13 April 2017 00:09:35 UTC+1, Gregory Ewing wrote: > bart4...@gmail.com wrote: > > > But the language can also play a part in not allowing certain things to be > > expressed naturally. So the for-loop in the example has to have a > > control-variable even if it's not referenced. >

RE: Namedtuples: some unexpected inconveniences

2017-04-12 Thread Deborah Swanson
Peter Otten wrote, on Wednesday, April 12, 2017 3:15 PM > > Deborah Swanson wrote: > > >> >value = getattr(record, label) > >> > >> That should work. > > > > We may agree that it *should* work, by an intuitive grasp of how it > > should work, but it doesn't. You get "object has no attribute

Re: Merging multiple sorted sequences.

2017-04-12 Thread Erik
Hi Peter, On 12/04/17 23:42, Peter Otten wrote: Erik wrote: I need to be able to lazily merge a variable number of already-sorted(*) variable-length sequences into a single sorted sequence. https://docs.python.org/dev/library/heapq.html#heapq.merge AFAICT (looking at the Python 3.5 heapq

Re: Merging multiple sorted sequences.

2017-04-12 Thread Erik
On 12/04/17 23:44, Ian Kelly wrote: This might be okay since Timsort on an already-sorted list should be O(n). But there's not really any need to keep them sorted and I would just use "lowest = min(items, key=itemgetter(0))". Sure (and this was my main worry). I had it in my head for some

[issue30048] If a task is canceled at the right moment, the cancellation is ignored

2017-04-12 Thread Evgeny Kapun
Evgeny Kapun added the comment: The problem is that the task doesn't catch CancelledError, yet it disappears. -- ___ Python tracker ___

Re: Python and the need for speed

2017-04-12 Thread Gregory Ewing
bart4...@gmail.com wrote: But the language can also play a part in not allowing certain things to be expressed naturally. So the for-loop in the example has to have a control-variable even if it's not referenced. If the compiler can recognise when code is "stupid", it's probably capable of

Re: Merging multiple sorted sequences.

2017-04-12 Thread Ian Kelly
On Wed, Apr 12, 2017 at 4:44 PM, Ian Kelly wrote: > On Wed, Apr 12, 2017 at 4:15 PM, Erik wrote: >> while len(items) > 1: >> items.sort(key=lambda item: item[0]) > > This might be okay since Timsort on an already-sorted list should be

Re: Merging multiple sorted sequences.

2017-04-12 Thread Ian Kelly
On Wed, Apr 12, 2017 at 4:15 PM, Erik wrote: > Hi. > > I need to be able to lazily merge a variable number of already-sorted(*) > variable-length sequences into a single sorted sequence. The merge should > continue until the longest sequence has been exhausted. > > (*)

Re: Merging multiple sorted sequences.

2017-04-12 Thread Peter Otten
Erik wrote: > I need to be able to lazily merge a variable number of already-sorted(*) > variable-length sequences into a single sorted sequence. https://docs.python.org/dev/library/heapq.html#heapq.merge -- https://mail.python.org/mailman/listinfo/python-list

[issue30062] datetime in Python 3.6+ no longer respects 'TZ' environment variable

2017-04-12 Thread Adam Williamson
Adam Williamson added the comment: Hmm, after a bit more poking I found this: https://docs.python.org/3/library/time.html#time.tzset "Note Although in many cases, changing the TZ environment variable may affect the output of functions like localtime() without calling tzset(), this behavior

Merging multiple sorted sequences.

2017-04-12 Thread Erik
Hi. I need to be able to lazily merge a variable number of already-sorted(*) variable-length sequences into a single sorted sequence. The merge should continue until the longest sequence has been exhausted. (*) They may in practice be a lazy source of data known to only ever be generated in

RE: Namedtuples: some unexpected inconveniences

2017-04-12 Thread Peter Otten
Deborah Swanson wrote: >> >value = getattr(record, label) >> >> That should work. > > We may agree that it *should* work, by an intuitive grasp of how it > should work, but it doesn't. You get "object has no attribute 'label'. Only if the namedtuple (1) does not have a label attribute and (2)

[issue30052] URL Quoting page links to function Bytes instead of defintion

2017-04-12 Thread Cheryl Sabella
Cheryl Sabella added the comment: I've looked into this a little more and it seems that, in all instances, the :class:`bytes` and :class:`bytearray` mark-up link to the Built-In Functions page instead of the Built-In Types page. It also looks like the Built-In Functions page has specific code

RE: Namedtuples: some unexpected inconveniences

2017-04-12 Thread Deborah Swanson
Peter Otten wrote, on Wednesday, April 12, 2017 1:45 PM > > Deborah Swanson wrote: > > > I won't say the following points are categorically true, but I became > > convinced enough they were true in this instance that I abandoned the > > advised strategy. Which was to use defaultdict to group

Re: external process not terminating

2017-04-12 Thread Larry Martell
On Wed, Apr 12, 2017 at 10:51 AM, Dennis Lee Bieber wrote: > On Wed, 12 Apr 2017 09:51:12 -0400, Larry Martell > declaimed the following: > > >> >>Anyone know how I can get the external process to terminate when done? >> > > It has... You

[issue30062] datetime in Python 3.6+ no longer respects 'TZ' environment variable

2017-04-12 Thread Berker Peksag
Changes by Berker Peksag : -- nosy: +belopolsky ___ Python tracker ___ ___

[issue30062] datetime in Python 3.6+ no longer respects 'TZ' environment variable

2017-04-12 Thread Adam Williamson
New submission from Adam Williamson: I can't figure out yet why this is, but it's very easy to demonstrate: [adamw@adam anaconda (time-log %)]$ python35 Python 3.5.2 (default, Feb 11 2017, 18:09:24) [GCC 7.0.1 20170209 (Red Hat 7.0.1-0.7)] on linux Type "help", "copyright", "credits" or

Re: Passing parameters thru decorators

2017-04-12 Thread Peter Otten
andrew.hol...@otternetworks.de wrote: > Hi, > > I'm trying to work out how to pass parameters through decorators: > > class Meow(): > > def __init__(self, arg1, arg2): > print("INIT ClassBasedDecoratorWithParams") > print(arg1) > print(arg2) > > def

RE: Namedtuples: some unexpected inconveniences

2017-04-12 Thread Deborah Swanson
> -Original Message- > From: Python-list > [mailto:python-list-bounces+python=deborahswanson.net@python.o > rg] On Behalf Of MRAB > Sent: Wednesday, April 12, 2017 1:42 PM > To: python-list@python.org > Subject: Re: Namedtuples: some unexpected inconveniences > > > On 2017-04-12

[issue30061] Check if PyObject_Size() raised an error

2017-04-12 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: +1239 ___ Python tracker ___ ___

[issue30061] Check if PyObject_Size() raised an error

2017-04-12 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- stage: -> patch review ___ Python tracker ___

Re: Passing parameters thru decorators

2017-04-12 Thread MRAB
On 2017-04-12 21:42, andrew.hol...@otternetworks.de wrote: Hi, I'm trying to work out how to pass parameters through decorators: class Meow(): def __init__(self, arg1, arg2): print("INIT ClassBasedDecoratorWithParams") print(arg1) print(arg2) def

[issue30061] Check if PyObject_Size() raised an error

2017-04-12 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: PyObject_Size(), PySequence_Size() and PyMapping_Size() can raise an exception. But not always this is checked after using them. This can lead to a crash. For example: >>> import io >>> class R(io.IOBase): ... def readline(self): return None ... >>>

[issue23894] lib2to3 doesn't recognize rb'...' and f'...' in Python 3.6

2017-04-12 Thread Łukasz Langa
Łukasz Langa added the comment: No Serhiy, I need a new patch with tests, etc. -- ___ Python tracker ___ ___

Re: Namedtuples: some unexpected inconveniences

2017-04-12 Thread Peter Otten
Deborah Swanson wrote: > I won't say the following points are categorically true, but I became > convinced enough they were true in this instance that I abandoned the > advised strategy. Which was to use defaultdict to group the list of > namedtuples by one of the fields for the purpose of

Passing parameters thru decorators

2017-04-12 Thread andrew . holway
Hi, I'm trying to work out how to pass parameters through decorators: class Meow(): def __init__(self, arg1, arg2): print("INIT ClassBasedDecoratorWithParams") print(arg1) print(arg2) def makebold(self, fn): def wrapped(): return "" +

Re: Namedtuples: some unexpected inconveniences

2017-04-12 Thread MRAB
On 2017-04-12 20:57, Deborah Swanson wrote: I won't say the following points are categorically true, but I became convinced enough they were true in this instance that I abandoned the advised strategy. Which was to use defaultdict to group the list of namedtuples by one of the fields for the

Namedtuples: some unexpected inconveniences

2017-04-12 Thread Deborah Swanson
I won't say the following points are categorically true, but I became convinced enough they were true in this instance that I abandoned the advised strategy. Which was to use defaultdict to group the list of namedtuples by one of the fields for the purpose of determining whether certain other

[issue30059] No documentation for C type Py_Ellipsis

2017-04-12 Thread Michael Seifert
Michael Seifert added the comment: > I'm wondering if it is worth to add a separate section for Ellipsis at the > same level as "Slice Objects", but in the same file. I'm not sure either. There seems to be no precedent in the documentation, for example "Py_NotImplemented" is also just

[issue30059] No documentation for C type Py_Ellipsis

2017-04-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I'm wondering if it is worth to add a separate section for Ellipsis at the same level as "Slice Objects", but in the same file. See for example "Instance Method Objects" and "Method Objects" in method.rst. -- nosy: +serhiy.storchaka

Re: Python and the need for speed

2017-04-12 Thread bart4858
On Wednesday, 12 April 2017 16:04:53 UTC+1, Brecht Machiels wrote: > On 2017-04-12 14:46:45 +, Michael Torrie said: > It would be great if you could run the benchmark I mention in my first > link and share the results. Highly appreciated! Were you ever able to isolate what it was that's

[issue30047] Typos in Doc/library/select.rst

2017-04-12 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: This needs backport, which I will do later today. Thanks. -- assignee: docs@python -> Mariatta nosy: +Mariatta stage: -> backport needed versions: +Python 3.7 ___ Python tracker

Re: XML tree to a pandas dataframe

2017-04-12 Thread Chris Angelico
On Thu, Apr 13, 2017 at 12:54 AM, David Shi via Python-list wrote: > What is the best way to convert XML document into a pandas dataframe? > Regards. > David I don't know. What's the least painful way to gouge out my eyes with a rusty fork? You're going to need to know

Re: Python and the need for speed

2017-04-12 Thread bart4858
On Wednesday, 12 April 2017 16:50:01 UTC+1, Jussi Piitulainen wrote: > bart4...@gmail.com writes: > > > On Wednesday, 12 April 2017 12:56:32 UTC+1, Jussi Piitulainen wrote: > >> bartc writes: > >> > > > >> > These are straightforward language enhancements. > >> > >> FYI, the question is not

[issue30060] Crash on Py_Finalize if Py_NoSiteFlag is used

2017-04-12 Thread Stephen Kelly
New submission from Stephen Kelly: When attempting to use PyImport_ImportModule("os") (or to import many other libraries), there is a crash on Py_Finalize if Py_NoSiteFlag is set. The issue appears to be the use of frozenset() as a result of importing the module. I reproduced this on Windows

HOT LIST

2017-04-12 Thread Jack
Hi Hope you doing great! Greeting from Niche Soft Solutions. I would like to present our topnotch consultants currently available. Please have a look at the below hot list of Niche Soft Solutions

[issue30059] No documentation for C type Py_Ellipsis

2017-04-12 Thread Michael Seifert
New submission from Michael Seifert: The "Py_Ellipsis" object is part of the public C-API but it isn't documented anywhere. It is defined in "sliceobject.o/.h" so I created a PR and added it to the "slice" documentation. -- assignee: docs@python components: Documentation messages:

[issue29994] site.USER_SITE is None for Windows embeddable Python 3.6

2017-04-12 Thread Steve Dower
Steve Dower added the comment: Actually, I suspect you're not importing site on startup at all (which is great for performance), but that means that site.main() is not being run. I'll post more details on the pip bug. -- ___ Python tracker

[issue30058] Buffer overflow in kqueue.control()

2017-04-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Proposed patch presumably fixes the issue. But since this is *BSD specific I can't even check that it is compiled. -- stage: -> patch review ___ Python tracker

[issue30058] Buffer overflow in kqueue.control()

2017-04-12 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: +1237 ___ Python tracker ___ ___

[issue29994] site.USER_SITE is None for Windows embeddable Python 3.6

2017-04-12 Thread Steve Dower
Steve Dower added the comment: Yes, fixing pip in this case is the right approach. Since you're going to be including a copy of pip with your application, you can also just patch that yourself to get going while the pip team decides how to go from here. Or you could add a sitecustomize.py

[issue30058] Buffer overflow in kqueue.control()

2017-04-12 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: The first parameter of kqueue.control() is documented as an iterable. But actually it should have a length. kqueue.control() uses PyObject_Size() for allocating an array and PyObject_GetIter()+PyIter_Next() for iterating kevent objects and filling the

Re: IOError: [Errno 12] Not enough space

2017-04-12 Thread Irmen de Jong
On 12-4-2017 7:54, LnT wrote: > > Hi Irmen, > > you may please find full log @ https://pastebin.mozilla.org/9018753 I have no idea what I'm looking at. But my initial response was wrong, see the reply by eryk sun; your error has nothing to do with disk space but rather, a lack of system

[issue30057] signal.signal should check tripped signals

2017-04-12 Thread Jeroen Demeyer
Changes by Jeroen Demeyer : Added file: http://bugs.python.org/file46802/fix30057-py3.patch ___ Python tracker ___

[issue30057] signal.signal should check tripped signals

2017-04-12 Thread Jeroen Demeyer
Changes by Jeroen Demeyer : -- keywords: +patch Added file: http://bugs.python.org/file46801/fix30057-py2.patch ___ Python tracker

[issue30056] RuntimeWarning: invalid value encountered in maximum/minimum

2017-04-12 Thread R. David Murray
R. David Murray added the comment: Numpy is not part of the python standard library. You should report this issue to the numpy bug tracker, which appears to be here: https://github.com/numpy/numpy/issues. Or perhaps first ask the numpy community if this is really a bug: the new version

[issue30057] signal.signal should check tripped signals

2017-04-12 Thread Jeroen Demeyer
New submission from Jeroen Demeyer: There is a race condition in calling signal.signal() if the signal arrives while (or right before) signal.signal() is being executed: the function signal.signal(sig, action) marks the signal "sig" as not tripped. Because of this, signals can get lost.

Re: Python and the need for speed

2017-04-12 Thread Jussi Piitulainen
bart4...@gmail.com writes: > On Wednesday, 12 April 2017 12:56:32 UTC+1, Jussi Piitulainen wrote: >> bartc writes: >> > >> > These are straightforward language enhancements. >> >> FYI, the question is not how to optimize the code but how to prevent >> the programmer from writing stupid code in

How to pd.read_csv into a DataFrame with multiple seperators?

2017-04-12 Thread David Shi via Python-list
Have a look at this example. http://www.ebi.ac.uk/ena/data/warehouse/search?query=%22geo_circ(-0.587,-90.5713,170)%22=sequence_release=text How to pd.read_csv into a DataFrame with multiple seperators? Regards. David -- https://mail.python.org/mailman/listinfo/python-list

Re: closing image automatically in for loop , python

2017-04-12 Thread Frank Miles
On Wed, 12 Apr 2017 04:18:45 -0700, Masoud Afshari wrote: > filename ="Ex_resample" +'_sdf_'+ str(n)+'.dat' > with open(filename, 'rb') as f: #read binary file data = np.fromfile(f, > dtype='float64', count=nx*ny) #float64 for Double precision float numbers > Ex = np.reshape(data, [ny, nx],

[issue30056] RuntimeWarning: invalid value encountered in maximum/minimum

2017-04-12 Thread Amy
New submission from Amy: I just updated to numpy 1.12.1 and am getting this Runtime Warning when using numpy.minimum or numpy.maximum: RuntimeWarning: invalid value encountered in maximum Prior to updating, I was using numpy 1.10.x and had no issues running numpy.minimum or numpy.maximum

[issue30055] Missed testcleanup in decimal.rst

2017-04-12 Thread Marco Buttu
Changes by Marco Buttu : -- pull_requests: +1236 ___ Python tracker ___ ___

Re: Python and the need for speed

2017-04-12 Thread Brecht Machiels
On 2017-04-12 14:46:45 +, Michael Torrie said: On 04/12/2017 03:33 AM, Brecht Machiels wrote: However, rinohtype is located in a very different niche and it would greatly benefit a lot from a speed boost. Rendering the Sphinx documentation (311 pages) takes almost 10 minutes on my i7,

XML tree to a pandas dataframe

2017-04-12 Thread David Shi via Python-list
What is the best way to convert XML document into a pandas dataframe? Regards. David -- https://mail.python.org/mailman/listinfo/python-list

[issue30055] Missed testcleanup in decimal.rst

2017-04-12 Thread Marco Buttu
New submission from Marco Buttu: The testsetup in Doc/library/decimal.rst is not enough for isolating the tests in respect to the other rst files. Currently we have the following testsetup, without a testcleanup: .. testsetup:: * import decimal import math from decimal import

Re: Python and the need for speed

2017-04-12 Thread Michael Torrie
On 04/11/2017 06:38 PM, Paul Rubin wrote: > Grant Edwards writes: >> If there are now other Python implementations (e.g. MicroPython) with >> C APIs that differ from CPython, then it seems like it is no longer >> redundant to say "the CPython API". > > Perhaps there

Re: Python and the need for speed

2017-04-12 Thread Michael Torrie
On 04/12/2017 03:33 AM, Brecht Machiels wrote: > However, rinohtype is located in a very different niche and it would > greatly benefit a lot from a speed boost. Rendering the Sphinx > documentation (311 pages) takes almost 10 minutes on my i7, which is > simply too long given the available

[issue30054] Expose tracemalloc C API to track/untrack memory blocks

2017-04-12 Thread Julian Taylor
Julian Taylor added the comment: With this changeset it would: https://github.com/numpy/numpy/pull/8885 -- ___ Python tracker ___

  1   2   >