In <21eb3e6f-9a82-47aa-93ff-8f4083d18...@googlegroups.com> noydb 
<jenn.du...@gmail.com> writes:

> I want to compare a user entered date-and-time against the date-and-time of
> a pdf file.  I posted on this (how to get a file's date-time) before, was
> advised to do it like:

> import datetime, os, stat
> mtime = os.lstat(filename)[stat.ST_MTIME] // the files modification time
> dt = datetime.datetime.fromtimestamp(mtime)

> I am having problems with the comparison, that line is failing.

What line?  You haven't posted any comparison line of code here.

Please post the actual code you're using, instead of telling us about it.

-- 
John Gordon                   A is for Amy, who fell down the stairs
gor...@panix.com              B is for Basil, assaulted by bears
                                -- Edward Gorey, "The Gashlycrumb Tinies"

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to