fhdl: autofragment

This commit is contained in:
Sebastien Bourdeauducq 2011-12-10 20:47:21 +01:00
parent 4b15a84505
commit 44f44b8a05
1 changed files with 13 additions and 0 deletions

View File

@ -0,0 +1,13 @@
from .structure import *
import inspect
def FromLocal():
f = Fragment()
frame = inspect.currentframe().f_back
ns = frame.f_locals
for x in ns:
obj = ns[x]
if hasattr(obj, "GetFragment"):
print("adding "+x)
f += obj.GetFragment()
return f