Archive for the 'Python' Category

simple cool python

Thursday, March 18th, 2004

Ok, this has been mentioned elsewhere already, but I thought I would post it to my site too. Got Python? (get it if you don’t!) Need a quick webserver? (who doesn’t!?) Try this from the command line:
python -c ‘import SimpleHTTPServer;SimpleHTTPServer.test()’
Bam. Instant web server. Serving on port 8000 from the directory [...]

milter, milter man

Thursday, March 18th, 2004

My milter had a hiccup today. I had it inserting a warning message into the first payload of a MIME multipart email if that email contained a .zip attachment - assuming that the first payload was the message body - wooops. So now, it itterates through the email.Message.Message object with the Message.walk() method [...]

sendmail milters and python

Wednesday, March 17th, 2004

Wow - it’s been a while since I have said anything.
Moving on - I have been doing some stuff at work with python and the senmail mail filter API (called milters).. I have created a milter that examines email messages and strips off dangerous attachments (exe, pif, scr - the stuff of viruses), inserts [...]

Network Programming

Friday, February 13th, 2004

Here are a couple good articles on network programming. They go through writing simple network clients in Python. Read them. Even if you are not a programmer. You will have a better idea of how network programs like web browsers work. You might even think it’s interesting.
cw

getting at processes with python and WMI

Saturday, December 20th, 2003

In the last week or so I have discovered the wonderful world of Microsoft’s Windows Management Instrumentation (WMI). Being a huge corporation, there are certain things that MS pulls of quite well, and WMI is one of them. Here is how to get at the running process data using Python and WMI (my [...]

using ADODB and python to retreive an email address

Thursday, November 6th, 2003

Ok, here is the code sample I promised. This was the best way I could come up with to get the Exchange email address of an Active Directory user when all I knew was their SAM account name. The following Python code worked for me running on Win32:

import win32com.client
def getEmail(user):
[...]

python and COM

Wednesday, October 29th, 2003

Well, it’s been a while since I have posted anything about Python. That doesn’t mean that the snake has lost it’s grip on me (wow, that’s corny). Lately I have been working on COM programming on Win32. I am trying to create a CGI script that will connect to an Exchange server [...]

inspiration

Wednesday, September 17th, 2003

Though I thought about blogging about using the words “Ok” and “Okay” in my last entry, I didn’t want to fall down that slipperly slope.
So instead I ask for some inspiration. I have come to find out that I really enjoy writing computer programs. Maybe it’s some sort of primal tool making desire [...]

cardinfo utility

Saturday, September 13th, 2003

I just added a new page with information about my cardinfo utility for the Cisco Aironet series of cards running under Linux. It’s a decent little program for getting signal strength, signal quality and link status of a card. It displays that data in one small window. I have a screenshot of [...]

recent python victories

Thursday, September 11th, 2003

So you all probably thought that I just ditched the whole python thing after my “wildly successful” system tray utility for Big Brother, didn’t you? Well, that is not the case.
I have had a couple recent victories at work with python. The first came when I learned that I needed to have all [...]