I have originally asked this question to Michael Joswig off-list. He requested me to ask here, so that other people can benefit. So, let me both formulate my question and summarise Michael's answer.
My aim is to use Polymake via a pseudo-tty interface (more precisely: It is going to be a pexpect interface from Sage to Polymake). Polymake has tab-completion, but for the pexpect interface it would be better to have functions that return
1. a list of all functions available in the current application, respectively
2. a list of all members of a given object.
Michael gave me solutions to 2. The first would work in future (resp. in current beta releases), I can not test it currently:
Code: Select all
$c=cube(4);
print join(" ", uniq(sort(map { $_->name." ".$_->type->full_name."\n" } grep {!$_->type->abstract && !($_->flags & $Core::Property::is_permutation) && $_->name !~ /\.pure$/ } map { values %{$_->properties} } {$c->type->linear_isa})));
Code: Select all
polytope > $c = cube(4);
polytope > $t = typeof $c;
polytope > print join(", ", sorted_uniq(sort { $a cmp $b } map { keys %{$_->properties} }$t, @{$t->super}));
AFFINE_HULL, ALTSHULER_DET, BALANCE, BALANCED, ..., WEAKLY_CENTERED, ZONOTOPE_INPUT_POINTS
Best regards,
Simon