fhdl: autofragment
This commit is contained in:
parent
4b15a84505
commit
44f44b8a05
|
@ -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
|
Loading…
Reference in New Issue