Steve D'Aprano wrote:
> On Sun, 25 Jun 2017 07:17 am, Peter Otten wrote:
>
>> Then I'd fix the name manually...
>
> The file name isn't broken.
>
>
> What's broken is parts of the OP's code which assumes that non-ASCII file
> names are broken...
Hm, the OP says
'06 - Todd\xe2\x80\x99s Song (
Steve D'Aprano writes:
> What's the right/best way to test whether an object is an exception
> ahead of time? (That is, without trying to raise from it.)
Maybe I'm missing something but
isinstance(obj, Exception)
seems to work.
--
https://mail.python.org/mailman/listinfo/python-list
On Sun, 25 Jun 2017 04:57 pm, Peter Otten wrote:
> Steve D'Aprano wrote:
>
>> On Sun, 25 Jun 2017 07:17 am, Peter Otten wrote:
>>
>>> Then I'd fix the name manually...
>>
>> The file name isn't broken.
>>
>>
>> What's broken is parts of the OP's code which assumes that non-ASCII file
>> names
Steve D'Aprano wrote:
> On Sun, 25 Jun 2017 04:57 pm, Peter Otten wrote:
>> if everything worked correctly? Though I don't understand why the OP
>> doesn't see
>>
>> '06 - Toddâ\x80\x99s Song (Post-Spiderland Song in Progress).flac'
>>
>> which is the repr() that I get.
>
> That's mojibake and
On Sun, 25 Jun 2017 02:23:15 -0700, wxjmfauth wrote:
> Le samedi 24 juin 2017 21:10:47 UTC+2, alister a écrit :
>> On Sat, 24 Jun 2017 14:57:21 -0400, Rod Person wrote:
>>
>> > \xe2\x80\x99,
>>
>> because the file name has been created using "Right single quote"
>> instead of apostrophe, the gly
Ok...so after reading all the replies in the thread, I thought I would
be easier to send a general reply and include some links to screenshots.
As Peter mention, the logic thing to do would be to fix the file name
to what I actually thought it was and if this was for work that
probably what I woul
On 06/25/2017 06:19 AM, Rod Person wrote:
> But doing a simple ls of that directory show it is unicode but the
> replacement of the offending character.
>
> http://rodperson.com/graphics/uc/ls.png
Now that is really strange. Your OS seems to not recognize that the
filename is in UTF-8. I suspec
Rod Person wrote:
> Ok...so after reading all the replies in the thread, I thought I would
> be easier to send a general reply and include some links to screenshots.
>
> As Peter mention, the logic thing to do would be to fix the file name
> to what I actually thought it was and if this was for w
On Sun, 25 Jun 2017 08:18:45 -0600
Michael Torrie wrote:
> On 06/25/2017 06:19 AM, Rod Person wrote:
> > But doing a simple ls of that directory show it is unicode but the
> > replacement of the offending character.
> >
> > http://rodperson.com/graphics/uc/ls.png
>
> Now that is really strang
Forgot to include this reply to the list (as others may want to comment).
-- Forwarded message --
From: Paul Barry
Date: 24 June 2017 at 12:21
Subject: Re: Unable to convert pandas object to string
To: Bhaskar Dhariyal
Note that .info(), according to its docs, gives you a "Conc
On Sun, 25 Jun 2017 05:50 pm, Paul Rubin wrote:
> Steve D'Aprano writes:
>> What's the right/best way to test whether an object is an exception
>> ahead of time? (That is, without trying to raise from it.)
>
> Maybe I'm missing something but
>isinstance(obj, Exception)
> seems to work.
Not
>
> py> isinstance(KeyboardInterrupt(), Exception)
> False
> py> isinstance(ValueError, Exception)
> False
>
I might have missed something, but don't you want to be using BaseException
as your class/type? Also, Checking isinstance() between two classes isn't
likely to work, I don't think.
Both th
On 06/25/17 12:10, Steve D'Aprano wrote:
py> isinstance(KeyboardInterrupt(), Exception)
False
py> isinstance(ValueError, Exception)
False
That's because KeyboardInterrupt is not a subclass of Exception. If you
want to catch that as well you need to check against BaseException.
https://docs.
As discussed in the Python-Ideas mailing list, sometimes we want to suppress a
particular kind of exception and replace it with another.
For that reason, I'd like to announce exception_guard, a context manager and
decorator which catches specified exceptions and replaces them with a given
exceptio
On Mon, 26 Jun 2017 02:40 am, Skip Montanaro wrote:
>> py> isinstance(KeyboardInterrupt(), Exception)
>> False
>> py> isinstance(ValueError, Exception)
>> False
>>
>
> I might have missed something, but don't you want to be using BaseException
> as your class/type?
Yes I do, which is why I was
Just felt like posting, wouldn't it be pythonic if it was
if word in [list]:
ignore
Save time and easily maintainable
Cmg
On 23 Jun 2017 02:41, "John Black" wrote:
All, in case this is useful to anyone, this rule that tells my newsreader
which posts to kill really cleans up the group. I c
On Mon, 26 Jun 2017 08:44 am, Stefan Ram wrote:
> When I enter »12\«, I get a continuation prompt in the
> Python 3.6 console:
>
12\
> ...
>
> . I thought that this might indicate that the logical line
> is not terminated yet.
No. You get the level 2 prompt (sys.ps2) for a number o
Steve D'Aprano writes:
> On Mon, 26 Jun 2017 08:44 am, Stefan Ram wrote:
>
> > According to The Python Language Reference Release 3.6.0, 2.1.3
> > Comments, »A comment signifies the end of the logical line unless
> > the implicit line joining rules are invoked.«.
> >
> > So, why do I get
I've become a bit more familiar with wxglade , wxFormBuilder and to a
lesser extent BoaConstructor.
There are however numerous other possiblities and
extensions .
I'd like to eventually have 3D graphics within an
application constructed through a GUI Designer ;
preferably with quality approach
Edward Montague writes:
> I'd like to eventually have 3D graphics within an application
For that requirement, your application will need to make use of a
library for presenting and interacting with 3D objects.
To my knowledge there is no such thing in the standard library, so
you'll need to b
On 6/25/2017 11:32 PM, Ben Finney wrote:
Steve D'Aprano writes:
On Mon, 26 Jun 2017 08:44 am, Stefan Ram wrote:
According to The Python Language Reference Release 3.6.0, 2.1.3
Comments, »A comment signifies the end of the logical line unless
the implicit line joining rules are invok
21 matches
Mail list logo