Re: [Python-ideas] Inconsistencies (was: Shuffled)

2016-09-10 Thread Lawrence D’Oliveiro
On Sunday, September 11, 2016 at 1:00:47 AM UTC+12, Chris Angelico wrote: > > On Sat, Sep 10, 2016 at 10:09 PM, Sven R. Kunze wrote: >> You might have heard of: "There are no such things as facts, just opinions. > > Yes, I've heard that. It is false. It’s very easy to see why: start by asking wh

Re: [Python-ideas] Inconsistencies (was: Shuffled)

2016-09-10 Thread Chris Angelico
On Sun, Sep 11, 2016 at 2:27 PM, Rustom Mody wrote: > On Saturday, September 10, 2016 at 6:30:47 PM UTC+5:30, Chris Angelico wrote: >> Redirecting to python-list as I don't believe this belongs on -ideas. >> >> On Sat, Sep 10, 2016 at 10:09 PM, Sven R. Kunze wrote: >> > You might have heard of: "T

Re: [Python-ideas] Inconsistencies (was: Shuffled)

2016-09-10 Thread Rustom Mody
On Saturday, September 10, 2016 at 6:30:47 PM UTC+5:30, Chris Angelico wrote: > Redirecting to python-list as I don't believe this belongs on -ideas. > > On Sat, Sep 10, 2016 at 10:09 PM, Sven R. Kunze wrote: > > You might have heard of: "There are no such things as facts, just opinions. > > Every

Re: generator function - Called and accepts XML attributes- Python 3.5

2016-09-10 Thread Sayth Renshaw
This seems to work as a starter. def return_files(file_list): """ Take a list of files and return file when called Calling function to supply attributes """ for filename in sorted(file_list): with open(dir_path + filename) as fd: doc = xmltodict.parse(f

Re: generator function - Called and accepts XML attributes- Python 3.5

2016-09-10 Thread Sayth Renshaw
> The way I'm reading your code, it's not the generator that's the > difference here. Consider these lines: > > > for item in doc['meeting']['race']: > > > > def return_files(file_list): > > for filename in sorted(file_list, *attribs): > > for item in doc([attribs]): > >

Re: generator function - Called and accepts XML attributes- Python 3.5

2016-09-10 Thread Chris Angelico
On Sun, Sep 11, 2016 at 10:46 AM, Sayth Renshaw wrote: > Hi > > I want to create a generator function that supplies my calling function a > file, how though do I get the generator to accept attributes in the argument > when called? > > This works not as a generator The way I'm reading your code

generator function - Called and accepts XML attributes- Python 3.5

2016-09-10 Thread Sayth Renshaw
Hi I want to create a generator function that supplies my calling function a file, how though do I get the generator to accept attributes in the argument when called? This works not as a generator for filename in sorted(file_list): with open(dir_path + filename) as fd: doc = xmlto

Re: collect2: ld returned 1 exit status when building from source

2016-09-10 Thread Steve D'Aprano
On Sun, 11 Sep 2016 03:34 am, Zachary Ware wrote: > Try make distclean, then configure and build again. If that fails, try > another make distclean, then configure, do 'make touch', then build again. I worked around the failed hg touch by running it manually: python2.7 /usr/bin/hg --config exte

Re: collect2: ld returned 1 exit status when building from source

2016-09-10 Thread Steve D'Aprano
On Sun, 11 Sep 2016 03:34 am, Zachary Ware wrote: > On Sep 10, 2016 09:56, "Steve D'Aprano" > wrote: >> >> I'm trying to build from source using: >> >> ./configure --with-pydebug && make -s -j2 [...] >> Any suggestions for fixing this? > > Try make distclean, then configure and build again. S

Re: collect2: ld returned 1 exit status when building from source

2016-09-10 Thread Zachary Ware
On Sep 10, 2016 09:56, "Steve D'Aprano" wrote: > > I'm trying to build from source using: > > ./configure --with-pydebug && make -s -j2 > > > At first the output is okay, then I get a whole heap of similar errors: > > Python/dtrace_stubs.o: In function `PyDTrace_LINE': > /home/steve/python/python-

Re: [Python-ideas] Inconsistencies (was: Shuffled)

2016-09-10 Thread Rustom Mody
On Saturday, September 10, 2016 at 6:30:47 PM UTC+5:30, Chris Angelico wrote: > Redirecting to python-list as I don't believe this belongs on -ideas. > > On Sat, Sep 10, 2016 at 10:09 PM, Sven R. Kunze wrote: > >> On 08.09.2016 04:00, Steven D'Aprano wrote: > >> > >> On Wed, Sep 07, 2016 at 11:43:

collect2: ld returned 1 exit status when building from source

2016-09-10 Thread Steve D'Aprano
I'm trying to build from source using: ./configure --with-pydebug && make -s -j2 At first the output is okay, then I get a whole heap of similar errors: Python/dtrace_stubs.o: In function `PyDTrace_LINE': /home/steve/python/python-dev/cpython/Include/pydtrace.h:25: multiple definition of `PyDTr

Re: Python source repo

2016-09-10 Thread Steve D'Aprano
On Sun, 11 Sep 2016 01:04 am, Steve D'Aprano wrote: > I ran hg fetch to update the CPython repo. > > It has been stuck on "adding changesets" for half an hour. I don't know if > that's because the process has locked up, or because there really are that > many new changesets and it will simply tak

Python source repo

2016-09-10 Thread Steve D'Aprano
I ran hg fetch to update the CPython repo. It has been stuck on "adding changesets" for half an hour. I don't know if that's because the process has locked up, or because there really are that many new changesets and it will simply take a long time to process them. (With the 3.6 beta just around

Re: python3 regex?

2016-09-10 Thread Doug OLeary
Hey, all; thanks for the replies - reading data in one slurp vs line by line was the issue. In my perl programs, when reading files, I generally do it all in one swell foop and will probably end up doing so again in this case due to the layout of the text; but, that's my issue. Thanks again.

Re: [Python-ideas] Inconsistencies (was: Shuffled)

2016-09-10 Thread Chris Angelico
Redirecting to python-list as I don't believe this belongs on -ideas. On Sat, Sep 10, 2016 at 10:09 PM, Sven R. Kunze wrote: >> On 08.09.2016 04:00, Steven D'Aprano wrote: >> >> On Wed, Sep 07, 2016 at 11:43:59PM +0200, Sven R. Kunze wrote: >> >>> BUT experienced devs also need to recognize and r

Re: Extend unicodedata with a name/pattern/regex search for character entity references?

2016-09-10 Thread Rustom Mody
On Saturday, September 10, 2016 at 3:56:37 PM UTC+5:30, Veek 'this_is_not_my_name' M wrote: > Veek 'this_is_not_my_name' M wrote: Recursion… Self-Reference…Inversion Heh! On the way to becoming another Gödel/Turing?? You may be interested in this collection of some evidence(s) of recursion bei

Re: Extend unicodedata with a name/pattern/regex search for character entity references?

2016-09-10 Thread Tim Golden
On 10/09/2016 11:26, Veek 'this_is_not_my_name' M wrote: Veek 'this_is_not_my_name' M wrote: /me claps TJG -- https://mail.python.org/mailman/listinfo/python-list

Re: Extend unicodedata with a name/pattern/regex search for character entity references?

2016-09-10 Thread Veek 'this_is_not_my_name' M
Veek 'this_is_not_my_name' M wrote: > Rustom Mody wrote: > >> On Saturday, September 3, 2016 at 5:25:48 PM UTC+5:30, Veek. M wrote: >>> https://mail.python.org/pipermail//python-ideas/2014-October/029630.htm >>> >>> Wanted to know if the above link idea, had been implemented and if >>> there's a

Re: Mysterious Logging Handlers

2016-09-10 Thread dieter
Josh English writes: > I have a Python script that imports a utility script. Both scripts use > logging, but the logs don't work as advertised. I'm getting logging output > from the utility script but none from the main file. Worse, the format of the > utility script's logs don't match anything

Re: How to diagnose CERTIFICATE_VERIFY_FAILED on Windows for websites working in browsers?

2016-09-10 Thread dieter
Chi Hsuan Yen writes: > ... > I found that OpenSSL provides an X509 callback hook that allows clients to > know why the verification process fails. For a long time, Python 2 (unlike Python 3) did not perform certificate validation at all. As a consequence, some developpers provided the functional

Re: python3 regex?

2016-09-10 Thread breamoreboy
On Saturday, September 10, 2016 at 4:12:17 AM UTC+1, Doug OLeary wrote: > Hey; > > Long term perl ahderent finally making the leap to python. From my reading, > python, for the most part, uses perl regex.. except, I can't seem to make it > work... > > I have a txt file from which I can grab sp