From: W. Trevor King Date: Thu, 4 Oct 2012 12:00:16 +0000 (-0400) Subject: Import as _* to avoid namespace pollution. X-Git-Tag: v3.0~72^2~54 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=7d551adaa42071bec4616ae9dbfcd9c99d74f0f8;p=rss2email.git Import as _* to avoid namespace pollution. Also update import locations for Python 3.2. --- diff --git a/rss2email.py b/rss2email.py index 9a782e6..bce4a27 100755 --- a/rss2email.py +++ b/rss2email.py @@ -30,35 +30,36 @@ ___contributors__ = [ 'Aaron Swartz (original author)', ] -from email.MIMEText import MIMEText -from email.Header import Header -from email.Utils import parseaddr, formataddr -import hashlib -import cPickle as pickle -import os -import smtplib -import socket -import subprocess -import sys -import threading -import time -import traceback -import types -import urllib2 -import xml.dom.minidom -import xml.sax.saxutils +from email.mime.text import MIMEText as _MIMEText +from email.header import Header as _Header +from email.utils import parseaddr as _parseaddr +from email.utils import formataddr as _formataddr +import hashlib as _hashlib +import os as _os +import pickle as _pickle +import smtplib as _smtplib +import socket as _socket +import subprocess as _subprocess +import sys as _sys +import threading as _threading +import time as _time +import traceback as _traceback +import types as _types +import urllib.request as _urllib_request +import xml.dom.minidom as _minidom +import xml.sax.saxutils as _saxutils unix = 0 try: - import fcntl + import fcntl as _fcntl # A pox on SunOS file locking methods if (sys.platform.find('sunos') == -1): unix = 1 except: pass -import feedparser -import html2text as h2t +import feedparser as _feedparser +import html2text as _html2text hash = hashlib.md5 urllib2.install_opener(urllib2.build_opener())