473,389 Members | 1,077 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,389 software developers and data experts.

Timer - Basic

Hello, I have a hard time to make my script to carry on @ :
class testit(Thread):
see below question mark ?????????????
any suggestion ?


Expand|Select|Wrap|Line Numbers
  1. entrer =raw_input("Enter e.i.: Sat Aug 25 09:56:00 2007  :")
  4. def printTime():
  5.      print time.ctime( )
  6.   t = None
  7. while True:
  8.   if t is None or not t.isAlive():
  9.     t = Timer(1.0, printTime)
  10.     t.start()
  11.   if time.ctime () == entrer:
  13. ????????????????????????????????????????????      
  15. class testit(Thread):
  16.    def __init__ (self,ip):
  17.       Thread.__init__(self)
  18.       self.ip = ip
  19.       self.status = -1
  20.    def run(self):      
  21.       pingaling = os.popen("ping "+self.ip+" -n 10 ","r")
  23. # This code is what each parallel thread does
  24. # the 'run' method is triggered when 'start' is called
  25.       while 1:
  26.          line = pingaling.read()
  27.          if not line: break
  28.          print line
  30. pinglist = []
  32. for ip in ip_list:
  33.    current = testit(ip)
  34.    pinglist.append(current)
  35.    current.start()
  37. print time.ctime()
Aug 29 '07 #1
0 808

Sign in to post your reply or Sign up for a free account.

Similar topics

by: William Bub | last post by:
Is there an accurate way to create a "stopwatch" good to 1/10 of a second? I'm not sure if I should use the timer control, or some way to access the computer timer. I found the following site...
by: Eli | last post by:
I'm developing a Visual Basic .Net app that interacts with Visio 2002. I have an event handler in VB to handle the Visio "SelectionChanged" event. This event handler is called when the event is...
by: Nathan Sokalski | last post by:
I am trying to learn how to use the System.Timers.Timer control to perform an action every certain amount of time. However, the Elapsed event doesn't want to fire, but I can't figure out why. I...
by: zurg | last post by:
As far as I remember somewhere here was posted a question about Timer that was stoping at midnight(0.00 a.m.). I'm going to face this problem tommorow (implemeting a long working timer) so if...
by: WhiteSocksGuy | last post by:
Help! I am new to Visual Basic .Net (version 2002) and I am trying to get a System.Timers.Timer to work for me to display a splash screen for about two seconds and then load the main form. I have...
by: John David Thornton | last post by:
I've got a Windows Service class, and I put a System.Threading.Timer, and I've coded it as shown below. However, when I install the service and then start it in MMC, I get a peculiar message: ...
by: Tom | last post by:
When using system.timers.timer, which should one use to start/stop the timer? Start/Stop, or Enabled=True/False? If what I read is true, both really do the same thing, so I don't know if there is...
by: archana | last post by:
Hi all, I want to know about interval of timer. I am using timer in windows service.I head somewhere that when i set interval property of timer while setting interval, restart time of Pc is...
by: terry guthrie | last post by:
I need some help with visual basic code, I need to create a timer that will be visible while playing a game, i know there is a timer in the tools that you pull over to the project and is hidden, and...
by: Jerry Spence1 | last post by:
Do Timers operate on the UI thread, or do they have it's own thread? I'm trying to assess the pros and cons for using a timer or a thread for a certain application. -Jerry
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.