5

I am using Scinote 5.4.0 with OSX 10.7.4. I am unable to execute script files from the console using the exec("path") command; when I do so, only the first line of the script file is read.

Example:

-->exec("plot1.sce") 
-->x=[0:.1:10]'; //(the first line of my code)

If however I "execute with echo" from the editor Scinote, the script will run just fine.

Does anybody know what is going on? (The script files I am trying to run are in my present working directory).

Thanks!

Update: I just installed Scilab on an identical machine and the same thing is happening.

Update: Per Scilab's bugtracker, it appears to be caused by Scinote defaulting to cr eol on a mac. I don't really know what this means or how to fix it, but the adventure continues!

Update: I found the solution!:http://comments.gmane.org/gmane.comp.mathematics.scilab.user/6184

In the preferences, I changed the eol to Unix, and the default file encoding to iso-8859-1. I restarted and exec is now working!

spoorcc
  • 2,907
  • 2
  • 21
  • 29
andy87
  • 53
  • 1
  • 4
  • just spent half an hour searching for the problem before figuring it out myself. thanks for pointing it out here – Volker Mauel Mar 21 '13 at 15:16
  • 1
    Please post an answer so that the question does not remain without one. –  Jul 11 '15 at 00:01

1 Answers1

0

The link is not easy to follow so here's the answer (pasted)

The problem is actually scinote's, not scilab's. I don't have a Lion machine to check if I'm correct, but it seems scinote's file encoding is no longer compatible in ML. I discovered that when I opened scinote generated files with a different text editor (vi) the new lines weren't encoded right for my machine. The other give-away was that executing scripts written prior to upgrading worked fine.

Go to preferences and in the scinotes tab, switch default file encoding to iso-8859-1. I also switched the end-of-line to Unix.

PTRK
  • 899
  • 1
  • 5
  • 18