Shellexecute – Printing with the default application

This script prints the file in the first argument with the windows default application.

Example:

If you save the code in the file print.py:

print.py test.doc -> Opens Microsoft Word (if it is installed) and prints the file test.py to the default printer.

print.py mytextfile.txt -> Same. But prints with Notepad

Directory Watcher

You can use this script, if you want to watch for activity on a
directory. It shows you every write and delete of a file in a specified
directory.

Show all processes with IDs

This script shows all running processes with their process IDs. It uses the wmi-class from Tim Golden. Please put it into the directory where you run this script from.

Two instances of Windows Explorer (other example)

Another example which creates two Microsoft Internet Explorer instances.

Printwatcher

This script watches for activity at the installed printers and writes a logfile. It shows how much a user has printed on wich printer (works also with network printers).

But it has a proplem with counting the right amount of printed pages 🙁

It uses the wmi-class from Tim Golden, which you can download from his webpages. Please put the wmi.py in the same directory where you run this script from.