Re: Obtain the raw line of text read by CSVDictReader when reporting errors?

2016-09-23 Thread Tim Chase
On 2016-09-23 16:58, Lawrence D’Oliveiro wrote: > Duck type is great for sticking pieces of Python code together. > > And anybody who doesn’t like it can go Java themselves... Sorry, my source code doesn't declare that I support JavaInterface... -tkc -- https://mail.python.org/mailman/lis

Re: How to import all things defined the files in a module directory in __init__.py?

2016-09-23 Thread Chris Angelico
On Sat, Sep 24, 2016 at 11:42 AM, Lawrence D’Oliveiro wrote: > On Friday, September 23, 2016 at 4:25:21 AM UTC+12, Chris Angelico wrote: >> For reference, the Decimal module (ignoring the C accelerator) is over six >> thousand lines of code, as a single module. Now, that might be pushing the >> bo

Re: How to import all things defined the files in a module directory in __init__.py?

2016-09-23 Thread Lawrence D’Oliveiro
On Friday, September 23, 2016 at 4:25:21 AM UTC+12, Chris Angelico wrote: > For reference, the Decimal module (ignoring the C accelerator) is over six > thousand lines of code, as a single module. Now, that might be pushing the > boundaries a bit ... What “boundaries” do you think that might be pu

Re: how to automate java application in window using python

2016-09-23 Thread Lawrence D’Oliveiro
On Thursday, September 22, 2016 at 8:34:20 AM UTC+12, Emile wrote: > Hmm, then I'll have to wait longer to experience the unreliability as > the handful of automated gui tools I'm running has only been up 10 to 12 > years or so. You sound like you have a solution for the OP, then. -- https://ma

Re: Obtain the raw line of text read by CSVDictReader when reporting errors?

2016-09-23 Thread Lawrence D’Oliveiro
On Friday, September 23, 2016 at 3:38:21 AM UTC+12, Chris Angelico wrote: > This is why, despite the confusion it sometimes causes, we all prefer > duck typing to static typing. The csv.DictReader wants a "file-like > object", not necessarily a file - and in this case, all it asks is an > iterable

Re: pypy on windows much slower than linux/mac when using complex number type?

2016-09-23 Thread Irmen de Jong
On 20-9-2016 22:38, Irmen de Jong wrote: > Hi, > > I've stumbled across a peculiar performance issue with Pypy across some > different > platforms. It was very visible in some calculation heavy code that I wrote > that uses > Python's complex number type to calculate the well-known Mandelbrot se

Re: memory utilization blow up with dict structure

2016-09-23 Thread Peter Otten
Christian wrote: > Hi, > > I'm wondering why python blow up a dictionary structure so much. > > The ids and cat substructure could have 0..n entries but in the most cases > they are <= 10,t is limited by <= 6. > > Thanks for any advice to save memory. > Christian > > > Example: > > {'0a0f7a3

Re: memory utilization blow up with dict structure

2016-09-23 Thread Christian
Am Freitag, 23. September 2016 12:02:47 UTC+2 schrieb Chris Angelico: > On Fri, Sep 23, 2016 at 7:05 PM, Christian wrote: > > I'm wondering why python blow up a dictionary structure so much. > > > > The ids and cat substructure could have 0..n entries but in the most cases > > they are <= 10,t is

Re: Looking for tips and gotchas for working with Python 3.5 zipapp feature

2016-09-23 Thread Paul Moore
On Tuesday, 20 September 2016 05:45:53 UTC+1, Malcolm Greene wrote: > I really appreciate the detailed response. You answered all my > questions. I'm looking forward to testing out your pylaunch wrapper. Just one further note, which may or may not be obvious. If your application uses external

Re: get the sum of differences between integers in a list

2016-09-23 Thread Peter Otten
Daiyue Weng wrote: > i, I am new to the advanced python techniques, and by studying your code, > I understand that when calling grouped function with values[1, 2, 3, 6, 8, > 9, 10, 11, 13, 17, 19], > > tee(values, 3) generated 3 iterators shared values > > left contains [1, 2, 3, 6, 8, 9, 10, 11

Re: memory utilization blow up with dict structure

2016-09-23 Thread Chris Angelico
On Fri, Sep 23, 2016 at 7:05 PM, Christian wrote: > I'm wondering why python blow up a dictionary structure so much. > > The ids and cat substructure could have 0..n entries but in the most cases > they are <= 10,t is limited by <= 6. > > Example: > > {'0a0f7a3a0e09826caef1bff707785662': {'ids':

memory utilization blow up with dict structure

2016-09-23 Thread Christian
Hi, I'm wondering why python blow up a dictionary structure so much. The ids and cat substructure could have 0..n entries but in the most cases they are <= 10,t is limited by <= 6. Thanks for any advice to save memory. Christian Example: {'0a0f7a3a0e09826caef1bff707785662': {'ids': {'aa316b

PyThreadState_Get

2016-09-23 Thread Bharadwaj Srivatsa
Which ever project I am trying to install using python setup.py install command, i am getting the following error.. python -mtrace --trace setup.py install Fatal Python error: PyThreadState_Get: no current thread ABORT instruction (core dumped) How to get rid of this error and whats the cause

Re: h(re) for help, import re - on NameError

2016-09-23 Thread Chris Angelico
On Fri, Sep 23, 2016 at 4:40 PM, Peter Otten <__pete...@web.de> wrote: > By the way, the current help() already loads a module if you pass its name > as a string: > Yes, which is the basis of my alternate exec trick: exec(tb.tb_frame.f_code, tb.tb_frame.f_globals, {n: n}) Basically it creates a