On 13/09/2010 20:01, Nick wrote:
Hello!
I have a computation running in Sage. It is a search of more or less
the following form:
Let S be an empty set.
For i in some interval:
Check some property for i
If i satisfies the property:
add i to the set S.
I now realise I should have said "print i" rather than "add i to the
set S". Originally I thought it was a good idea because it was easy
to manipulate the output once the search had been completed if it was
in a set. However, now that the search has yet to conclude after a
week or so I wonder if there is a simple way to check what is
currently in S?
Is there any way to obtain the set S while the process continues to
run? I'd even be interested to learn if there is a way to terminate
the process and check what values of i have gathered in S up until
termination. Any ideas? Or is it a lose cause?
Hi
It depends on precisely what form your code takes. If you're running
the loop at the top level with S as a global variable then you should be
able to do ctrl-c to terminate the computation and then look at S or any
other global variable. If your computations happening inside a function
call then I don't know of any way round it.
HTH
Alastair
Thanks very much.
--
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org