You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Following up on #22452 (Create a Polymake pexpect interface):
Polymake's prefer is bad because it is too persistent, writing to a preference file.
We cannot use prefer_now directly because it is local to the current line.
We should have a way to set preferences local to a code block.
Perhaps a Python context manager (using the with keyword) would be the right solution.
Polymake's prefer is bad because it is too persistent, writing to a preference file.
We cannot use prefer_now directly because it is local to the current line.
We should have a way to set preferences local to a code block.
Perhaps a Python context manager (using the with keyword) would be the right solution.
I agree that we don't want Sage to set preferences permanently (unless the user asks it). Although a "with" block may be a good solution for modules, I don't think that we want that in an interactive session.
So, I think ideally we would have a method polymake.preferences, so that
sage: polymake.preferences(...)
would set preferences that expire when the sage session ends, and
withpolymake.preferences(...):
manylinesofcode
would set preferences that expire when the "with" block ends.
Following up on #22452 (Create a Polymake pexpect interface):
Polymake's
prefer
is bad because it is too persistent, writing to a preference file.We cannot use
prefer_now
directly because it is local to the current line.We should have a way to set preferences local to a code block.
Perhaps a Python context manager (using the
with
keyword) would be the right solution.See also: #22710: Meta-ticket: polymake
Depends on #22452
CC: @simon-king-jena
Component: interfaces
Keywords: days84
Issue created by migration from https://trac.sagemath.org/ticket/22703
The text was updated successfully, but these errors were encountered: