Die Suche ergab 1 Treffer

von thomas-hn
Sonntag 16. September 2018, 16:15
Forum: Allgemeine Fragen
Thema: Scope von Variablen
Antworten: 2
Zugriffe: 572

Scope von Variablen

Hallo,

ich habe aktuell folgenden Code in zwei Modulen:

Modul "main":

#!/usr/bin/python

import threading
import b

a = 0

def api_a():
global a
print("api_a()")
a = 1

def main():
global a

thread_B = b.B_thread()

print("a = " + str(a))

thread_B.start()

# api_a()

thread_B.join ...