>>>
*** Esp32ExecuteFile: begin
########################################
--- Locals -------------------------------
{'Handler': <CHandler object at 3ffe5880>, 'HAN': <module 'Handler' from 'Handler.py'>, 'gc': <module 'gc'>, 'GInteger': 13004, 'GCalculator': <CCalculator object at 3ffe5140>, 'CAL': <module 'Calculator' from 'Calculator.py'>, 'bdev': <Partition type=1, subtype=129, address=2097152, size=2097152, label=vfs, encrypted=0>, 'TIM': <module 'utime'>, 'I': 2, '__name__': '__main__', 'Execute': <function Execute at 0x3ffea3d0>, 'time': <module 'utime'>, 'uos': <module 'uos'>}
--- Globals ------------------------------
{'Handler': <CHandler object at 3ffe5880>, 'HAN': <module 'Handler' from 'Handler.py'>, 'gc': <module 'gc'>, 'GInteger': 13004, 'GCalculator': <CCalculator object at 3ffe5140>, 'CAL': <module 'Calculator' from 'Calculator.py'>, 'bdev': <Partition type=1, subtype=129, address=2097152, size=2097152, label=vfs, encrypted=0>, 'TIM': <module 'utime'>, 'I': 2, '__name__': '__main__', 'Execute': <function Execute at 0x3ffea3d0>, 'time': <module 'utime'>, 'uos': <module 'uos'>}
------------------------------------------
--- Begin --------------------------------
GInteger[13000]
GCalculator[321]
--- Main --------------------------------
GInteger[13000]
GCalculator[321]
Execute:begin
--- blinky:begin
--- blinky: LLL[13000]
--- blinky: Calculator[321]
--- blinky: [13001]
--- blinky: Calculator[10321]
--- blinky:end
Execute:end
GInteger[13001]
GCalculator[10321]
--- End --------------------------------
GInteger[13001]
GCalculator[10321]
########################################
--- Locals -------------------------------
{'Handler': <CHandler object at 3ffeb7e0>, 'HAN': <module 'Handler' from 'Handler.py'>, 'gc': <module 'gc'>, 'GInteger': 13001, 'GCalculator': <CCalculator object at 3ffea3e0>, 'CAL': <module 'Calculator' from 'Calculator.py'>, 'bdev': <Partition type=1, subtype=129, address=2097152, size=2097152, label=vfs, encrypted=0>, 'TIM': <module 'utime'>, 'I': 0, '__name__': '__main__', 'Execute': <function Execute at 0x3ffea3d0>, 'time': <module 'utime'>, 'uos': <module 'uos'>}
--- Globals ------------------------------
{'Handler': <CHandler object at 3ffeb7e0>, 'HAN': <module 'Handler' from 'Handler.py'>, 'gc': <module 'gc'>, 'GInteger': 13001, 'GCalculator': <CCalculator object at 3ffea3e0>, 'CAL': <module 'Calculator' from 'Calculator.py'>, 'bdev': <Partition type=1, subtype=129, address=2097152, size=2097152, label=vfs, encrypted=0>, 'TIM': <module 'utime'>, 'I': 0, '__name__': '__main__', 'Execute': <function Execute at 0x3ffea3d0>, 'time': <module 'utime'>, 'uos': <module 'uos'>}
------------------------------------------
Handler[4321]
--- Handler --------------------------------
Handler[4321]
Handler-Execute:begin
--- blinky:begin
--- blinky: LLL[13001]
--- blinky: Calculator[10321]
--- blinky: [13002]
--- blinky: Calculator[20321]
--- blinky:end
Handler-Execute:end
Handler[8642]
--- Handler --------------------------------
Handler[8642]
Handler-Execute:begin
--- blinky:begin
--- blinky: LLL[13002]
--- blinky: Calculator[20321]
--- blinky: [13003]
--- blinky: Calculator[30321]
--- blinky:end
Handler-Execute:end
Handler[17284]
--- Handler --------------------------------
Handler[17284]
Handler-Execute:begin
--- blinky:begin
--- blinky: LLL[13003]
--- blinky: Calculator[30321]
--- blinky: [13004]
--- blinky: Calculator[40321]
--- blinky:end
Handler-Execute:end
Handler[34568]
--- End --------------------------------
GInteger[13004]
GCalculator[40321]
Handler[34568]
########################################
*** Esp32ExecuteFile: end
♦♦>
# class CCalculator(): def __init__(self): self.Result = 123 return def Add(self, a, b): self.Result = a + b return self.Result # def Execute(): print('Execute:begin') L = 4321 exec(open('blinky.py').read(), globals(), locals()) print('Execute:end') return # print('*** Esp32ExecuteFile: begin') print('---------------------------------------------------------------------') print(locals()) print('---------------------------------------------------------------------') print(globals()) print('---------------------------------------------------------------------') C = CCalculator() print(C.Result) C.Add(3, 4) print(C.Result) L = 4321 Execute() print(C.Result) # print('*** Esp32ExecuteFile: end')
import time as TIM # print('blinky:begin') # NC !!! global C print('Local L[{}]'.format(L)) # for I in range(10, 13): # C.Add(1, I) print('.' + str(C.Result) + '.') TIM.sleep(0.5) print('blinky:end')
Open Hard- & Software [ DokuWiki WebSites MediaWiki NextCloud ]