I would like to have some data read in every time the kernel starts, but it doesn't seem to work. Say I have a CSV file I want to have read in, for example I use:
Export["/home/jason/temp.csv", Table[{n, 2 n, 3 n}, {n, 5}]];
Quit[];
Then I open up the init.m
file in a text editor and add the line
temp123=Import["/home/jason/temp.csv"];
I save the file, then go back to a notebook and reopen the kernel and ask for the definition of temp123
, it comes back as Null
?temp123
(*
Global`temp123
temp123=Null
*)
What is the best way to do this? I've tried putting the call to Import
the CSV file in another file which is called by init.m
, but the result is the same.
Thanks
$Path
are not yet initialized at the time it is loaded. (No time to test this now.) $\endgroup$.dat
or even a.m
file extension and the results are the same. $\endgroup$