Re: file.write() of non-ASCII characters differs in Interpreted Python than in script run

2015-08-25 Thread dieter
RAH writes: > I experienced an incomprehensible behavior (I've spent already many hours on > this subject): the `file.write('string')` provides an error in run mode and > not when interpreted at the console. Maybe, I can explain the behavior: the interactive interpreter uses magic to determine

Re: file.write() of non-ASCII characters differs in Interpreted Python than in script run

2015-08-25 Thread Chris Angelico
On Wed, Aug 26, 2015 at 7:19 AM, RAH wrote: > rb = request_body.decode() # string I'd recommend avoiding this operation in Python 2. As of Python 3, omitting the encoding means "UTF-8", but in Python 2 it means "use the default encoding", and that often ca

Re: file.write() of non-ASCII characters differs in Interpreted Python than in script run

2015-08-25 Thread Chris Kaynor
On Tue, Aug 25, 2015 at 2:19 PM, RAH wrote: > Dear All, > > I experienced an incomprehensible behavior (I've spent already many hours on > this subject): the `file.write('string')` provides an error in run mode and > not when interpreted at the console. The string must contain non-ASCII > chara

file.write() of non-ASCII characters differs in Interpreted Python than in script run

2015-08-25 Thread RAH
Dear All, I experienced an incomprehensible behavior (I've spent already many hours on this subject): the `file.write('string')` provides an error in run mode and not when interpreted at the console. The string must contain non-ASCII characters. If all ASCII, there is no error. The following e

[RELEASED] Python 3.5.0rc2 is now available

2015-08-25 Thread Larry Hastings
On behalf of the Python development community and the Python 3.5 release team, I'm relieved to announce the availability of Python 3.5.0rc2, also known as Python 3.5.0 Release Candidate 2. Python 3.5 has now entered "feature freeze". By default new features may no longer be added to Python

Re: TypeCheck vs IsInstance in C API

2015-08-25 Thread random832
On Tue, Aug 25, 2015, at 12:56, Terry Reedy wrote: > Huh?? I fail to see the point of this buggy code. ... > The extra marginal '>' quote makes it look like this buggy code was > posted by Andrew, but it comes from random832. Actually, it comes from one of the links I posted right above it. It w

Re: [ANN] Python TreeTagger wrapper updated to 2.2.1

2015-08-25 Thread Laurent Pointal
Laurent Pointal wrote: > It is available on PyPI: … incomplete URL… Here: https://pypi.python.org/pypi/treetaggerwrapper/ -- https://mail.python.org/mailman/listinfo/python-list

[ANN] Python TreeTagger wrapper updated to 2.2.1

2015-08-25 Thread Laurent Pointal
Hello, for natural language processing, treetaggerwrapper, the Python wrapper for language independant part-of-speech statistical tagger TreeTagger from H.Schmid is now available in version 2.2.1. It is available on PyPI: https://pypi.python.org/pypi And the doc is on Read the Docs:

Re: TypeCheck vs IsInstance in C API

2015-08-25 Thread Terry Reedy
On 8/25/2015 10:32 AM, random...@fastmail.us wrote: On Mon, Aug 24, 2015, at 22:12, Andrew Wang wrote: [question snipped] And, now, your moment of zen: Huh?? I fail to see the point of this buggy code. def isa(ob, cl): try: raise ob except cl: return 1 else: return

Re: [a,b,c,d] = 1,2,3,4

2015-08-25 Thread Jussi Piitulainen
Ian Kelly writes: > On Tue, Aug 25, 2015 at 9:32 AM, Skip Montanaro wrote: >> On Tue, Aug 25, 2015 at 10:24 AM, Jussi Piitulainen wrote: >>> >>> When I try it today, round brackets also work, both in 2.6.6 and >>> 3.4.0 - no idea what version it was where they failed or if I'm >>> imagining the who

Re: [a,b,c,d] = 1,2,3,4

2015-08-25 Thread Jussi Piitulainen
Skip Montanaro writes: > On Tue, Aug 25, 2015 at 10:24 AM, Jussi Piitulainen wrote: > >> When I try it today, round brackets also work, both in 2.6.6 and >> 3.4.0 - no idea what version it was where they failed or if I'm >> imagining the whole thing. > > You are imagining the whole thing. Either

Re: [a,b,c,d] = 1,2,3,4

2015-08-25 Thread Ian Kelly
On Tue, Aug 25, 2015 at 9:32 AM, Skip Montanaro wrote: > > On Tue, Aug 25, 2015 at 10:24 AM, Jussi Piitulainen > wrote: >> >> When I try it today, round brackets >> also work, both in 2.6.6 and 3.4.0 - no idea what version it was where >> they failed or if I'm imagining the whole thing. > > > You

Re: [a,b,c,d] = 1,2,3,4

2015-08-25 Thread Skip Montanaro
On Tue, Aug 25, 2015 at 10:24 AM, Jussi Piitulainen < harvested.address@is.invalid> wrote: > When I try it today, round brackets > also work, both in 2.6.6 and 3.4.0 - no idea what version it was where > they failed or if I'm imagining the whole thing. > You are imagining the whole thing. Either

Re: [a,b,c,d] = 1,2,3,4

2015-08-25 Thread Jussi Piitulainen
"ast" writes: [a,b,c,d] = 1,2,3,4 a > 1 b > 2 c > 3 d > 4 > > I have never seen this syntax before. Is it documented. > Is there a name for that ? I remember being unhappy when a similar assignment with round brackets turned out to be invalid syntax. Then I learned (in th

Re: [a,b,c,d] = 1,2,3,4

2015-08-25 Thread ast
"Joel Goldstick" a écrit dans le message de news:mailman.27.1440515128.11709.python-l...@python.org... On Tue, Aug 25, 2015 at 10:32 AM, Cody Piersall wrote: On Tue, Aug 25, 2015 at 9:16 AM, ast wrote: The original example is one I haven't seen in the wild. I found it using matplotl

Re: [a,b,c,d] = 1,2,3,4

2015-08-25 Thread ast
"ast" a écrit dans le message de news:55dc853c$0$3083$426a7...@news.free.fr... "Joel Goldstick" a écrit dans le message de news:mailman.23.1440513059.11709.python-l...@python.org... On Tue, Aug 25, 2015 at 10:16 AM, ast wrote: [a,b,c,d] = 1,2,3,4 a 1 b 2 c 3 d 4 I have nev

Re: [a,b,c,d] = 1,2,3,4

2015-08-25 Thread ast
"Joel Goldstick" a écrit dans le message de news:mailman.23.1440513059.11709.python-l...@python.org... On Tue, Aug 25, 2015 at 10:16 AM, ast wrote: [a,b,c,d] = 1,2,3,4 a 1 b 2 c 3 d 4 I have never seen this syntax before. Is it documented. Is there a name for that ? thx -- ht

Re: [a,b,c,d] = 1,2,3,4

2015-08-25 Thread Joel Goldstick
On Tue, Aug 25, 2015 at 10:32 AM, Cody Piersall wrote: > > > On Tue, Aug 25, 2015 at 9:16 AM, ast wrote: > > [a,b,c,d] = 1,2,3,4 > a >> >> 1 > > b >> >> 2 > > c >> >> 3 > > d >> >> 4 >> >> I have never seen this syntax before. Is it documented. >> Is there a na

Re: [a,b,c,d] = 1,2,3,4

2015-08-25 Thread Jean-Michel Pichavant
- Original Message - > From: "ast" > To: python-list@python.org > Sent: Tuesday, 25 August, 2015 4:16:17 PM > Subject: [a,b,c,d] = 1,2,3,4 > > >>> [a,b,c,d] = 1,2,3,4 > >>> a > 1 > >>> b > 2 > >>> c > 3 > >>> d > 4 > > I have never seen this syntax before. Is it documented. > Is there a

Re: [a,b,c,d] = 1,2,3,4

2015-08-25 Thread Cody Piersall
On Tue, Aug 25, 2015 at 9:16 AM, ast wrote: > [a,b,c,d] = 1,2,3,4 a >>> 1 > >> b >>> 2 > >> c >>> 3 > >> d >>> 4 > > I have never seen this syntax before. Is it documented. > Is there a name for that ? > > thx > -- > https://mail.python.org/mailman/listinfo/python-list >

Re: TypeCheck vs IsInstance in C API

2015-08-25 Thread random832
On Mon, Aug 24, 2015, at 22:12, Andrew Wang wrote: > Hi. > > I know this thread is ancient, but I would like to know the answer > as well > ( https://mail.python.org/pipermail/python-list/2006-May/413542.html). Of course, the answer in 2015 is actually very different from the answer in 2006, sinc

Re: [a,b,c,d] = 1,2,3,4

2015-08-25 Thread Joel Goldstick
On Tue, Aug 25, 2015 at 10:16 AM, ast wrote: [a,b,c,d] = 1,2,3,4 a > > 1 b > > 2 c > > 3 d > > 4 > > I have never seen this syntax before. Is it documented. > Is there a name for that ? > > thx > -- > https://mail.python.org/mailman/listinfo/python-list its

[a,b,c,d] = 1,2,3,4

2015-08-25 Thread ast
[a,b,c,d] = 1,2,3,4 a 1 b 2 c 3 d 4 I have never seen this syntax before. Is it documented. Is there a name for that ? thx -- https://mail.python.org/mailman/listinfo/python-list

RE: Logging to a file from a C-extension

2015-08-25 Thread AllanPfalzgraf
Stefan, You have understood my question. I'm new to Python. Could I use a Cython solution to get suggestions on just how to go about this in the C extension? Otherwise could you suggest which C-API functions I should be looking at? Thanks, Al -Original Message- From: Stefan Behnel [

Pyitect V2 support for 2.6+ and big chagnes

2015-08-25 Thread ryexander
A while back I posted my plugin framework module asking for feedback I only got one person to respond but that just fine, they gave me plenty to think on. I'm back to showcase my improvements. https://github.com/Ryex/pyitect The biggest change in V2 is that Python versions 2.6 and up are suppor

Re: Best strategy for testing class and subclasses in pytest?

2015-08-25 Thread Jean-Michel Pichavant
> From: "C.D. Reimer" > Greetings, > > I'm writing a chess engine to learn about Python classes and > inheritance, and using pytest for the unit test. [snip] > I tried to create a separate class and/or module to import the common > tests for each class and subclass. My attempts often ended in fa

Re: required help with python code.

2015-08-25 Thread Peter Otten
Srinivas, Jostna wrote: > I am trying to write a python code to create tableau data extract using > tableau API. > > In the process I am facing following error. > > Please help me to fix. I tried a lot but couldn't get over net. Its > critical requirement and we need your help. Posting a pictur

Re: required help with python code.

2015-08-25 Thread Chris Angelico
On Tue, Aug 25, 2015 at 6:20 PM, Srinivas, Jostna wrote: > > In the process I am facing following error. > > Please help me to fix. I tried a lot but couldn’t get over net. Its critical > requirement and we need your help. > Please do two things to help us to help you: 1) Make a simple file tha

Re: required help with python code.

2015-08-25 Thread Ben Finney
"Srinivas, Jostna" writes: > I am trying to write a python code to create tableau data extract > using tableau API. What is that? Does it have a website? Does it have its own community of users and developers? Your questions about Python are welcome here, and we'll help if we can. That said, if

required help with python code.

2015-08-25 Thread Srinivas, Jostna
Hi, I am trying to write a python code to create tableau data extract using tableau API. In the process I am facing following error. Please help me to fix. I tried a lot but couldn't get over net. Its critical requirement and we need your help. [cid:image001.png@01D0DC37.285DEAE0] r Regards

TypeCheck vs IsInstance in C API

2015-08-25 Thread Andrew Wang
Hi. I know this thread is ancient, but I would like to know the answer as well ( https://mail.python.org/pipermail/python-list/2006-May/413542.html). Thanks. Andrew -- https://mail.python.org/mailman/listinfo/python-list