?
Solved

Using Blat in Python

Posted on 2010-09-15
3
Medium Priority
?
1,582 Views
Last Modified: 2012-05-10
Does anyone have an example of using Blat in a Python script. I would like to get a fail or success notify when the script finishes. I'm sure there are better alternatives but with my limited skill i figured blat would be the easiest to master.

thanks,
0
Comment
Question by:huskeraider
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 5

Accepted Solution

by:
-Richard- earned 1000 total points
ID: 33685844
Blat allows you to send emails directly from the ommand line, so for a simple success notification, the following should work from within Python:

import os
os.system('blat.exe - -f from@example.com -to to@somewhere.com -s Subject -body "Success!" -server smtp.example.com:25 -u username -pw password ')

Please note there is also a "subprocss" library which is a more sophisticated way to execute command-line programs, but I sense your needs are rather simple and os.system should suffice.
0
 

Author Comment

by:huskeraider
ID: 33693203
This is just what i needed.

Thanks
0
 

Author Closing Comment

by:huskeraider
ID: 33693219
Outstanding.
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The really strange introduction Once upon a time there were individuals who intentionally put the grass seeds to the soil with anticipation of solving their nutrition problems. Or they maybe only played with seeds and noticed what happened... Som…
Here I am using Python IDLE(GUI) to write a simple program and save it, so that we can just execute it in future. Because when we write any program and exit from Python then program that we have written will be lost. So for not losing our program we…
Learn the basics of modules and packages in Python. Every Python file is a module, ending in the suffix: .py: Modules are a collection of functions and variables.: Packages are a collection of modules.: Module functions and variables are accessed us…
Learn the basics of while and for loops in Python.  while loops are used for testing while, or until, a condition is met: The structure of a while loop is as follows:     while <condition>:         do something         repeate: The break statement m…
Suggested Courses

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question