Okay, I try to publish this sample, and yes it's not a working piece of code, but I try to "draw" my problem that way. As you will see, I load modules, create cursor,... in the main.py. In the lower section you see, that the modules should execute sqls. In case It could occur that two queries occur at the same time. PS: IT IS NOT A QUESTION ABOUT SQL, etc. I do not understand, how I could handle the part which is marked with Problemsection1 and Problemsection2
I hope really found the right "wording". thank to all your help. main.py import HomeLog # LogHandler import HomeSocketServer # Threaded TCP Socket Server import HomeDatastore # SQLite DB import HomeDaliServer # Connects to USB Device import HomeScheduler # Advanced scheduler functions # Attach Loghandler Loghandler = HomeLog.Logging() # Attach SocketServer HomeSocketServer.HomeSocketServerStart() # Attach Scheduler HomeSched = HomeScheduler.HomeScheduler() HomeSched.SchedulerStart() HomeSched.SchedulerJobs() # Attach Datastore Datastore=HomeDatastore.HomeDBStore() Datastore=Datastore.Startup() #Attach Dali Driver Dali=HomeDaliServer.Startup() # This is a "Sample" that builds 2byte Cmd and transmits it on bus PowerOnLamp1=Dali.send(0,0,1,80) ############################################################### HomeDaliServer.py ........ def send (self,DaliAdress,RequestType,Request,RequestValue): # Problemsection1: # Here it's getting Interesting # We're at the HomeDaliServer, and now I want to use QuerySqlite() in the file HomeDatastore.py ############################################################### HomeScheduler.py # Problemsection2: # If new workerthread is started, Informations must be queried using QuerySlite() and also update data ############################################################### HomeDatastore.py def QuerySqlite(): #doing something here.. # returning Data ############################################################### -- http://mail.python.org/mailman/listinfo/python-list