Script in python to kill process by date

Hello everyone,
First sorry for my english.

I'm new in python and I want to create a script that allows the cleaning of a directory (/ tmp), files corresponds to a specific process according to the date.

Steps:

1 - I have to find all processes of a program running, eg OpenOffice, belonging to a User, by determining the date /start time of the oldest of them.

2 - Then delete all files (or directories) in "/ tmp" belonging to the the oldest Openoffice processes (the date determined in step 1)

I want to get ideas or functions to use for this script in linux (RedHat) and python 2.4

thank you :slight_smile:

---------- Post updated at 04:46 PM ---------- Previous update was at 04:57 AM ----------

Help :wall: