Thank you so much for the help.
I'm self-studying and watching tutorials on youTube. The problem was given
as an exercise after the tutorial.
I did modify my code based on the suggestions here and it helps.
Thank you!
On Tue, Aug 25, 2020 at 4:31 PM Schachner, Joseph <
joseph.schach...@teledyne.
On 27Aug2020 14:36, Chris Green wrote:
>Cameron Simpson wrote:
>> I do ok, though most of my message processing happens to messages
>> already landed in my "spool" Maildir by getmail. My setup uses getmail
>> to get messages with POP into a single Maildir, and then I process the
>> message files
On 27Aug2020 23:54, Marco Sulla wrote:
>Are you sure you want `str()`?
>
str(b'aaa')
>"b'aaa'"
>
>Probably you want:
>
>map(lambda x: x.decode(), bbb)
_And_ you need to know the encoding of the text in the bytes. The above
_assumes_ UTF-8 because that is the default for bytes.decode, and if
Are you sure you want `str()`?
>>> str(b'aaa')
"b'aaa'"
Probably you want:
map(lambda x: x.decode(), bbb)
--
https://mail.python.org/mailman/listinfo/python-list
On Fri, Aug 28, 2020 at 6:36 AM Chris Green wrote:
>
> This sounds quite an easy thing to do but I can't find how to do it
> elegantly.
>
> I have a list of bytes class objects (i.e. a list containing sequences
> of bytes, which are basically text) and I want to convert it to a list
> of string ob
This sounds quite an easy thing to do but I can't find how to do it
elegantly.
I have a list of bytes class objects (i.e. a list containing sequences
of bytes, which are basically text) and I want to convert it to a list
of string objects.
One of the difficulties of finding out how to do this is
On 2020-08-27 17:29, Barry Scott wrote:
On 26 Aug 2020, at 16:10, Chris Green wrote:
UnicodeEncodeError: 'ascii' codec can't encode character '\ufeff' in position
4: ordinal not in range(128)
So what do I need to do to the message I'm adding with mbx.add(msg) to
fix this? (I assume that'
> On 27 Aug 2020, at 18:00, Muskan Sanghai wrote:
>
> I would be really thankful if someone can suggest me how can I generate
> subtitles file (srt format) from a video or audio without using Google cloud
> and AWS.
What do you know about how subtitles work with video? Do you mean you wa
Samuel Marks wrote at 2020-8-27 15:58 +1000:
>The main thing I want is type safety. I want Python to complain if the
>callee uses the wrong argument types, and to provide suggestions on
>what's needed and info about it.
>
>Without a base class I can just have docstrings and type annotations
>to ach
I would be really thankful if someone can suggest me how can I generate
subtitles file (srt format) from a video or audio without using Google cloud
and AWS.
--
https://mail.python.org/mailman/listinfo/python-list
> On 26 Aug 2020, at 16:10, Chris Green wrote:
>
> UnicodeEncodeError: 'ascii' codec can't encode character '\ufeff' in
> position 4: ordinal not in range(128)
>
> So what do I need to do to the message I'm adding with mbx.add(msg) to
> fix this? (I assume that's what I need to do).
>>> i
> On 27 Aug 2020, at 10:40, Chris Green wrote:
>
> Karsten Hilbert wrote:
>>> Terry Reedy wrote:
> On 8/26/2020 11:10 AM, Chris Green wrote:
>
>> I have a simple[ish] local mbox mail delivery module as follows:-
> ...
>> It has run faultlessly for many years under Python
Richard Damon wrote:
> On 8/27/20 4:31 AM, Chris Green wrote:
> > While an E-Mail body possibly *shouldn't* have non-ASCII characters in
> > it one must be able to handle them without errors. In fact haven't
> > the RFCs changed such that the message body should be 8-bit clean?
> > Anyway I think
Cameron Simpson wrote:
> On 27Aug2020 09:16, Chris Green wrote:
> >Cameron Simpson wrote:
> >> But note: joining bytes like strings is uncommon, and may indicate
> >> that
> >> you should be working in strings to start with. Eg you may want to
> >> convert popmsg from bytes to str and do a str.
> > > Because of this, the Python 3 str type is not suitable to store an email
> > > message, since it insists on the string being Unicode encoded,
> >
> > I should greatly appreciate to be enlightened as to what
> > a "string being Unicode encoded" is intended to say ?
> >
>
> A Python 3 "str" or
On Thu, Aug 27, 2020 at 11:10 PM Karsten Hilbert
wrote:
>
> > Because of this, the Python 3 str type is not suitable to store an email
> > message, since it insists on the string being Unicode encoded,
>
> I should greatly appreciate to be enlightened as to what
> a "string being Unicode encoded"
> Because of this, the Python 3 str type is not suitable to store an email
> message, since it insists on the string being Unicode encoded,
I should greatly appreciate to be enlightened as to what
a "string being Unicode encoded" is intended to say ?
Thanks,
Karsten
--
https://mail.python.org/ma
poniedziałek, 16 kwietnia 2018 o 10:51:37 UTC+2 jtsh...@gmail.com napisał(a):
> On Monday, February 6, 2017 at 10:46:24 AM UTC+5:30, Jean-Claude Roy wrote:
> > I am trying to install Python 3.6.0 on a Windows 7 computer.
> > The download of 29.1 MB is successful and I get the nextwindow. I choose
On 8/27/20 4:31 AM, Chris Green wrote:
> While an E-Mail body possibly *shouldn't* have non-ASCII characters in
> it one must be able to handle them without errors. In fact haven't
> the RFCs changed such that the message body should be 8-bit clean?
> Anyway I think the Python 3 mail handling libr
On 27Aug2020 09:16, Chris Green wrote:
>Cameron Simpson wrote:
>> But note: joining bytes like strings is uncommon, and may indicate
>> that
>> you should be working in strings to start with. Eg you may want to
>> convert popmsg from bytes to str and do a str.join anyway. It depends on
>> exactl
Karsten Hilbert wrote:
> > Terry Reedy wrote:
> > > On 8/26/2020 11:10 AM, Chris Green wrote:
> > >
> > > > I have a simple[ish] local mbox mail delivery module as follows:-
> > > ...
> > > > It has run faultlessly for many years under Python 2. I've now
> > > > changed the calling program to Py
On 27Aug2020 09:31, Chris Green wrote:
>I can provoke the error simply by sending myself an E-Mail with
>accented characters in it. I'm pretty sure my Linux system is set up
>correctly for UTF8 characters, I certainly seem to be able to send and
>receive these to others and I even get to see mess
Chris Green wrote:
> To add a little to this, the problem is definitely when I receive a
> message with UTF8 (or at least non-ascci) characters in it. My code
> is basically very simple, the main program reads an E-Mail message
> received from .forward on its standard input and makes it into an m
> Terry Reedy wrote:
> > On 8/26/2020 11:10 AM, Chris Green wrote:
> >
> > > I have a simple[ish] local mbox mail delivery module as follows:-
> > ...
> > > It has run faultlessly for many years under Python 2. I've now
> > > changed the calling program to Python 3 and while it handles most
> > >
Peter J. Holzer wrote:
> The problem is that the message contains a '\ufeff' character (byte
> order mark) where email/generator.py expects only ASCII characters.
>
> I see two possible reasons for this:
>
> * The mbox writing code assumes that all messages with non-ascii
>characters are QP
Terry Reedy wrote:
> On 8/26/2020 11:10 AM, Chris Green wrote:
>
> > I have a simple[ish] local mbox mail delivery module as follows:-
> ...
> > It has run faultlessly for many years under Python 2. I've now
> > changed the calling program to Python 3 and while it handles most
> > E-Mail OK I ha
Cameron Simpson wrote:
> On 26Aug2020 15:09, Chris Green wrote:
> >2qdxy4rzwzuui...@potatochowder.com wrote:
> >> Join bytes objects with a byte object:
> >>
> >> b"\n".join(popmsg[1])
> >
> >Aaahhh! Thank you (and the other reply).
>
> But note: joining bytes like strings is uncommon, and
Samuel Marks wrote:
> The main thing I want is type safety. I want Python to complain if the
> callee uses the wrong argument types, and to provide suggestions on
> what's needed and info about it.
>
> Without a base class I can just have docstrings and type annotations
> to achieve that.
>
> Wh
28 matches
Mail list logo