Content of test_poly.sage isn't important -- this happens any time attempt to
load / attach any .sage or .py file. Currently, I've "fixed" the commandline
error with the attached hack.
I think the issue is that you've got SAGE installed globally somehow. I've got
SAGE located in /home/boothby/sage, which is a symlink to
/home/boothby/sagebuilds/sage-2.5 -- and other users on my system
(hypothetically, anyway -- this is on my laptop) can't use it.
On Thu, 10 May 2007, William Stein wrote:
>
> Hi,
>
> (1) Other people have reported the same problem, however I can't
> replicate it on any of my
> SAGE installs.
> (2) I have no idea what test_poly.sage is, which makes your bug report
> very annoying.
> (3) What happens when load example.sage which is in SAGE_ROOT.
>
> Based on the traceback, it seems very likely the problem was
> introduced by the new
> Python-2.5.1 package conflicting with the not-so-new Ipython package.
> Probably
> the right workaround is to slightly change ipython. E.g., if you comment out
> or
> try: except: the line that raises the error below, what happens?
>
> On 5/10/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>>
>> sage: load test_poly.sage
>> ---------------------------------------------------------------------------
>> <type 'exceptions.AttributeError'> Traceback (most recent call last)
>>
>> /home/boothby/<ipython console> in <module>()
>>
>> /home/boothby/sagebuilds/sage-2.5/local/lib/python2.5/site-packages/IPython/iplib.py
>> in ipmagic(self, arg_s)
>> 955 else:
>> 956 magic_args = self.var_expand(magic_args,1)
>> --> 957 return fn(magic_args)
>> 958
>> 959 def ipalias(self,arg_s):
>>
>> /home/boothby/sagebuilds/sage-2.5/local/lib/python2.5/site-packages/IPython/Magic.py
>> in magic_run(self, parameter_s, runner)
>> 1674 if restore_main:
>> 1675 sys.modules['__main__'] = restore_main
>> -> 1676 self.shell.reloadhist()
>> 1677
>> 1678 return stats
>>
>> /home/boothby/sagebuilds/sage-2.5/local/lib/python2.5/site-packages/IPython/iplib.py
>> in reloadhist(self)
>> 1255
>> 1256 if self.has_readline:
>> -> 1257 self.readline.clear_history()
>> 1258 self.readline.read_history_file(self.shell.histfile)
>> 1259
>>
>> <type 'exceptions.AttributeError'>: 'module' object has no attribute
>> 'clear_history'
>>
>>
>>>
>>
>
>
> --
> William Stein
> Associate Professor of Mathematics
> University of Washington
> http://www.williamstein.org
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~----------~----~----~----~------~----~------~--~---
diff -r 40e265b27df7 sage-run
--- a/sage-run Tue May 08 19:06:06 2007 -0700
+++ b/sage-run Thu May 10 10:38:01 2007 -0700
@@ -20,13 +20,13 @@ if file[-5:] == '.sage':
if file[-5:] == '.sage':
if os.system('sage -preparse %s'%file):
sys.exit(1)
- e = os.system('sage-python %s.py %s'%(file[:-5], options))
+ e = os.system('$SAGE_LOCAL/bin/sage-python %s.py %s'%(file[:-5], options))
sys.exit(e)
elif file[-5:] == '.spyx':
e = os.system('sage-sagex %s'%file)
sys.exit(e)
else:
- e = os.system('sage-python %s %s'%(file, options))
+ e = os.system('$SAGE_LOCAL/bin/sage-python %s %s'%(file, options))
if e:
print "sage: Error running %s using Python"%file
sys.exit(e)