[Tutor] sftp get single file

Kent Johnson kent37 at tds.net
Fri Jul 17 18:12:52 CEST 2009


On Fri, Jul 17, 2009 at 11:42 AM, Sander Sweers<sander.sweers at gmail.com> wrote:

> import time
>
> today = time.localtime()
> datestr = time.strftime("%Y%m%d",today)
> ext = ".tab"
>
> print datestr + ext

You can include literal characters in the format string:

In [4]: time.strftime("%Y%m%d.tab",today)
Out[4]: '20090717.tab'

Kent


More information about the Tutor mailing list