Re: How to debug TypeError: required field "lineno" missing from expr?

2015-06-28 Thread Steven D'Aprano
On Mon, 29 Jun 2015 11:14 am, Mark Lawrence wrote: > Purely as an exercise I've been converting Grant Jenks' pypatt[1] from > 2.7 to 3.4. I've managed to sort out most of the required changes by > checking on what I can see with an AST pretty printer[2]. So it's > rather frustrating to have the

Re: How to debug TypeError: required field "lineno" missing from expr?

2015-06-28 Thread Terry Reedy
On 6/28/2015 9:14 PM, Mark Lawrence wrote: Purely as an exercise I've been converting Grant Jenks' pypatt[1] from 2.7 to 3.4. With 2to3 or by hand? I've managed to sort out most of the required changes by checking on what I can see with an AST pretty printer[2]. So it's rather frustrating t

Re: Readline -- cannot bind to both Ctrl-tab and tab at the same time?

2015-06-28 Thread Chris Angelico
On Mon, Jun 29, 2015 at 4:55 AM, Steven D'Aprano wrote: > Try Ctrl-TAB again, and you'll get "raise" instead of "import". > > Can anyone else replicate this issue? > > Is this a Python issue, a problem with the terminal I am using, or readline > in general? Confirmed with Python 3.6 on Debian Jes

How to debug TypeError: required field "lineno" missing from expr?

2015-06-28 Thread Mark Lawrence
Purely as an exercise I've been converting Grant Jenks' pypatt[1] from 2.7 to 3.4. I've managed to sort out most of the required changes by checking on what I can see with an AST pretty printer[2]. So it's rather frustrating to have the compile stage throw the error given in the subject line.

Re: Readline -- cannot bind to both Ctrl-tab and tab at the same time?

2015-06-28 Thread random832
On Sun, Jun 28, 2015, at 14:55, Steven D'Aprano wrote: > I'm trying to use a readline binding for both TAB and Ctrl-TAB, but it's > not > working for me. Whichever I install second seems to over-ride the first. Can you bind it directly to whatever escape sequence ctrl-tab produces? Some terminals

Re: enumerate XML tags (keys that will become headers) along with text (values) and write to CSV in one row (as opposed to "stacked" values with one header)

2015-06-28 Thread Ned Batchelder
On Sunday, June 28, 2015 at 5:02:19 PM UTC-4, Denis McMahon wrote: > On Sun, 28 Jun 2015 09:46:36 +0200, Stefan Behnel wrote: > > > Denis McMahon schrieb am 26.06.2015 um 09:44: > >> xml data is an unordered list, and are trying to assign an order to it. > >> > >> If the xml data was ordered, eit

Re: Readline -- cannot bind to both Ctrl-tab and tab at the same time?

2015-06-28 Thread Laura Creighton
I can reproduce this with Python 2.7.9 (default, Mar 1 2015, 12:57:24) on my debian unstable system. On pypy both forms just silently fail to install the binding at all. Since PyPy has its own readline, this is circumstantial evidence that readline is the problem. It's not just you. Laura --

Re: enumerate XML tags (keys that will become headers) along with text (values) and write to CSV in one row (as opposed to "stacked" values with one header)

2015-06-28 Thread Denis McMahon
On Sun, 28 Jun 2015 09:46:36 +0200, Stefan Behnel wrote: > Denis McMahon schrieb am 26.06.2015 um 09:44: >> xml data is an unordered list, and are trying to assign an order to it. >> >> If the xml data was ordered, either each tag would be different, or >> each tag would have an attribute specify

Readline -- cannot bind to both Ctrl-tab and tab at the same time?

2015-06-28 Thread Steven D'Aprano
I'm trying to use a readline binding for both TAB and Ctrl-TAB, but it's not working for me. Whichever I install second seems to over-ride the first. In the Python interactive interpreter under Linux, enter these two lines: import readline readline.parse_and_bind('Control-tab: "import"') Then

Re: Pure Python Data Mangling or Encrypting

2015-06-28 Thread Jon Ribbens
On 2015-06-27, Randall Smith wrote: > Thankyou. Nice points. I do think given the risks (there are always > risks) discussed, a successful attack of this nature is not very likely. > Worse case, something that looks like this would land on the disk. > > crc32 checksum + translation table + ma

Re: Pure Python Data Mangling or Encrypting

2015-06-28 Thread Jon Ribbens
On 2015-06-27, Steven D'Aprano wrote: > Despite his initial claim that he doesn't want to use AES because it's too > slow implemented as pure Python, Randall has said that the application will > offer AES encryption as an option. (He says it is enabled by default, > except that the user can turn i

imaplib Thread fetching

2015-06-28 Thread Great Avenger Singh
Hello Everyone, I reached this place by searching about Python and Imaplib. After reading few conversations I found this place quite colourful covering/discussing wide range of things. I am using Imaplib for Gmail Analysis program. Kind of results I need is as follows: https://drive.google.co

Re: enumerate XML tags (keys that will become headers) along with text (values) and write to CSV in one row (as opposed to "stacked" values with one header)

2015-06-28 Thread Stefan Behnel
Denis McMahon schrieb am 26.06.2015 um 09:44: > xml data is an unordered list, and are trying to assign an order to it. > > If the xml data was ordered, either each tag would be different, or each > tag would have an attribute specifying a sequence number. XML is not unordered. The document orde

Re: HOPE: A Python just-in-time compiler for astrophysical computations

2015-06-28 Thread Stefan Behnel
Michael Torrie schrieb am 26.06.2015 um 19:32: > I've never heard of pythran; I'll have to check it out and see how it > compares to the ever-growing crop of Python dialect compilers. My feeling is that Python seems such a simple language at the surface that people who want to write a special purp