On Wed, 5 Apr 2023, 01:02 Hongyi Zhao, <hongyi.z...@gmail.com> wrote:
> See my following testing: > > Method 1: This works: > > sage: import sage.interfaces.gap > sage: sage.interfaces.gap.gap_cmd = "~/.local/bin/gap" > sage: gap.console() > > Method 2: This fails: > > sage: import sage.interfaces.gap as gap > this command essentially destroys pexpect GAP interface, as gap is a "reserved" word (except that Python does not have this concept) but you redefine it. > sage: gap.gap_cmd="~/.local/bin/gap" > sage: gap.console() > --------------------------------------------------------------------------- > AttributeError Traceback (most recent call last) > Cell In [7], line 1 > ----> 1 gap.console() > > AttributeError: module 'sage.interfaces.gap' has no attribute 'console' > > > So, how can I switch to gap console more concisely using the python > assigning syntax to simplify the code snippet? > > Regards, > Zhao > > -- > You received this message because you are subscribed to the Google Groups > "sage-support" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to sage-support+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/sage-support/2e826aab-d887-437b-abe0-bbb59a1123e2n%40googlegroups.com > <https://groups.google.com/d/msgid/sage-support/2e826aab-d887-437b-abe0-bbb59a1123e2n%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sage-support/CAAWYfq1YBDuAOmXrk9u9ZPL8H3VLqd%3Dg2QX-%3D4stKx-MU9Ppgg%40mail.gmail.com.