[Python-ideas] Proposal: Query language extension to Python (PythonQL)

2017-03-24 Thread Pavel Velikhov
Hi folks! We started a project to extend Python with a full-blown query language about a year ago. The project is call PythonQL, the links are given below in the references section. We have implemented what is kind of an alpha version now, and gained some experience and insights about why and

[Python-ideas] Adding an 'errors' argument to print

2017-03-24 Thread Ryan Gonzalez
Recently, I was working on a Windows GUI application that ends up running ffmpeg, and I wanted to see the command that was being run. However, the file name had a Unicode character in it (it's a Sawano song), and when I tried to print it to the console, it crashed during the encode/decode. (The enc

Re: [Python-ideas] Adding an 'errors' argument to print

2017-03-24 Thread Paul Moore
On 24 March 2017 at 15:41, Ryan Gonzalez wrote: > Recently, I was working on a Windows GUI application that ends up running > ffmpeg, and I wanted to see the command that was being run. However, the > file name had a Unicode character in it (it's a Sawano song), and when I > tried to print it to t

Re: [Python-ideas] Adding an 'errors' argument to print

2017-03-24 Thread Victor Stinner
*If* we change something, I would prefer to modify sys.stdout. The following issue proposes to add sys.stdout.set_encoding(errors='replace'): http://bugs.python.org/issue15216 You can already set the PYTHONIOENCODING environment variable to ":replace" to use "replace" on sys.stdout (and sys.stderr

Re: [Python-ideas] Proposal: Query language extension to Python (PythonQL)

2017-03-24 Thread Terry Reedy
On 3/24/2017 11:10 AM, Pavel Velikhov wrote: Hi folks! We started a project to extend Python with a full-blown query language about a year ago. The project is call PythonQL, the links are given below in the references section. We have implemented what is kind of an alpha version now, and gaine

Re: [Python-ideas] Adding an 'errors' argument to print

2017-03-24 Thread Guido van Rossum
On Fri, Mar 24, 2017 at 9:37 AM, Victor Stinner wrote: > *If* we change something, I would prefer to modify sys.stdout. The > following issue proposes to add > sys.stdout.set_encoding(errors='replace'): > http://bugs.python.org/issue15216 > I like that. > You can already set the PYTHONIOENCODI

Re: [Python-ideas] Adding an 'errors' argument to print

2017-03-24 Thread Paul Moore
On 24 March 2017 at 16:37, Victor Stinner wrote: > *If* we change something, I would prefer to modify sys.stdout. The > following issue proposes to add > sys.stdout.set_encoding(errors='replace'): > http://bugs.python.org/issue15216 I thought I recalled seeing something like that discussed somewh

Re: [Python-ideas] Proposal: Query language extension to Python (PythonQL)

2017-03-24 Thread Pavel Velikhov
Hi Terry! Thanks for your feedback, I have a couple comments below. > On 24 Mar 2017, at 20:50, Terry Reedy wrote: > > On 3/24/2017 11:10 AM, Pavel Velikhov wrote: >> Hi folks! >> >> We started a project to extend Python with a full-blown query language >> about a year ago. The project is cal

Re: [Python-ideas] Adding an 'errors' argument to print

2017-03-24 Thread Steven D'Aprano
On Fri, Mar 24, 2017 at 10:41:58AM -0500, Ryan Gonzalez wrote: > Recently, I was working on a Windows GUI application that ends up running > ffmpeg, and I wanted to see the command that was being run. However, the > file name had a Unicode character in it (it's a Sawano song), and when I > tried to

Re: [Python-ideas] Proposal: Query language extension to Python (PythonQL)

2017-03-24 Thread Greg Ewing
Terry Reedy wrote: PQL expressions should be quoted and passed to the dsl processor, as done with SQL and other DSLs. But embedding one language as quoted strings inside another is a horrible way to program. I really like the idea of a data manipulation language that is seamlessly integrated w