Skip to content

Commit

Permalink
a few more fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
fchapoton committed Oct 9, 2023
1 parent 273296d commit bd57c4d
Showing 1 changed file with 16 additions and 12 deletions.
28 changes: 16 additions & 12 deletions src/sage/interfaces/gap3.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@
sage: # optional - gap3
sage: gap3.load_package("chevie")
sage: gap3.version() # random
sage: gap3.version() # random # not tested
'lib: v3r4p4 1997/04/18, src: v3r4p0 1994/07/10, sys: usg gcc ansi'
Working with GAP3 lists. Note that GAP3 lists are 1-indexed::
Expand Down Expand Up @@ -302,11 +302,12 @@ def __init__(self, command=gap3_cmd):
EXAMPLES::
sage: gap3 = Gap3() #optional - gap3
sage: # optional - gap3
sage: gap3 = Gap3()
sage: gap3.is_running()
False
sage: gap3._start() #optional - gap3
sage: gap3.is_running() #optional - gap3
sage: gap3._start()
sage: gap3.is_running()
True
"""
self.__gap3_command_string = command
Expand Down Expand Up @@ -341,18 +342,20 @@ def _start(self):
EXAMPLES::
sage: gap3 = Gap3() #optional - gap3
sage: # optional - gap3
sage: gap3 = Gap3()
sage: gap3.is_running()
False
sage: gap3._start() #optional - gap3
sage: gap3.is_running() #optional - gap3
sage: gap3._start()
sage: gap3.is_running()
True
Check that :trac:`23142` is fixed::
sage: gap3.eval("1+1") #optional - gap3
sage: # optional - gap3
sage: gap3.eval("1+1")
'2'
sage: gap3.quit() #optional - gap3
sage: gap3.quit()
"""
Expect._start(self)
# The -p command-line option to GAP3 produces the following
Expand Down Expand Up @@ -504,7 +507,7 @@ def help(self, topic, pager=True):
E.expect_list(self._compiled_small_pattern)

# merge the help text into one string and print it.
helptext = "".join(helptext).strip()
helptext = "".join(bytes_to_str(line) for line in helptext).strip()
if pager is True:
from sage.misc.pager import pager as pag
pag()(helptext)
Expand All @@ -513,8 +516,9 @@ def help(self, topic, pager=True):

def cputime(self, t=None):
r"""
Returns the amount of CPU time that the GAP session has used in
seconds. If ``t`` is not None, then it returns the difference
Return the amount of CPU time that the GAP session has used in seconds.
If ``t`` is not None, then it returns the difference
between the current CPU time and ``t``.
EXAMPLES::
Expand Down

0 comments on commit bd57c4d

Please sign in to comment.