[Tutor] How can ... ?

William Park parkw@better.net
Sun, 24 Oct 1999 17:15:31 -0400


On Sun, Oct 24, 1999 at 10:32:04PM +0300, Jakomo Mariachi wrote:
>          Hi All ,
> 
> I have one guestion.
> How can I do this with Python :
>  h = ' date | cut -c12-13 '

1.  os.system('date | cut -c12-13')	;)
2.  h = time.ctime(time.time())		# date
    h = h[11:13]			# cut -c12-13  (python starts at 0)

> Thank you.

You are most welcome.

William