Skip to content

Conversation

ncorgan
Copy link
Member

@ncorgan ncorgan commented Jan 16, 2021

Differences from /blocks/evaluator

  • Takes in list of Python modules to import before evaluating expression
  • "Global variables" are labelled "local variables", as global and local have specific definitions in Python
  • As of now, multi-argument output is unsupported

@guruofquality Could you test the attached file in PothosFlow (changed extension so Github accepts it)? My unit test passes fine, but I'm getting hangs in PothosFlow changing the slider, pausing, reloading the registry, etc, while running this.

evalpothos.txt

@guruofquality
Copy link
Contributor

@guruofquality Could you test the attached file in PothosFlow (changed extension so Github accepts it)? My unit test passes fine, but I'm getting hangs in PothosFlow changing the slider, pausing, reloading the registry, etc, while running this.

setattr(Evaluator, setterName, partial(self.__setter, name))

I think it ends up holding a reference to itself, if you can pass a different function to partial with maybe a weakref to the self object that should work.

@guruofquality guruofquality force-pushed the evaluator branch 2 times, most recently from 54c9e4d to caed10c Compare July 25, 2021 22:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

python version of evaluator block
2 participants