Mailing List Archive

Update silence.py for fixes/31
Hi Mythticles,

Can anyone update silence.py from the wiki to work with python3 and the
fixes/31 version of the Myth python bindings? I had a go but I'm
drowning in "can't concatenate string and bytes" errors.

Cheers,

Tim.
Re: Update silence.py for fixes/31 [ In reply to ]
On Thu, Apr 16, 2020 at 6:57 AM TimP <mythtv@corky.co> wrote:

> Hi Mythticles,
>
> Can anyone update silence.py from the wiki to work with python3 and the
> fixes/31 version of the Myth python bindings? I had a go but I'm drowning
> in "can't concatenate string and bytes" errors.
>

Have you tried running "2to3" on it? It's not always 100% but it does a
pretty good job.

Thanks,
Richard
Re: Update silence.py for fixes/31 [ In reply to ]
On 2020-04-16 13:04, Richard Shaw wrote:

> On Thu, Apr 16, 2020 at 6:57 AM TimP <mythtv@corky.co> wrote:
>
>> Hi Mythticles,
>>
>> Can anyone update silence.py from the wiki to work with python3 and the fixes/31 version of the Myth python bindings? I had a go but I'm drowning in "can't concatenate string and bytes" errors.
>
> Have you tried running "2to3" on it? It's not always 100% but it does a pretty good job.
>
> Thanks,
> Richard

Yes I did, it didn't flag anything. I don't think it's clever enough to
figure out that the data type of some importe libraries has changed.
Re: Update silence.py for fixes/31 [ In reply to ]
On 2020-04-16 16:30, TimP wrote:

> On 2020-04-16 13:04, Richard Shaw wrote:
>
>> Have you tried running "2to3" on it? It's not always 100% but it does a pretty good job.
>>
>> Thanks,
>> Richard
>
> Yes I did, it didn't flag anything. I don't think it's clever enough to figure out that the data type of some imported libraries has changed.

Managed to get it working, the problem was that files and pipes now
return bytes rather than strings. Working nicely again. I would have
updated the wiki page but I've lost my account details and I can't
create a new one so attached is a patch for anyone that cares
Re: Update silence.py for fixes/31 [ In reply to ]
On Friday, 24 April 2020 12:07:38 BST TimP wrote:
> On 2020-04-16 16:30, TimP wrote:
> > On 2020-04-16 13:04, Richard Shaw wrote:
> >> Have you tried running "2to3" on it? It's not always 100% but it does a
> >> pretty good job.
> >>
> >> Thanks,
> >> Richard
> >
> > Yes I did, it didn't flag anything. I don't think it's clever enough to
> > figure out that the data type of some imported libraries has changed.
> Managed to get it working, the problem was that files and pipes now
> return bytes rather than strings. Working nicely again. I would have
> updated the wiki page but I've lost my account details and I can't
> create a new one so attached is a patch for anyone that cares

wiki page updated.


Regards, Steve Goodey
Colchester, England
mailto://steve@goodey.org
Registered Linux User #372670 http://counter.li.org

Hello to Jason Isaacs