ASKSAGE: Sage Q&A Forum - Latest question feedhttp://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Mon, 13 May 2019 15:20:06 -0500Writing code in Notepad and copy pasting to SageMathhttp://ask.sagemath.org/question/46512/writing-code-in-notepad-and-copy-pasting-to-sagemath/So I'm trying my best to get the indent right everywhere, but sometimes I get the error that the indent is not right somewhere and also I get the error that I use some undefined name `n_points`; I have even tried typing the whole code into Sage myself, but then if I copy it from there and paste it in the notepad, it still includes all the dots. Even if I delete those dots, Sage still does not get happy when I copy and paste the code after **only** removing the dots via the notepad.... This is my code
def ell_geom_animation(E,init_points,n_points=10):
var('x,y')
#E = EllipticCurve(y^2==x^3-82*x);
p = init_points
j = len(p)
ell_frames = [plot(E)]*(n_points+j)
point_plots = []
line_plots = []
point_frames = []
line_frames = []
for i in srange(0,j-1):
point_plots += point(p[i][0:2],color='black',size=10)
for i in srange(0,n_points):
p += [E(p[i]+p[i+1])]
point_plots += point(p[j+i][0:2],color='black',size=10)
point_frames.append(point_plots)
line_plots += line([p[i][0:2],p[i+1][0:2]],color='black',size=10)
line_frames.append(line_plots)
A1 = animate(ell_frames)
A2 = animate(point_frames)
A3 = animate(line_frames)
return show(A1+A2+A3) # superimpose frame
Does anyone have some idea what is wrong with the alignments and maybe have a suggestion where I can write my code better such that I can simply copy and paste it in SageMath and press enter? I would very much appreciate suggestions and help.AlgebearMon, 13 May 2019 15:20:06 -0500http://ask.sagemath.org/question/46512/how to find the syntax errorhttp://ask.sagemath.org/question/41435/how-to-find-the-syntax-error/ Hi
Here's a short code (copy-paste) that gets me syntax error
i=3
while i>0 :
print i, 'looping'
i=i-1
"<ipython-input-7-8e7eba3f21a0>", line 4
i=i-Integer(1)
I retyped it a second time; now it works, but I don't see any difference.
i=3
while i>0 :
print i, 'looping'
i=i-1
Retyping only the line 4 with the error won't help, retyping the previous lines or restarting the kernel won't help either.
It's like a phantom error florinThu, 08 Mar 2018 05:58:58 -0600http://ask.sagemath.org/question/41435/%paste leads to dyld: Symbol not found: _sqlite3_intarray_bindhttp://ask.sagemath.org/question/34468/paste-leads-to-dyld-symbol-not-found-_sqlite3_intarray_bind/ I'm trying to paste Python code into Sage-5.12-OSX-64bit-10.8 and I'm getting the following error:
sage: %paste
dyld: Symbol not found: _sqlite3_intarray_bind
Referenced from: /System/Library/Frameworks/CoreData.framework/Versions/A/CoreData
Expected in: /Applications/Sage-5.12-OSX-64bit-10.8.app/Contents/Resources/sage/local/lib/libsqlite3.dylib
in /System/Library/Frameworks/CoreData.framework/Versions/A/CoreData
## -- End pasted text --
What's wrong?
%cpaste works.mavaviljSun, 14 Aug 2016 04:29:45 -0500http://ask.sagemath.org/question/34468/copy-paste from host machine to sage command linehttp://ask.sagemath.org/question/9784/copy-paste-from-host-machine-to-sage-command-line/Hi,
I'm running Sage on the Oracle VM VirtualBox, in command line mode (black background). How can I copy and paste text from my host machine?
Thanks,
ValentinaValentinaThu, 07 Feb 2013 23:32:18 -0600http://ask.sagemath.org/question/9784/