Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
100% Quality Score
Upvotes Received
1
Posts with Upvotes
1
Upvoting Members
1
Downvotes Received
0
Posts with Downvotes
0
Downvoting Members
0
0 Endorsements
~7K People Reached
Favorite Forums
Favorite Tags
Member Avatar for dmpop

Hello, I'm not a programmer, so please bear with me. I'm using the following script with Python 2.6 to send emails with attachments from the command line. [CODE]#!/usr/bin/python import smtplib from email.MIMEMultipart import MIMEMultipart from email.MIMEBase import MIMEBase from email.MIMEText import MIMEText from email import Encoders import os import sys …

Member Avatar for vegaseat
1
143
Member Avatar for dmpop

Hello, I need to fetch and display message subjects containing a specific word. Here is what I've got so far: [CODE]import imaplib imap = IMAP4("imap.mail.com") imap.login("username", "password") r, data = imap.select('INBOX') r, data = imap.search(None, '(SUBJECT "Reminder")')[/CODE] What I need now is to print a list of subjects of the …

Member Avatar for dmpop
0
7K
Member Avatar for dmpop

Hello, Yet another silly question from yours truly. I need to add escape characters to " and ', so that "monkey's cool" becomes \"monkey's cool\". My primitive solution to the problem is as follows: [CODE]str1=raw_input("String:") str1=str1.replace("'", "\\'") str1=str1.replace("\"", "\\\"")[/CODE] But I bet there is a more efficient and elegant solution …

Member Avatar for dmpop
0
113
Member Avatar for dmpop

Hello, A complete Python newbie needs help. :-) I have a simple script that updates the 'note' field in a MySQL database table based on the record's id: [CODE]id=raw_input("Record id: ") update=raw_input("Note: ") cursor.execute ("UPDATE notes SET note='"+update+"' WHERE id='"+id+"'""") print "\nRecord has been updated."[/CODE] The problem with this solution …

Member Avatar for dmpop
0
165