Archived Forum Post

Index of archived forum posts

Question:

CKimap uses reserved word in python wrapper

Dec 28 '15 at 09:18

Hello

sorry for maybe silly question, but http://www.chilkatsoft.com/refdoc/pythonCkEmailRef.html

strVal is a string # ckStr is a CkString email.get_From(ckStr); strVal = email.from(); email.put_From(strVal);

The combined name and email address of the sender, such as "John Smith" . This is the content that will be placed in the From: header field. If the actual sender is to be different, then set the Sender property to a different email address.

in python "from" will cause syntax error since it's reserved word


Answer

The documentation is wrong and needs to be updated. The lowercase "from" property is actually named "ck_from" because of this problem. Your code should be:

strVal = email.ck_from();

It is correct in the actual module/lib, but not correct in the documentation..