Hi All,
I decided to start a new thread as this really is a new subject.
I've got two that appear to be identical, but fail to compare. After getting
the ascii encoding I see that they are indeed different, my question is how can
I replace the \u2019m with a regular single quote mark (or apostr
On Wed, 8 Jun 2022 at 18:12, Dave wrote:
> I tried the but it doesn’t seem to work?
> myCompareFile1 = ascii(myTitleName)
> myCompareFile1.replace("\u2019", "'")
Strings in Python are immutable. When you call ascii(), you get back a
new string, but it's one that has actual backslashes and such i
PS
I’ve also tried:
myCompareFile1 = myTitleName
myCompareFile1.replace("\u2019", "'")
myCompareFile2 = myCompareFileName
myCompareFile2.replace("\u2019", "'")
Which also doesn’t work, the replace itself work but it still fails the compare?
> On 8 Jun 2022, at 10:08, Dave wrote:
>
> Hi All,
>
On Wed, 8 Jun 2022 at 18:20, Dave wrote:
>
> PS
>
> I’ve also tried:
> myCompareFile1 = myTitleName
> myCompareFile1.replace("\u2019", "'")
> myCompareFile2 = myCompareFileName
> myCompareFile2.replace("\u2019", "'")
> Which also doesn’t work, the replace itself work but it still fails the
> comp
Hi,
Thanks for this!
So, is there a copy function/method that returns a MutableString like in
objective-C? I’ve solved this problems before in a number of languages like
Objective-C and AppleScript.
Basically there is a set of common characters that need “normalizing” and I
have a method tha
On Wed, 8 Jun 2022 at 19:13, Dave wrote:
>
> Hi,
>
> Thanks for this!
>
> So, is there a copy function/method that returns a MutableString like in
> objective-C? I’ve solved this problems before in a number of languages like
> Objective-C and AppleScript.
>
> Basically there is a set of common c
Am Wed, Jun 08, 2022 at 11:09:05AM +0200 schrieb Dave:
> myString = 'Hello'
> myNewstring = myString.replace(myString,'e','a’)
That won't work (last quote) but apart from that:
myNewstring = myString.replace('e', 'a')
Karsten
--
GPG 40BE 5B0E C98E 1713 AFA6 5BC0 3BEA AC80 7D4F C89B
--
https:
On Wed, Jun 8, 2022 at 5:22 AM Karsten Hilbert wrote:
>
> Am Wed, Jun 08, 2022 at 11:09:05AM +0200 schrieb Dave:
>
> > myString = 'Hello'
> > myNewstring = myString.replace(myString,'e','a’)
>
> That won't work (last quote) but apart from that:
>
> myNewstring = myString.replace('e', 'a')
>
> Kars
Hi,
I misunderstood how it worked, basically I’ve added this function:
def filterCommonCharacters(theString):
myNewString = theString.replace("\u2019", "'")
return myNewString
Which returns a new string replacing the common characters.
This can easily be extended to include other chara
Op 8/06/2022 om 11:25 schreef Dave:
Hi,
I misunderstood how it worked, basically I’ve added this function:
def filterCommonCharacters(theString):
myNewString = theString.replace("\u2019", "'")
return myNewString
Which returns a new string replacing the common characters.
This can e
On Wed, Jun 8, 2022 at 1:11 AM Dave wrote:
> I've got two that appear to be identical, but fail to compare. After
> getting the ascii encoding I see that they are indeed different, my
> question is how can I replace the \u2019m with a regular single quote mark
> (or apostrophe)?
>
Perhaps try ht
On 2022-06-08, Dave wrote:
> Hi All,
>
> I decided to start a new thread as this really is a new subject.
>
> I've got two that appear to be identical, but fail to compare. After getting
> the ascii encoding I see that they are indeed different, my question is how
> can I replace the \u2019m wit
On 2022-06-08, dn wrote:
> On 08/06/2022 10.18, De ongekruisigde wrote:
>> On 2022-06-08, Christian Gollwitzer wrote:
>>> Am 07.06.22 um 21:56 schrieb Dave:
It depends on the language I’m using, in Objective C, I’d use isNumeric,
just wanted to know what the equivalent is in Python.
>>
On 2022-06-08, Dave wrote:
> I hate regEx and avoid it whenever possible, I’ve never found something that
> was impossible to do without it.
I love regular expressions and use them where appropriate. Saves tons of
code and is often much more readable than the pages of code required to
do the sam
> On 8 Jun 2022, at 11:25, Dave wrote:
>
>myNewString = theString.replace("\u2014", “]” #just an example
Opps! Make that
myNewString = myNewString.replace("\u2014", “]” #just an example
--
https://mail.python.org/mailman/listinfo/python-list
On 2022-06-08, Christian Gollwitzer wrote:
> Am 07.06.22 um 23:01 schrieb Christian Gollwitzer:
>
>>> In [3]: re.sub(r'^\d+\s*', '', s) Out[3]: 'Trinket'
>>>
>
> that RE does match what you intended to do, but not exactly what you
> wrote in the OP. that would be '^\d\d.' start with exactly two
On 2022-06-08, Dave wrote:
> I misunderstood how it worked, basically I’ve added this function:
>
> def filterCommonCharacters(theString):
> myNewString = theString.replace("\u2019", "'")
> return myNewString
> Which returns a new string replacing the common characters.
>
> This can easil
Dave,
Your goal is to compare titles and there can be endless replacements needed if
you allow the text to contain anything but ASCII.
Have you considered stripping out things instead? I mean remove lots of stuff
that is not ASCII in the first place and perhaps also remove lots of extra
punctu
Hi,
This is a tool I’m using on my own files to save me time. Basically or most of
the tracks were imported with different version iTunes over the years. There
are two problems:
1. File System characters are replaced (you can’t have ‘/‘ or ‘:’ in a file
name).
2. Smart Quotes were added at
> On 7 Jun 2022, at 23:24, Dave wrote:
>
> Yes, it was probably just a typeo on my part.
>
> I’ve now fixed the majority of cases but still got two strings that look
> identical but fail to match, this time (again by 10cc), “I’m Mandy Fly Me”.
>
> I’m putting money on it being a utf8 problem
On 2022-06-08 at 08:07:40 -,
De ongekruisigde wrote:
> Depending on the problem a regular expression may be the much simpler
> solution. I love them for e.g. text parsing and use them all the time.
> Unrivaled when e.g. parts of text have to be extracted, e.g. from lines
> like these:
>
>
On Thu, 9 Jun 2022 at 03:15, <2qdxy4rzwzuui...@potatochowder.com> wrote:
>
> On 2022-06-08 at 08:07:40 -,
> De ongekruisigde wrote:
>
> > Depending on the problem a regular expression may be the much simpler
> > solution. I love them for e.g. text parsing and use them all the time.
> > Unrival
> On 8 Jun 2022, at 18:01, Dave wrote:
>
> Hi,
>
> This is a tool I’m using on my own files to save me time. Basically or most
> of the tracks were imported with different version iTunes over the years.
> There are two problems:
>
> 1. File System characters are replaced (you can’t have ‘
On 2022-06-09 at 03:18:56 +1000,
Chris Angelico wrote:
> On Thu, 9 Jun 2022 at 03:15, <2qdxy4rzwzuui...@potatochowder.com> wrote:
> >
> > On 2022-06-08 at 08:07:40 -,
> > De ongekruisigde wrote:
> >
> > > Depending on the problem a regular expression may be the much simpler
> > > solution. I
On Thu, 9 Jun 2022 at 04:14, <2qdxy4rzwzuui...@potatochowder.com> wrote:
>
> On 2022-06-09 at 03:18:56 +1000,
> Chris Angelico wrote:
>
> > On Thu, 9 Jun 2022 at 03:15, <2qdxy4rzwzuui...@potatochowder.com> wrote:
> > >
> > > On 2022-06-08 at 08:07:40 -,
> > > De ongekruisigde wrote:
> > >
> >
On 2022-06-09 at 04:15:46 +1000,
Chris Angelico wrote:
> On Thu, 9 Jun 2022 at 04:14, <2qdxy4rzwzuui...@potatochowder.com> wrote:
> >
> > On 2022-06-09 at 03:18:56 +1000,
> > Chris Angelico wrote:
> >
> > > On Thu, 9 Jun 2022 at 03:15, <2qdxy4rzwzuui...@potatochowder.com> wrote:
> > > >
> > > >
On 2022-06-08, 2qdxy4rzwzuui...@potatochowder.com
<2qdxy4rzwzuui...@potatochowder.com> wrote:
> On 2022-06-08 at 08:07:40 -,
> De ongekruisigde wrote:
>
>> Depending on the problem a regular expression may be the much simpler
>> solution. I love them for e.g. text parsing and use them all the
On Wed, 8 Jun 2022 01:53:26 + (UTC), Avi Gross
declaimed the following:
>
>So is it necessary to insist on an exact pattern of two digits followed by a
>space?
>
>
>That would fail on "44 Minutes", "40 Oz. Dream", "50 Mission Cap", "50 Ways to
>Say Goodbye", "99 Ways to Die"
>
>It looks
On 2022-06-08, 2qdxy4rzwzuui...@potatochowder.com
<2qdxy4rzwzuui...@potatochowder.com> wrote:
> On 2022-06-09 at 04:15:46 +1000,
> Chris Angelico wrote:
>
>> On Thu, 9 Jun 2022 at 04:14, <2qdxy4rzwzuui...@potatochowder.com> wrote:
>> >
>> > On 2022-06-09 at 03:18:56 +1000,
>> > Chris Angelico wr
On Wed, 8 Jun 2022 11:09:05 +0200, Dave declaimed
the following:
>Hi,
>
>Thanks for this!
>
>So, is there a copy function/method that returns a MutableString like in
>objective-C? I’ve solved this problems before in a number of languages like
>Objective-C and AppleScript.
There are no
On 8/06/22 10:26 pm, Jon Ribbens wrote:
Here's a head-start on some characters you might want to translate,
Another possibility that might make sense in this case is to simply
strip out all punctuation before comparing. That would take care of
things being spelled with or without hyphens, comma
On 9/06/22 5:55 am, Dennis Lee Bieber wrote:
There are no mutable strings in Python.
If you really want a mutable sequence of characters, you can
use array.array, but you won't be able to use it directly in
place of a string in most contexts.
--
Greg
--
https://mail.python.org/mailma
Why am I not getting debug output on my windows 10 machine:
C:\temp>\Windows\py.exe -0
-V:3.11 *Python 3.11 (64-bit)
-V:3.10 Python 3.10 (64-bit)
C:\temp>set PYLAUNCH_DEBUG=1
C:\temp>\Windows\py.exe
Python 3.11.0b3 (main, Jun 1 2022, 13:29:14) [MSC v.1932 64 bit (AMD64)] on
Hi,
I’ve found you also need to take care of multiple disk CD releases. These have
a format of
“1-01 Track Name”
“2-02 Trackl Name"
Meaning Disk 1 Track1, Disk 2, Track 2.
Also A and B Sides (from Vinyl LPs)
“A1-Track Name”
“B2-Track Name”
Side A, Track 1, etc.
Cheers
Dave
> On 8 Jun 202
34 matches
Mail list logo