/usr/lib/python2.7/dist-packages/sagenb/interfaces/status.py is in python-sagenb 1.0.1+ds1-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | # -*- coding: utf-8 -*
import os, shutil
class OutputStatus:
"""
Object that records current status of output from executing some
code in a worksheet process. An OutputStatus object has three
attributes:
- ``output`` - a string, the output so far
- ``filenames`` -- list of names of files created by this execution
- ``done`` -- bool; whether or not the computation is now done
"""
def __init__(self, output, filenames, done, tempdir=None):
"""
INPUT:
- ``output`` -- a string
- ``filenames`` -- a list of filenames
- ``done`` -- bool, if True then computation is done, so ``output``
is complete.
- ``tempdir`` -- (default: None) a filename of a directory; after
computation is done, the caller is responsible for
deleting this directory.
"""
self.output = output
self.filenames = filenames
self.done = done
self.tempdir = tempdir
def __repr__(self):
"""
Return string representation of this output status.
"""
return "Output Status:\n\toutput: '%s'\n\tfilenames: %s\n\tdone: %s"%(
self.output, self.filenames, self.done)
|