import re

     #Date                           Owner        Queue    Job#
s = 'Fri Sep 30 23:40:00 MSK 2011    rm              c    2'

m = re.compile ('^(?P<date>.{3}\s.{3}\s[0-9]+)\s(?P<time>[0-2][0-9]:[0-5][0-9]:[0-5][0-9])\s(?:(?P<tzone>.*)\s|)(?P<year>[0-9]{4})\s*(?P<owner>.+)\s*(?P<queue>[a-z]|[A-Z])\s*(?P<jobid>[0-9]*)$')


g = m.match (s)

print s
print m.search (s).groups()
print m.search (s).group('jobid')
print m.match (s).group('jobid')

date = g.group ('date')
t    = g.group ('time')
tz   = g.group ('tzone')
y    = g.group ('year')

import datetime
import time

#d = datetime.datetime.strptime (date)
ds = time.strptime ("Thu Jun 28 13:45:23 GMT 2001", "%a %b %d %H:%M:%S %Z %Y")
print ds 

d = time.strptime (date + ' ' + t + ' ' + tz + ' ' + y, "%a %b %d %H:%M:%S %Z %Y")
print d

