'''
Created on May 11, 2011

@author: viswamin
'''


from threading import  Thread

import subprocess
import time
import os



class MyThread(Thread):
    def __init__(self, parent = None):
        Thread.__init__(self)
        
    def run(self):
        print 'Invoking Command Promptt..............'
        #subprocess.call(["start", "/DC:\\PerfLocal_PAL", "scripts_to_execute.bat"], shell=True)
        subprocess.call(["start", "C:\\windows\\system32\\cmd.exe"], shell = True)
        self.status()
        
    def status(self):
        print 'Hello World'
        if MyThread.isAlive(self):
            print 'The thread is still alive ...... '
            
def main():
    mythread_object = MyThread()
    mythread_object.start()


if __name__ == '__main__':
    main()