← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #166488]: How to concatenate string and float?

 

Question #166488 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/166488

    Status: Open => Answered

RaiMan proposed the following answer:
I do not know, where you got this code, but when having problems like
this it is a good idea to evaluate the return values step by step,
before building long chains of dot-concats.

u.info() returns a dictionary with header values. The value you are looking for is "last-modified".
"date" contains the current date/time (time of request).

so this does what you want:

lastMod = time.strftime("%Y-%m-%d",u.info().getdate("last-modified"))
popup("file last modified at: %s"%lastMod)

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.