Sample code for 30+ languages & platforms
CkPython

Transition from Imap.FetchSingle to Imap.FetchEmail

Provides instructions for replacing deprecated FetchSingle method calls with FetchEmail.

Chilkat CkPython Downloads

CkPython
import sys
import chilkat

success = False

imap = chilkat.CkImap()

# ...
# ...

# ------------------------------------------------------------------------
# The FetchSingle method is deprecated:

# emailObj is a CkEmail
emailObj = imap.FetchSingle(1,False)
if (imap.get_LastMethodSuccess() == False):
    print(imap.lastErrorText())
    sys.exit()

# ...
# ...

# ------------------------------------------------------------------------
# Do the equivalent using FetchEmail.
# Your application creates a new, empty Email object which is passed 
# in the last argument and filled upon success.

headerOnly = False

email = chilkat.CkEmail()
success = imap.FetchEmail(headerOnly,1,False,email)
if (success == False):
    print(imap.lastErrorText())
    sys.exit()