Threading problem

Faber zannablu at libero.it
Mon Apr 17 17:33:34 EDT 2006


Aleksandar Cikota wrote:

> How to integrate the Code-part in the main programm, so that the
> mainprogramm works?
> 
> Code:
> 
> import win32com.client
> import time
> import os
> import threading
> 
> Document = win32com.client.Dispatch('MaxIm.Document')
> Application = win32com.client.Dispatch('MaxIm.Application')
> p = win32com.client.dynamic.Dispatch('PinPoint.Plate')
> 
> class TestThread ( threading.Thread ):
>     path_to_watch = "F:/Images/VRT/"

    def run(self):
        # Put the following code in the run method

>     before = dict ([(f, None) for f in os.listdir (path_to_watch)])
>     while 1:

[cut]

> TestThread().start()

This should work

-- 
Faber
http://faberbox.com/
http://smarking.com/

The man who trades freedom for security does not deserve nor will he ever
receive either. -- Benjamin Franklin



More information about the Python-list mailing list