There is the SAGE_PEXPECT_LOG environment variable, it would IMHO be 
reasonable to also use it to switch logging on or off.



On Wednesday, May 27, 2015 at 10:06:23 AM UTC+2, John Cremona wrote:
>
> On 26 May 2015 at 23:21, Andrey Novoseltsev <[email protected] 
> <javascript:>> wrote: 
> > Hello, 
> > 
> > There are apparently log files written to .sage. This causes issues with 
> > SageMathCell which makes .sage immutable and there are commands that 
> trigger 
> > creation of some of these files, but it looks like the list is growing, 
> > currently 
> > 
> > print gp.eval("""5*6;""") 
> > 
> > in a cell leads to 
> > 
> > IOError: [Errno 13] Permission denied: 
> '/home/sc_work/.sage/gp-expect.log' 
>
> The gp instance should be created with no log file by default, as with 
> all pexpect interfaces.  But in the file sage/interfaces/gp.py  are 
> the lines 
>
> # An instance 
> gp = Gp(logfile=os.path.join(DOT_SAGE,'gp-expect.log')) # useful for 
> debugging! 
>
> which create the global instance *with* a log file.  This should be 
> changed -- users can create more instances if they want to, with log 
> files.  My guess is that this is a left-over from some debugging 
> session.  I'll let others do the "git blame" in case it was me. 
>
> Replacing that line with gp=Gp() will sort that out. 
>
> John 
>
> > 
> > My questions: 
> > 1) Why are such log files created there at all? 
> > 2) Why have things that didn't use them before started creating them 
> now? 
> > 3) Is there a better solution to the problem than touching this file 
> before 
> > making .sage immutable? 
> > 
> > Thank you! 
> > Andrey 
> > 
> > -- 
> > 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 [email protected] <javascript:>. 
> > To post to this group, send email to [email protected] 
> <javascript:>. 
> > Visit this group at http://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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to