Re: enhancement request: make py3 read/write py2 pickle format

2015-06-09 Thread Steven D'Aprano
On Wednesday 10 June 2015 13:57, random...@fastmail.us wrote: > On Tue, Jun 9, 2015, at 23:52, Steven D'Aprano wrote: >> > For human readable serialized data, text format protocol buffers are >> > seriously underrated. (Relatedly: underdocumented, too.) >> >> Ironically, literal_eval is designed

Re: enhancement request: make py3 read/write py2 pickle format

2015-06-09 Thread Devin Jeanpierre
On Tue, Jun 9, 2015 at 8:52 PM, Steven D'Aprano wrote: > On Wednesday 10 June 2015 10:47, Devin Jeanpierre wrote: > >> Passing around data that can be put into ast.literal_eval is >> synonymous with passing around data taht can be put into eval. It >> sounds like a trap. > > In what way? I misspo

Re: enhancement request: make py3 read/write py2 pickle format

2015-06-09 Thread Chris Angelico
On Wed, Jun 10, 2015 at 1:57 PM, wrote: > On Tue, Jun 9, 2015, at 23:52, Steven D'Aprano wrote: >> > For human readable serialized data, text format protocol buffers are >> > seriously underrated. (Relatedly: underdocumented, too.) >> >> Ironically, literal_eval is designed to process text-format

Re: enhancement request: make py3 read/write py2 pickle format

2015-06-09 Thread random832
On Tue, Jun 9, 2015, at 23:52, Steven D'Aprano wrote: > > For human readable serialized data, text format protocol buffers are > > seriously underrated. (Relatedly: underdocumented, too.) > > Ironically, literal_eval is designed to process text-format protocols > using > human-readable Python syn

Re: enhancement request: make py3 read/write py2 pickle format

2015-06-09 Thread Steven D'Aprano
On Wednesday 10 June 2015 10:47, Devin Jeanpierre wrote: > Passing around data that can be put into ast.literal_eval is > synonymous with passing around data taht can be put into eval. It > sounds like a trap. In what way? literal_eval will cleanly and safely refuse to evaluate strings like:

Re: Parser needed.

2015-06-09 Thread Rustom Mody
On Wednesday, June 10, 2015 at 5:04:17 AM UTC+5:30, Michael Torrie wrote: > On 06/09/2015 06:20 AM, Skybuck Flying wrote: > > Euhm... > > > > My parser is already done... since today > > > > Loving it too > > > > Wrote it myself... based on the c# code technique explained somewhere in > > this

Re: enhancement request: make py3 read/write py2 pickle format

2015-06-09 Thread Chris Angelico
On Wed, Jun 10, 2015 at 10:47 AM, Devin Jeanpierre wrote: > Passing around data that can be put into ast.literal_eval is > synonymous with passing around data taht can be put into eval. It > sounds like a trap. Except that it's hugely restricted. There are JSON parsing libraries all over the plac

Re: enhancement request: make py3 read/write py2 pickle format

2015-06-09 Thread Devin Jeanpierre
Passing around data that can be put into ast.literal_eval is synonymous with passing around data taht can be put into eval. It sounds like a trap. Other points against JSON / etc.: the lack of schema makes it easier to stuff anything in there (not as easily as pickle, mind), and by returning a pla

Re: enhancement request: make py3 read/write py2 pickle format

2015-06-09 Thread Irmen de Jong
On 10-6-2015 1:06, Chris Angelico wrote: > On Wed, Jun 10, 2015 at 6:07 AM, Devin Jeanpierre > wrote: >> There's a lot of subtle issues with pickle compatibility. e.g. >> old-style vs new-style classes. It's kinda hard and it's better to >> give up. I definitely agree it's better to use something

Re: Want to readout the control file of aria2.

2015-06-09 Thread Hongyi Zhao
On Tue, 09 Jun 2015 23:29:43 +, Hongyi Zhao wrote: > On Wed, 10 Jun 2015 00:58:41 +0200, Laura Creighton wrote: > >> No promises -- I never used this myself, but it looks like: >> >> https://github.com/killuahzl/pyaria2 >> >> parses pyaria files for its own purposes, so you could steal code

Re: Want to readout the control file of aria2.

2015-06-09 Thread Hongyi Zhao
On Tue, 09 Jun 2015 19:21:30 -0400, Joel Goldstick wrote: >> https://mail.python.org/mailman/listinfo/python-list > > Well, maybe Laura's link will be what you need? Not still. Laura's link is a python script which interactively using aria2 for downloading via rpc. I want to readout the binar

Re: Parser needed.

2015-06-09 Thread Michael Torrie
On 06/09/2015 06:20 AM, Skybuck Flying wrote: > Euhm... > > My parser is already done... since today > > Loving it too > > Wrote it myself... based on the c# code technique explained somewhere in > this thread too I'm glad you're having fun, and making good progress. And it's good to hear of

Re: Want to readout the control file of aria2.

2015-06-09 Thread Hongyi Zhao
On Wed, 10 Jun 2015 00:58:41 +0200, Laura Creighton wrote: > No promises -- I never used this myself, but it looks like: > > https://github.com/killuahzl/pyaria2 > > parses pyaria files for its own purposes, so you could steal code from > there. > > Laura Thanks, but it doesn't do the same thi

Re: Want to readout the control file of aria2.

2015-06-09 Thread Joel Goldstick
On Tue, Jun 9, 2015 at 7:19 PM, Hongyi Zhao wrote: > On Tue, 09 Jun 2015 18:52:00 -0400, Joel Goldstick wrote: > >> I found this: http://aria.pasteur.fr/developers/aria-python-api >> >> Does that help? > > The aria mentioned by your above links is completely different thing WRT > the one I posted

Re: Want to readout the control file of aria2.

2015-06-09 Thread Hongyi Zhao
On Tue, 09 Jun 2015 18:52:00 -0400, Joel Goldstick wrote: > I found this: http://aria.pasteur.fr/developers/aria-python-api > > Does that help? The aria mentioned by your above links is completely different thing WRT the one I posted here ;-( Regards -- .: Hongyi Zhao [ hongyi.zhao AT gmail.c

Re: enhancement request: make py3 read/write py2 pickle format

2015-06-09 Thread Chris Angelico
On Wed, Jun 10, 2015 at 6:07 AM, Devin Jeanpierre wrote: > There's a lot of subtle issues with pickle compatibility. e.g. > old-style vs new-style classes. It's kinda hard and it's better to > give up. I definitely agree it's better to use something else instead. > For example, we switched to usin

Re: Want to readout the control file of aria2.

2015-06-09 Thread Laura Creighton
No promises -- I never used this myself, but it looks like: https://github.com/killuahzl/pyaria2 parses pyaria files for its own purposes, so you could steal code from there. Laura -- https://mail.python.org/mailman/listinfo/python-list

Re: Want to readout the control file of aria2.

2015-06-09 Thread Joel Goldstick
On Tue, Jun 9, 2015 at 6:21 PM, Hongyi Zhao wrote: > Hi all, > > I want to read out the control file of aria2, which is a binary file > including the data format depicted here: > > http://aria2.sourceforge.net/manual/en/html/technical-notes.html > > Could you please give me some snipped codes for

Want to readout the control file of aria2.

2015-06-09 Thread Hongyi Zhao
Hi all, I want to read out the control file of aria2, which is a binary file including the data format depicted here: http://aria2.sourceforge.net/manual/en/html/technical-notes.html Could you please give me some snipped codes for this purpose? Regards -- .: Hongyi Zhao [ hongyi.zhao AT gmail

Re: enhancement request: make py3 read/write py2 pickle format

2015-06-09 Thread Devin Jeanpierre
There's a lot of subtle issues with pickle compatibility. e.g. old-style vs new-style classes. It's kinda hard and it's better to give up. I definitely agree it's better to use something else instead. For example, we switched to using protocol buffers, which have much better compatibility propertie

Re: enhancement request: make py3 read/write py2 pickle format

2015-06-09 Thread Serhiy Storchaka
On 09.06.15 21:31, Laura Creighton wrote: We have an issue about that. https://bugs.python.org/issue13566 Go there and say you want it too. :) I afraid issue title is too general. :) The issue is only about one minor detail of py3 to py2 compatibility. -- https://mail.python.org/mailman/lis

Re: enhancement request: make py3 read/write py2 pickle format

2015-06-09 Thread Serhiy Storchaka
On 09.06.15 21:08, Neal Becker wrote: One of the most annoying problems with py2/3 interoperability is that the pickle formats are not compatible. There must be many who, like myself, often use pickle format for data storage. It certainly would be a big help if py3 could read/write py2 pickle f

Re: enhancement request: make py3 read/write py2 pickle format

2015-06-09 Thread Zachary Ware
On Tue, Jun 9, 2015 at 1:08 PM, Neal Becker wrote: > One of the most annoying problems with py2/3 interoperability is that the > pickle formats are not compatible. There must be many who, like myself, > often use pickle format for data storage. > > It certainly would be a big help if py3 could re

Re: enhancement request: make py3 read/write py2 pickle format

2015-06-09 Thread Chris Warrick
On Tue, Jun 9, 2015 at 8:08 PM, Neal Becker wrote: > One of the most annoying problems with py2/3 interoperability is that the > pickle formats are not compatible. There must be many who, like myself, > often use pickle format for data storage. > > It certainly would be a big help if py3 could re

Re: enhancement request: make py3 read/write py2 pickle format

2015-06-09 Thread Laura Creighton
In a message of Tue, 09 Jun 2015 14:08:25 -0400, Neal Becker writes: >One of the most annoying problems with py2/3 interoperability is that the >pickle formats are not compatible. There must be many who, like myself, >often use pickle format for data storage. > >It certainly would be a big help

Re: enhancement request: make py3 read/write py2 pickle format

2015-06-09 Thread Mark Lawrence
On 09/06/2015 19:08, Neal Becker wrote: One of the most annoying problems with py2/3 interoperability is that the pickle formats are not compatible. There must be many who, like myself, often use pickle format for data storage. It certainly would be a big help if py3 could read/write py2 pickle

enhancement request: make py3 read/write py2 pickle format

2015-06-09 Thread Neal Becker
One of the most annoying problems with py2/3 interoperability is that the pickle formats are not compatible. There must be many who, like myself, often use pickle format for data storage. It certainly would be a big help if py3 could read/write py2 pickle format. You know, backward compatibil

Re: Cheat sheet for the new string formatting?

2015-06-09 Thread Mark Lawrence
On 09/06/2015 13:15, Skip Montanaro wrote: One thing which seems obvious now is that since format() delegates to the individual types for formatting, much of the documentation of this stuff must now be delegated to the individual types. However, I can't find anything about the formatting syntax

Re: Cheat sheet for the new string formatting?

2015-06-09 Thread Skip Montanaro
On Tue, Jun 9, 2015 at 7:29 AM, wrote: > Where have you looked? Have you read > https://docs.python.org/3/library/string.html#formatspec ? Yes, but I missed the None section. I looked closely at 'g', but didn't see anything like "this is the default". I will admit I was a bit frustrated to see t

Re: Cheat sheet for the new string formatting?

2015-06-09 Thread random832
On Tue, Jun 9, 2015, at 08:15, Skip Montanaro wrote: > Skip> Why don't floats support "{:.Ns}"? (I know I can use "{!s}".) > > random832> Why would they? The old style didn't support %.Ns either. > > Well, the old style does, though it appears the N is ignored: > > >>> "%5s" % -0.00666762259822

Re: Parser needed.

2015-06-09 Thread Skybuck Flying
Euhm... My parser is already done... since today Loving it too Wrote it myself... based on the c# code technique explained somewhere in this thread too Bye, Skybuck. -- https://mail.python.org/mailman/listinfo/python-list

Re: Cheat sheet for the new string formatting?

2015-06-09 Thread Skip Montanaro
Skip> Why don't floats support "{:.Ns}"? (I know I can use "{!s}".) random832> Why would they? The old style didn't support %.Ns either. Well, the old style does, though it appears the N is ignored: >>> "%5s" % -0.00666762259822 '-0.00666762259822' It doesn't raise an exception though. (This i

Re: Parser needed.

2015-06-09 Thread Ryan Stuart
On Tue, Jun 9, 2015 at 12:30 PM, Skybuck Flying wrote: > Anyway... I am trying a more robust parser... because my own parser right > now didn't work out for new inputs. > You should take a look at lrparsing: https://pypi.python.org/pypi/lrparsing/1.0.11 Cheers > > It almost worked except for

EuroPython 2015: Educational Summit

2015-06-09 Thread M.-A. Lemburg
We are proud to announce an educational summit at EuroPython 2015. This is being organized together with the Raspberry Pi Foundation (https://www.raspberrypi.org/). *** EuroPython 2015 Educational Summit *** https://ep2015.europython.eu/en/events/educational-summit/ We will hav