Opened 8 years ago

Last modified 7 years ago

#12671 closed defect

attaching files which have spaces in absolute path name fails on second run — at Initial Version

Reported by: ppurka Owned by: jason
Priority: major Milestone: sage-5.1
Component: misc Keywords: attach load preparser sd40.5
Cc: Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:


It is not possible to watch a file which has spaces in its absolute path. This is an example:

sage: f1 = 'a.sage'; open(f1,'w').write("print 'h'")             
sage: attach a.sage   
sage: attach
attach          attached_files  
sage: attached_files()
['/tmp/a b/a.sage']
sage: open(f1,'w').write("print 'p'")
ValueError                                Traceback (most recent call last)

/tmp/a b/<ipython console> in <module>()

/home/punarbasu/Installations/sage-5.0.beta2/local/lib/python2.7/site-packages/sage/misc/preparser.pyc in load(filename, globals, attach)
   1601         if len(v) > 1:
   1602             for file in v:
-> 1603                 load(file, globals, attach=attach)
   1604             return

/home/punarbasu/Installations/sage-5.0.beta2/local/lib/python2.7/site-packages/sage/misc/preparser.pyc in load(filename, globals, attach)
   1617     if not is_loadable_filename(filename):
-> 1618         raise ValueError('argument (=%r) to load or attach must have extension py, pyx, sage, spyx, or m' % filename)
   1620     fpath = os.path.expanduser(filename)

ValueError: argument (='/tmp/a') to load or attach must have extension py, pyx, sage, spyx, or m

Change History (0)

Note: See TracTickets for help on using tickets.