-
Attribute Error: ‘type’ object has no attribute ‘datetime’
While trying to write some test for NTP servers, my response time used this:I am using IronPython 2.7. timetoreturn = time.time() if(self.response_time != 0): timetoreturn = (self.response_time – datetime.datetime(1970,1,1)).total_seconds() I got this error: Attribute Error: ‘type’ object has no attribute ‘datetime’. My imports were:import datetimefrom datetime import datetime, tzinfo Come to find out, using import datetime just causes problems so I removed that. That… Read more
-
Python: Pinging a Server Using Windows
I found a snippet online at StackOverflow: https://stackoverflow.com/questions/2953462/pinging-servers-in-python/32684938 I am working with two FTP servers at work and am writing tests for the application we run on it. The test case I am handling right now involves having no application, no backup, and no valid application on the FTP server that will FTP it to… Read more
Want more tips?
Have it sent directly to your inbox.