test.py
Code: Alles auswählen
#!/usr/bin/python
# -*- coding: UTF-8 -*-
import test2
print "Content-type: text/html; charset=utf-8\r\n"
print "test2.test:", test2.test
Code: Alles auswählen
#!/usr/bin/python
# -*- coding: UTF-8 -*-
test = "1"
Code: Alles auswählen
#!/usr/bin/python
# -*- coding: UTF-8 -*-
while 1:
execfile( "test.py" )
raw_input( "weiter..." )
Nun gehen wir hin und ändern die Variable in test2.py auf einen anderen Wert (während die while-Schleife noch läuft!)... Drücken dann ENTER und sehen, das sie anscheinend noch nicht geändert wurde!