On Tue, 21 Jun 2022, 15:06 TB, <mathze...@gmail.com> wrote: > On 21/06/2022 16:35, Dima Pasechnik wrote: > > On Tue, Jun 21, 2022 at 10:19 AM Dima Pasechnik <dimp...@gmail.com> > wrote: > >> > >> On Tue, Jun 21, 2022 at 4:06 AM Nils Bruin <nbr...@sfu.ca> wrote: > >>> > >>> Perhaps this message (see the thread it's in for context) applies to > your situation? > >>> > >>> https://groups.google.com/g/sage-devel/c/ntuqDmruI8w/m/vJOv6mgqCgAJ > >> > >> this is outdated. However, it seems that the very old doc suggestion in > >> sage/interfaces/gap.py > >> > >> import sage.interfaces.gap > >> sage.interfaces.gap.gap_cmd = '<whatever> ' > >> > >> could never have worked, as gap_cmd is hardcoded to "gap -r" (or > whatever) > >> and it cannot be overwritten like this. > > > > indeed: > > > > sage: import sage.interfaces.gap > > sage: sage.interfaces.gap.gap_cmd = "gap -r -o 3G -s 5G" > > sage: gap.eval('GAPInfo.CommandLineOptions.s') > > '"4g"' > > > > so changing gap_cmd has no effect. > > > Maybe this works: > sage: import sage.interfaces.gap > sage: sage.interfaces.gap.gap_cmd = "gap -r -o 3G -s 5G" > sage: sage.interfaces.gap.gap = Gap() # New instance > sage: gap.eval('GAPInfo.CommandLineOptions.s') > '"4g"' > sage: sage.interfaces.gap.gap.eval('GAPInfo.CommandLineOptions.s') > '"5G"' > sage: gap = sage.interfaces.gap.gap # For the global namespace > sage: gap.eval('GAPInfo.CommandLineOptions.s') > '"5G"' >
hmm, and what happened to the old instance of GAP, and to Sage objects associated with it? Sure, you can monkey-patch Python classes, but this looks wrong in this case. > > > Regards, > TB > > -- > 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 view this discussion on the web visit > https://groups.google.com/d/msgid/sage-devel/550315df-fd50-b6c6-5202-9b2cfcee33a9%40gmail.com > . > -- 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 view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/CAAWYfq1f7nm5xNwVeyk35wCaErBk8kvWJut3oKEkKcap%3DYNosQ%40mail.gmail.com.