Hello Word in CGI
David Bolen
db3l at fitlinxx.com
Wed Jul 5 22:36:40 EDT 2000
"Olivier Dagenais" <olivierS.dagenaisP at canadaA.comM> writes:
> > print "<P>This is San Diego.<br>Localtime is", ctime( time() ) + ".<P>"
>
> Are you sure you can concatenate a string to a time?
The ctime() function in the time module returns a string, so it should
be fine. The mixture of arguments to print (resulting in an
intervening space) and concatenation (which won't) is something I'd
probably replace with a single method of handling the values - e.g.:
print "<P>This is San Diego.<br>Localtime is %s.<P>" % ctime(time())
might be a touch more readable - but I suppose that's subjective.
--
-- David
--
/-----------------------------------------------------------------------\
\ David Bolen \ E-mail: db3l at fitlinxx.com /
| FitLinxx, Inc. \ Phone: (203) 708-5192 |
/ 860 Canal Street, Stamford, CT 06902 \ Fax: (203) 316-5150 \
\-----------------------------------------------------------------------/
More information about the Python-list
mailing list