Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #13284 > unrolled thread

Reconciling os.path.getmtime vs ftp.sendcmd('MDTM filename')

Started byTim Johnson <tim@akwebsoft.com>
First post2011-09-14 11:50 -0800
Last post2011-09-14 11:50 -0800
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python


Contents

  Reconciling os.path.getmtime vs ftp.sendcmd('MDTM filename') Tim Johnson <tim@akwebsoft.com> - 2011-09-14 11:50 -0800

#13284 — Reconciling os.path.getmtime vs ftp.sendcmd('MDTM filename')

FromTim Johnson <tim@akwebsoft.com>
Date2011-09-14 11:50 -0800
SubjectReconciling os.path.getmtime vs ftp.sendcmd('MDTM filename')
Message-ID<mailman.1128.1316030318.27778.python-list@python.org>
I have written a class that uses ftplib.FTP as the parent.
I need to reconcile the modified time of a workstation file with
that same filename on a remote server.
Let's say we have a file called '400.shtml'. I get the mtime on
my workstation by
>> os.path.getmtime('400.shtml')
1311648420.0
And I use 
>> ftp.sendcmd('MDTM 400.shtml') ## for the remote server
'213 20110726004703'

My question is how to compare the two outputs?
Pointers to documentation and other resources are invited.

thanks
-- 
Tim 
tim at johnsons-web dot com or akwebsoft dot com
http://www.akwebsoft.com

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web