[Tutor] How can ... ?

Trond Hanssen th@alley.org
24 Oct 1999 23:33:36 +0200


* Jakomo Mariachi
| How can I do this with Python :
|  h = ' date | cut -c12-13 '

Something along the lines of

----- cut -----
import time
h = time.strftime("%H", time.localtime(time.time()))
----- cut -----

perhaps, assuming that it is the hour you want.  See section 6.3 in
the Library Reference.

-- 
<Trond/>