Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!feeder.news-service.com!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.013 X-Spam-Evidence: '*H*': 0.97; '*S*': 0.00; 'filename': 0.09; 'mtime': 0.09; 'received:64.4': 0.09; "subject:')": 0.09; 'workstation': 0.09; 'ftplib.ftp': 0.16; 'pointers': 0.16; 'reconcile': 0.16; 'written': 0.16; 'modified': 0.18; 'server.': 0.24; 'remote': 0.28; 'compare': 0.28; 'server': 0.29; 'thanks': 0.30; 'class': 0.30; 'to:addr:python-list': 0.33; 'header:User-Agent:1': 0.34; 'uses': 0.35; 'charset:us-ascii': 0.36; 'file': 0.36; 'question': 0.36; 'two': 0.37; 'skip:o 20': 0.38; 'to:addr:python.org': 0.39; 'called': 0.40; 'invited.': 0.84; 'subject:skip:o 10': 0.84 Date: Wed, 14 Sep 2011 11:50:44 -0800 From: Tim Johnson To: Python ML Subject: Reconciling os.path.getmtime vs ftp.sendcmd('MDTM filename') MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Organization: AkWebsoft User-Agent: Mutt/1.5.20 (2009-06-14) X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 19 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1316030318 news.xs4all.nl 2399 [2001:888:2000:d::a6]:41969 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:13284 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