#! /usr/bin/env python
#
# Requires the filename format for images to be:
# IMG-%Y%m%d-%H%M%S-%i-%f-%I
# 
# Also requires pylab and matplotlib.  

import sys
import os
import time
import code
import gio
import glib

arg = sys.argv[1]
print "Searching for files in directory ", arg

def directory_changed(monitor, file1, file2, evt_type):
	if (evt_type == gio.FILE_MONITOR_EVENT_CREATED):
		print "Changed: ", file1, file2, evt_type

gfile = gio.File(arg)

#components = file.split('-')
#timestr = components[1] + components[2]
#timeVal = time.strptime(timestr, "%Y%m%d%H%M%S")
#timestamp = time.mktime(timeVal) 
#microsecs = int(components[3])*1e-6

