Hello Word in CGI

Olivier Dagenais olivierS.dagenaisP at canadaA.comM
Wed Jul 5 23:16:19 EDT 2000


Actually, it might be easier to localize the string if it takes parameters,
although they might need to be positional parameters (a bit like the
FormatMessage and the %1, %2, etc...)..  I do believe Python has an
equivalent, be it naming the variables explicitly in the string.

--
----------------------------------------------------------------------
Olivier A. Dagenais - Carleton University - Computer Science III


> > > 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