You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
import econtext
|
|
|
|
|
|
def with_broker(func):
|
|
def wrapper(*args, **kwargs):
|
|
broker = econtext.Broker()
|
|
try:
|
|
return func(broker, *args, **kwargs)
|
|
finally:
|
|
broker.Finalize()
|
|
|
|
wrapper.func_name = func.func_name
|
|
return wrapper
|