‘python’ topic list

Query IP whois info in python

January 18th, 2010

This is a simple python script  based on some former rwhois code. It shows us an easy way on how to get detailed information about a specific IP address:

joseph@e54:~$ python ip-whois.py 94.75.214.11
====== whois.arin.net                        

OrgName:    RIPE Network Coordination Centre
OrgID:      RIPE
Address:    P.O. Box 10096 » Read more: Query IP whois info in python

Avoid script running multiple times by file lock

October 22nd, 2009

Sometimes we need a single instance of a script to run at a time. Meaning, the script itself should detects whether any instances of himself are still running and act accordingly.

When multiple instances of one script running, it’s easy to cause problems. I’ve ever seen that about 350 instances of a status checking script running there without doing anything, but eat lots of system resource.
» Read more: Avoid script running multiple times by file lock