<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Python Blog - All about python &#187; icon</title>
	<atom:link href="http://www.python-blog.com/tag/icon/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.python-blog.com</link>
	<description>and technologies around</description>
	<lastBuildDate>Tue, 27 Jul 2010 19:58:17 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Send mail with attachment from python to multiple recipients</title>
		<link>http://www.python-blog.com/2009/07/01/send-mail-with-attachment-from-python-to-multiple-recipients/</link>
		<comments>http://www.python-blog.com/2009/07/01/send-mail-with-attachment-from-python-to-multiple-recipients/#comments</comments>
		<pubDate>Wed, 01 Jul 2009 20:30:15 +0000</pubDate>
		<dc:creator>Marcin Kuźmiński</dc:creator>
				<category><![CDATA[Python]]></category>
		<category><![CDATA[attachments]]></category>
		<category><![CDATA[icon]]></category>
		<category><![CDATA[IDE]]></category>
		<category><![CDATA[mail]]></category>
		<category><![CDATA[multiple recipients]]></category>
		<category><![CDATA[orm]]></category>
		<category><![CDATA[PyDev]]></category>
		<category><![CDATA[python blog]]></category>
		<category><![CDATA[smtp]]></category>

		<guid isPermaLink="false">http://www.python-blog.com/?p=82</guid>
		<description><![CDATA[Here an example how to send a mail with attachement using built in smtp lib to multiple recipients. It&#8217;s really very simple in python. 
Just take a look at the code bellow.

'simple smtp mailer with multiple recipients and file attachments'

from email.mime.multipart import MIMEMultipart
from email.mime.base import MIMEBase
from email.mime.text import MIMEText
from email.utils import COMMASPACE, formatdate
from email import [...]]]></description>
			<content:encoded><![CDATA[<p>Here an example how to send a mail with attachement using built in smtp lib to multiple recipients. It&#8217;s really very simple in python. </p>
<p>Just take a look at the code bellow.</p>
<pre class="brush:python">
'simple smtp mailer with multiple recipients and file attachments'

from email.mime.multipart import MIMEMultipart
from email.mime.base import MIMEBase
from email.mime.text import MIMEText
from email.utils import COMMASPACE, formatdate
from email import encoders
import os
from smtplib import SMTP

class Mailer(object):
    ''' simple mailer  '''

    def __init__(self):

        self.mail_to = ['rec3@example.com', 'rec2@example.com', 'rec3@example.com']

        self.mail_from = 'mailer@python-blog.com'
        msg_en = "This is an automated message from python-blog.com\r\n"

        #path to file we want to attach
        msg_file_attachment = '/home/marcink/Desktop/pydev_icons.zip'
        #get the filename we need it for adding to mail header
        msg_file_name = os.path.basename(msg_file_attachment)

        smtp_serv = SMTP('mail.python-blog.com')

        smtp_serv.ehlo("simpleMailerHello.python-blog.com")

        #if server requires authorization you must provide login and password
        smtp_serv.login('mylogin', 'mypassword')
        date_ = formatdate(localtime = True)

        msg = MIMEMultipart()
        msg['From'] = self.mail_from
        msg['To'] = COMMASPACE.join(self.mail_to)
        msg['Date'] = date_
        msg['Subject'] = "example subject"

        #attach string message
        msg.attach(MIMEText(msg_en))

        #attach open encode the filename
        file_part = MIMEBase('application', "octet-stream")
        file_part.set_payload(open(msg_file_attachment, "rb").read())
        encoders.encode_base64(file_part)
        file_part.add_header('Content-Disposition', 'attachment; filename="%s"'
                       % msg_file_name)
        msg.attach(file_part)

        #sendmail and exit server
        smtp_serv.sendmail(self.mail_from, self.mail_to, msg.as_string())
        smtp_serv.quit()

if __name__ == "__main__":
    Mailer()
    print 'mail sent'
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.python-blog.com/2009/07/01/send-mail-with-attachment-from-python-to-multiple-recipients/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Eclipse Galileo with PyDev custom setup</title>
		<link>http://www.python-blog.com/2009/06/25/eclipse-galileo-with-pydev-custom-setup/</link>
		<comments>http://www.python-blog.com/2009/06/25/eclipse-galileo-with-pydev-custom-setup/#comments</comments>
		<pubDate>Wed, 24 Jun 2009 23:45:02 +0000</pubDate>
		<dc:creator>Marcin Kuźmiński</dc:creator>
				<category><![CDATA[Editors]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[compilation]]></category>
		<category><![CDATA[customization]]></category>
		<category><![CDATA[d]]></category>
		<category><![CDATA[eclipse]]></category>
		<category><![CDATA[galileo]]></category>
		<category><![CDATA[icon]]></category>
		<category><![CDATA[IDE]]></category>
		<category><![CDATA[orm]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[PyDev]]></category>
		<category><![CDATA[python blog]]></category>

		<guid isPermaLink="false">http://www.python-blog.com/?p=61</guid>
		<description><![CDATA[Today is Eclipse Galileo release day. So i made my new PyDev + eclipse compilation with some customizations.
I remove all the unnecessary stuff for java IDE since we program in python we don&#8217;t need java stuff in there( and it loads faster to :D )
replaced splash screen with the one from pyDev site, and throw [...]]]></description>
			<content:encoded><![CDATA[<p>Today is Eclipse Galileo release day. So i made my new PyDev + eclipse compilation with some customizations.</p>
<p>I remove all the unnecessary stuff for java IDE since we program in python we don&#8217;t need java stuff in there( and it loads faster to :D )<br />
replaced splash screen with the one from pyDev site, and throw some nice (Python) window icons.</p>
<p>Here&#8217;s the main window:<br />
<a href="http://www.python-blog.com/wp-content/uploads/2009/06/Screenshot-Pydev-Eclipse-.png"><img class="alignnone size-full wp-image-188" title="Screenshot-Pydev - Eclipse" src="http://www.python-blog.com/wp-content/uploads/2009/06/Screenshot-Pydev-Eclipse-.png" alt="Screenshot-Pydev - Eclipse" width="511" height="310" /></a></p>
<p>Here&#8217;s what you have to do to have my setup:</p>
<ul>
<li>Get the newest version of eclipse for java IDE (not the EE) use this direct link if you want <strong><a title="Eclipse Galileo download link" href="http://www.eclipse.org/downloads/packages/eclipse-ide-java-developers/galileor" target="_blank">download eclipse</a></strong></li>
<li>extract folder eclipse to you hard drive and rename it to let&#8217;s say PyDev ;]</li>
<li>DON&#8217;T RUN ECLIPSE !! please</li>
<li>Ok here&#8217;s what you have to remove to get rid of all the java stuff<br />
(i have nothing against java, but we&#8217;re talking python here)</li>
<li>from folder <strong>features</strong> remove org.eclipse.jdt_3.5.0.v20090527-2000-7r88FEeFJePyvYeA33DjZ_c1</li>
<li>from folder <strong>plugins </strong>remove<br />
org.eclipse.jdt.debug_3.5.0.v20090526<br />
org.eclipse.jdt.apt.core_3.3.200.v20090528-1135.jar<br />
org.eclipse.jdt.apt.pluggable.core_1.0.200.v20090526-2130.jar<br />
org.eclipse.jdt.apt.ui_3.3.200.v20090528-1135.jar<br />
org.eclipse.jdt.compiler.apt_1.0.200.v20090528-1135.jar<br />
org.eclipse.jdt.compiler.tool_1.0.100.v_963.jar<br />
org.eclipse.jdt.core.manipulation_1.3.0.v20090603.jar<br />
org.eclipse.jdt.core_3.5.0.v_963.jar<br />
org.eclipse.jdt.debug.ui_3.4.0.v20090527.jar<br />
org.eclipse.jdt.doc.user_3.5.0.v20090603-1530.jar<br />
org.eclipse.jdt.junit.runtime_3.4.100.v20090513-2000.jar<br />
org.eclipse.jdt.junit4.runtime_1.1.0.v20090513-2000.jar<br />
org.eclipse.jdt.junit_3.5.0.v20090526-2000.jar<br />
org.eclipse.jdt.launching_3.5.0.v20090527.jar<br />
org.eclipse.jdt.ui_3.5.0.v20090604.jar<br />
org.eclipse.jdt_3.5.0.v200906111540.jar</li>
<li>Firstly i decided to remove epp.package.java but this really screws up eclipse and the icons so don&#8217;t do it</li>
<li>Now download this pydev icons  package <strong><a href="http://www.python-blog.com/wp-content/uploads/2009/06/pydev_icons.zip">pydev_icons</a></strong> and extract it somewhere<br />
if you don&#8217;t need the eclipse icon replacement you can skip this.</li>
<li>Copy and replace <strong>splash.bmp</strong> to folder <strong>plugins/org.eclipse.platform_3.3.200.v200906111540</strong><br />
and paste rest of images to folder in <strong>plugins/org.eclipse.epp.package.java_1.2.0.20090619-0620</strong></li>
<li>In case of newer eclipse builds (3.5.2) just copy everything to plugins/org.eclipse.platform_*.*(version number) and remove the gifs, so eclipse will load png</li>
<li>Your done !</li>
</ul>
<p>Now run eclipse save you workspace and setup pydev as in this post: <strong><a href="http://www.python-blog.com/index.php/2009/06/20/python-ide-pydev-best-choice/" target="_blank"></p>
<p>http://www.python-blog.com/index.php/2009/06/20/python-ide-pydev-best-choice/</a></strong></p>
<p>Enjoy lighter version of newest eclipse galileo with Pydev and some nice icons :)</p>
<p>UPDATE: I changed the splash screen in pydev icons to be the same size as original one.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.python-blog.com/2009/06/25/eclipse-galileo-with-pydev-custom-setup/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>
