Hi

On Thu, Sep 10, 2009 at 12:12:18PM -0700, fwc wrote:
> 1.  The "mysterious error" message derives from a bug introduced by my
> patch at #6861.  It was triggered whenever sage -t was applied to a
> full path name other than one within the devel directory.  I've added
> an extra patch to #6861 which deals that out, I hope.  It should also
> make deletion of the files in .sage/tmp work better --- when all
> doctests are passed.

Will apply soon.

> 2.  The message "ERROR: File ./test.py is missing" (produced when ./
> test.py does exist) is now more of a mystery to me.  It is generated
> by line 99 in sage-test:
> 
>             print "ERROR: File %s/%s is missing"%(os.curdir,F)
> 
> and is triggered by line 97:
> 
>     if not os.path.exists(F):
> 
> (at which point F should be 'test.py').  This suggests to me that
> perhaps os.path.exists isn't working as it should.  It would be
> interesting to try
> 
> sage: import os
> sage: os.path.exists('test.py')
> 
> For me (sage-4.1.1 on Mac OS 1.6) this works as it should.

aha!!

0 j...@muizenberg:~$sage
----------------------------------------------------------------------
| Sage Version 4.1.1, Release Date: 2009-08-14                       |
| Type notebook() for the GUI, and license() for information.        |
----------------------------------------------------------------------
Loading Sage library. Current Mercurial branch is: AIMS-autosave-patch
sage: import os
sage: os.path.exists('test.py')
False
sage: os.path.exists('~/test.py')
False
sage: os.path.exists('/home/jan/test.py')
True
sage: os.stat('test.py')
---------------------------------------------------------------------------
OSError                                   Traceback (most recent call last)

/home/jan/.sage/temp/muizenberg/21991/_home_jan__sage_init_sage_0.py in 
<module>()

OSError: [Errno 2] No such file or directory: 'test.py'
sage: pwd
'/usr/local/src/sage-4.1.1'
sage: 
sage: cd
/var/autofs/misc/home/jan
sage: os.stat('test.py')
posix.stat_result(st_mode=33188, st_ino=14352965, st_dev=25L, st_nlink=1, 
st_uid=1000, st_gid=500, st_size=90, st_atime=1252651131, st_mtime=1252583815, 
st_ctime=1252586628)
xiting SAGE (CPU time 0m0.05s, Wall time 1m4.65s).
sage: os.path.exists('test.py')
True
sage: 
0 j...@muizenberg:~$ipython
/var/lib/python-support/python2.6/IPython/Magic.py:38: DeprecationWarning: the 
sets module is deprecated
  from sets import Set
Total number of aliases: 15
Python 2.6.2 (release26-maint, Apr 19 2009, 01:58:18) 
Type "copyright", "credits" or "license" for more information.

IPython 0.9.1 -- An enhanced Interactive Python.
?         -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help      -> Python's own help system.
object?   -> Details about 'object'. ?object also works, ?? prints more.

In [1]:import os

In [2]:os.path.exists('test.py')
Out[2]:True

In [3]:
Do you really want to exit ([y]/n)? y
0 j...@muizenberg:~$python -V
Python 2.6.2
0 j...@muizenberg:~$/usr/local/src/sage-4.1.1/sage-python -V
Python 2.6.2
0 j...@muizenberg:~$uname -a
Linux muizenberg 2.6.28-15-generic #49-Ubuntu SMP Tue Aug 18 19:25:34 UTC 2009 
x86_64 GNU/Linux
0 j...@muizenberg:~$lsb_release -d
Description:    Ubuntu 9.04


Should I be setting the current working directory somehow every time
sage is started? Or is this a bug?


regards,
Jan



-- 
   .~. 
   /V\     Jan Groenewald
  /( )\    www.aims.ac.za
  ^^-^^ 

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to