[issue41387] Escape needed in the email documentation example

2020-07-25 Thread Antonio Gutierrez


Antonio Gutierrez  added the comment:

>
> OK, I will do that.
>
>

--

___
Python tracker 
<https://bugs.python.org/issue41387>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41387] Escape needed in the email documentation example

2020-07-24 Thread Antonio Gutierrez

Antonio Gutierrez  added the comment:

OK, first I am sorry , I did try again when I read your message( because it
has all the sense), and yes it works, probably I corrected something else
that made it work, i don't know. I'll try to make better reports in the
future.

El vie., 24 jul. 2020 a las 21:38, Antonio Gutierrez (<
rep...@bugs.python.org>) escribió:

>
> Antonio Gutierrez  added the comment:
>
> I forget to mention that I am receiving the mails with gmail, I don't know
> if that is important or not. It shouldn't be different right, but for me it
> is, if i don't use the escape the image is send and I can get it from the
> attachment, but I am unable to see it in the html message. Maybe I am
> doing something wrong.
>
> El vie., 24 jul. 2020 a las 21:25, Lewis Ball ()
> escribió:
>
> >
> > Lewis Ball  added the comment:
> >
> > So I have just tried it out and the example seems to work fine for me as
> > it is (tested using 3.8.2).
> >
> > Note that escaping the " in this case makes no difference to the string:
> > ```
> > >>> """""" == """"""
> > True
> > ```
> >
> > --
> > nosy: +Lewis Ball
> >
> > ___
> > Python tracker 
> > <https://bugs.python.org/issue41387>
> > ___
> >
>
> --
>
> ___
> Python tracker 
> <https://bugs.python.org/issue41387>
> ___
>

--

___
Python tracker 
<https://bugs.python.org/issue41387>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41387] Escape needed in the email documentation example

2020-07-24 Thread Antonio Gutierrez

Antonio Gutierrez  added the comment:

I forget to mention that I am receiving the mails with gmail, I don't know
if that is important or not. It shouldn't be different right, but for me it
is, if i don't use the escape the image is send and I can get it from the
attachment, but I am unable to see it in the html message. Maybe I am
doing something wrong.

El vie., 24 jul. 2020 a las 21:25, Lewis Ball ()
escribió:

>
> Lewis Ball  added the comment:
>
> So I have just tried it out and the example seems to work fine for me as
> it is (tested using 3.8.2).
>
> Note that escaping the " in this case makes no difference to the string:
> ```
> >>> """""" == """"""
> True
> ```
>
> --
> nosy: +Lewis Ball
>
> ___
> Python tracker 
> <https://bugs.python.org/issue41387>
> ___
>

--

___
Python tracker 
<https://bugs.python.org/issue41387>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41387] Wrong example, need scpae \"

2020-07-24 Thread Antonio Gutierrez


Change by Antonio Gutierrez :


--
assignee:  -> docs@python
components: +Documentation
nosy: +docs@python
versions: +Python 3.8

___
Python tracker 
<https://bugs.python.org/issue41387>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41387] Wrong example, need scpae \"

2020-07-24 Thread Antonio Gutierrez

New submission from Antonio Gutierrez :

In the main documentation, the example:

#!/usr/bin/env python3

import smtplib

from email.message import EmailMessage
from email.headerregistry import Address
from email.utils import make_msgid

# Create the base text message.
msg = EmailMessage()
msg['Subject'] = "Ayons asperges pour le déjeuner"
msg['From'] = Address("Pepé Le Pew", "pepe", "example.com")
msg['To'] = (Address("Penelope Pussycat", "penelope", "example.com"),
 Address("Fabrette Pussycat", "fabrette", "example.com"))
msg.set_content("""\
Salut!

Cela ressemble à un excellent recipie[1] déjeuner.

[1] http://www.yummly.com/recipe/Roasted-Asparagus-Epicurious-203718

--Pepé
""")

# Add the html version.  This converts the message into a multipart/alternative
# container, with the original text message as the first part and the new html
# message as the second part.
asparagus_cid = make_msgid()
msg.add_alternative("""\

  
  
Salut!
Cela ressemble à un excellent
http://www.yummly.com/recipe/Roasted-Asparagus-Epicurious-203718;>
recipie
 déjeuner.


  

""".format(asparagus_cid=asparagus_cid[1:-1]), subtype='html')
# note that we needed to peel the <> off the msgid for use in the html.

# Now add the related image to the html part.
with open("roasted-asparagus.jpg", 'rb') as img:
msg.get_payload()[1].add_related(img.read(), 'image', 'jpeg',
 cid=asparagus_cid)

# Make a local copy of what we are going to send.
with open('outgoing.msg', 'wb') as f:
f.write(bytes(msg))

# Send the message via local SMTP server.
with smtplib.SMTP('localhost') as s:
s.send_message(msg)



in the line  the " has to be escape,  , otherwise it wont read the image.

--
messages: 374197
nosy: Antonio Gutierrez
priority: normal
severity: normal
status: open
title: Wrong example, need scpae \"

___
Python tracker 
<https://bugs.python.org/issue41387>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38402] crypt: check error from library call

2019-10-07 Thread Antonio Gutierrez


Change by Antonio Gutierrez :


--
keywords: +patch
pull_requests: +16224
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/16599

___
Python tracker 
<https://bugs.python.org/issue38402>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue36161] Use thread-safe functions instead of unsafe ones (crypt, ttyname)

2019-10-05 Thread Antonio Gutierrez


Change by Antonio Gutierrez :


--
pull_requests: +16187
pull_request: https://github.com/python/cpython/pull/16599

___
Python tracker 
<https://bugs.python.org/issue36161>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue36161] Use thread-safe functions instead of unsafe ones (crypt, ttyname)

2019-07-19 Thread Antonio Gutierrez


Change by Antonio Gutierrez :


--
keywords: +patch
pull_requests: +14655
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/14868

___
Python tracker 
<https://bugs.python.org/issue36161>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com