On Thursday, November 7, 2013 10:01:00 AM UTC-8, [email protected] wrote: > How come this only comes into play for doctesting and not for just running > a script with sage? Using the example I posted before in the file > example_script.py, I get > It looks like sage silences the python message. If you run "sage --python" you get sage's python straight and if you run it where you want to run your doctest, you'll probably see a warning message printed. Sage's python is only patched to print a warning (and change the path setup). It still runs.
The doctest script checks whether python prints a warning message and, if so, refuses to run. The warning messages from "sage --python" about paths are pretty specific, though, so perhaps running it gives you some hints. I thought about that too. However, the path for example_script.py looks like /DIR1/DIR2/example_script.py, where DIR1 and DIR2 are both group writable and belong to the same group. However, they do have different owners, so I tried nesting the script deeper, so the path is /DIR1/DIR2/example_dir/example_dir2/example_script.py, where both example_dir and example_dir2 have the same owner and group and are group writable (but not world writable). The results were the same as before. I also tried running it in a group writable directory in my home directory, > which also failed. It seems to me that the documented behavior does not > match the actual behavior. > I can confirm that I also am not able to get "sage --python" to run without printing a warning in any situation I tried where the current directory is group writeable. I think the intention was that this should in principle be possible so perhaps this is a bug. -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/groups/opt_out.
