python/sage scripts
First of all, my apologies for being a noob and a windows user. I'm using sage in virtualbox. I'm at this part of the tutorial: sagenb.org/doc/live/tutorial/programming.html#standalone-python-sage-scripts
I'm having 2 problems:
(1) I can't execute "./factor 2006". It says "no such file or directory", but the file is definitely there, and "sage -python factor 2006" works.
(2) factoring polynomials doesn't seem to work for me in sage. If I call factor on a string I get a TypeError: "unable to factor n".
Edit: Part of the problem may have been that the script was in a shared folder in VirtualBox. Here is some exact input/output, working completely locally (this changes the error in (2)).
>./factor 2006
/usr/bin/env: sage -python: No such file or directory
>sage -python factor "32*x^5-1"
NameError: name 'x' is not defined
Any assistance is much appreciated!
Hi! I can guess what your problems are, but it would be better if you posted *exact commands* that you tried that didn't work. That makes it easier for others to be helped by your question too!
See my edit, thanks.
Thanks. Gee, this really suggests that `from sage.all import *` isn't being done, not to mention the enigmatic no such file problem.