How we can run local ntp server using ntplib library in Python

994 views Asked by At

Can someone help me regarding the Local NTP server in Python. The python code is below:

import ntplib
from time import ctime
while True:
 try:
  c = ntplib.NTPClient()
  response = c.request(host='192.168...',port=2947)
  print(response)
  print(ctime(response.tx_time))
 except Exception as e:
    print(e)

When i run this code, the output returns no response received from 192.168....

0

There are 0 answers