On Tue, Apr 30, 2019 at 1:37 PM E. Madison Bray <erik.m.b...@gmail.com> wrote: > > On Tue, Apr 30, 2019 at 6:55 AM Dima Pasechnik <dimp...@gmail.com> wrote: > > > > On Tue, Apr 30, 2019 at 1:18 AM Andrey Novoseltsev <novos...@gmail.com> > > wrote: > > > > > > On Monday, 29 April 2019 14:20:39 UTC-6, Dima Pasechnik wrote: > > >> > > >> would it be easier to switch to libgap? > > > > > > > > > Do you mean this? > > > http://doc.sagemath.org/html/en/reference/libs/sage/libs/gap/libgap.html?highlight=libgap#sage.libs.gap.libgap.Gap.eval > > > There is however a restriction on no trailing semicolon. > > > > the trailing ';' is ignored, it's not a restriction. > > > > > For SageMathCell it is very likely that the input contains several > > > commands (as it was the case for the original example here). > > > > OK, several commands won't work - but I don't understand the use case here. > > Are you trying to emulate gap_console() ? > > Of course, you can just do something like `for line in > lines.split(';'): libgap.eval(line)`. > > I would avoid writing any new code that uses the GAP pexpect interface > unless absolutely necessary. If writing significant quantities of GAP > code to be executed by Sage better to put it in an actual .g file and > run it in GAP with `ReadFile`.
or use libgap.function_factory() --- for nontrivial GAP functions to be called from Sage. > > > > >What can be done in this case? Just splitting on l; is likely to break on > > >comments and strings. > > > > > >> > > >> On Mon, Apr 29, 2019 at 5:54 PM Andrey Novoseltsev <novo...@gmail.com> > > >> wrote: > > >> > > > >> > Reminded me of this old issue with Macaulay2 many years ago: > > >> > https://trac.sagemath.org/ticket/5467 I wonder if it is something > > >> > similar here... > > >> > > > >> > -- > > >> > You received this message because you are subscribed to the Google > > >> > Groups "sage-devel" group. > > >> > To unsubscribe from this group and stop receiving emails from it, send > > >> > an email to sage-...@googlegroups.com. > > >> > To post to this group, send email to sage-...@googlegroups.com. > > >> > Visit this group at https://groups.google.com/group/sage-devel. > > >> > For more options, visit https://groups.google.com/d/optout. > > > > > > -- > > > You received this message because you are subscribed to the Google Groups > > > "sage-devel" group. > > > To unsubscribe from this group and stop receiving emails from it, send an > > > email to sage-devel+unsubscr...@googlegroups.com. > > > To post to this group, send email to sage-devel@googlegroups.com. > > > Visit this group at https://groups.google.com/group/sage-devel. > > > For more options, visit https://groups.google.com/d/optout. > > > > -- > > You received this message because you are subscribed to the Google Groups > > "sage-devel" group. > > To unsubscribe from this group and stop receiving emails from it, send an > > email to sage-devel+unsubscr...@googlegroups.com. > > To post to this group, send email to sage-devel@googlegroups.com. > > Visit this group at https://groups.google.com/group/sage-devel. > > For more options, visit https://groups.google.com/d/optout. > > -- > You received this message because you are subscribed to the Google Groups > "sage-devel" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to sage-devel+unsubscr...@googlegroups.com. > To post to this group, send email to sage-devel@googlegroups.com. > Visit this group at https://groups.google.com/group/sage-devel. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-devel@googlegroups.com. Visit this group at https://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.