ich habe folgende Frage: ich möchte eine Funktion eines Moduls aus einem Thread aufrufen und mache das etwas so:
Code: Alles auswählen
import threading
import modul
class thread(threading.Thread):
def __init__(self):
threading.Thread.__init__(self, name="FirstThread")
def run(self):
modul.methode(Parameter,...)
thread=thread()
thread.start()
tut aber nicht
als Fehler kommt:
NameError: global name 'Parameter' is not defined
und das obwohl ich das Modul importiert hab.
EDIT by Gerold: Code in Code-Tags gesetzt