Anyone have success w/STRPTIME???

Benjamin Schollnick junkster at nospam.rochester.rr.com
Tue Oct 5 04:02:12 EDT 1999


Can anyone point me in the right direction, re: STRPTIME?

To my knowledge the strptime function(s) are correct below,
yet under both OS/2 & Win NT, I am getting a attribute error.

I'm assuming it's my fault, but according to the Docs I think
I've got it setup AOK (TMHK).

		- Benjamin

import time
import sys
from telnetlib import Telnet

print "Connecting to : ", sys.argv[1]
tn_session = Telnet(sys.argv[1], 13) # Connect to MS Win NT date / 
time
datetime   = tn_session.read_all()
tn_session.close()
print "Server returned: ",datetime
#timevalue = time.strptime (datetime, '%A, %B, %d, %Y %X')
timestr    = time.strptime (datetime)
print timevalue, '   - ', time.asctime(timevalue)
print

Connecting to :  128.173.14.71
Server returned:  Tue Oct  5 03:59:56 1999

Traceback (innermost last):
  File "D:\OS2\PYTHON\WORKING\TIMESERVER\CLIENT13.PY", line 20, in ?
    timestr    = time.strptime (datetime)
AttributeError: strptime

================================
Please feel free to copy any and or
all of this sig.
A little something for spam bots:

root at localhost postmaster at localhost admin at localhost
abuse at localhost postmaster at 127.0.0.1

Chairman William Kennard: bkennard at fcc.gov 
Commissioner Susan Ness: sness at fcc.gov
Commissioner Harold Furchtgott-Roth: hfurchtg at fcc.gov
Commissioner Michael Powell: mpowell at fcc.gov
Commissioner Gloria Tristani: gtristan at fcc.gov
consumerline at ftc.gov
fccinfo at fcc.gov
ssegal at fcc.gov





More information about the Python-list mailing list