Page 1 of 1

Saving programs, and Internet connection

Posted: Wed Nov 27, 2013 9:27 am
by DaveTheWalker
Hello,

I've been having fun with the command-line Wolfram Language interpreter across a serial terminal (The graphical one is WAY too slow on my 1st gen. Pi). I have a couple of queries:

1) How do I save a session to a file, or write a program so I can run it later?
2) I can't get it to connect to the internet. If I try something like ChemicalData["Silicon"] I get an error. The error says "Use Help -> Internet Connectivity", but how on Earth do I get to this function?? All the help files point me at the "Internet Connection Dialog", but there's no such thing on the command line. How do I access the preferences to allow Wolfram to access the internet?
In[4]:= ChemicalData["Silicon"]
Installing data from Wolfram Research data server ....

PacletInstall::dwnld:
An error occurred downloading paclet ChemicalData_Index-8.0.32 from site
http://pacletserver.wolfram.com: Network error. Couldn't connect to server

ChemicalData::dlfail:
Internet download of data for ChemicalData
failed. Use Help > Internet Connectivity... to test or reconfigure internet
connectivity.

Out[4]= $Failed
Thanks,
Dave

Re: Saving programs, and Internet connection

Posted: Wed Nov 27, 2013 9:31 am
by DaveTheWalker
Sorry, this should be in the Wolfram Language forum!

Could a moderator move it for me?

Thanks!

Re: Saving programs, and Internet connection

Posted: Wed Nov 27, 2013 1:35 pm
by DougieLawson
Check your connection by ping google.com

Then try again.

ChemicalData[] worked for me.

Re: Saving programs, and Internet connection

Posted: Wed Nov 27, 2013 2:15 pm
by DaveTheWalker
Thanks Dougie - I got the net connection working eventually!.... now, any idea how to save a program?

Re: Saving programs, and Internet connection

Posted: Wed Nov 27, 2013 6:05 pm
by DougieLawson
DaveTheWalker wrote:Thanks Dougie - I got the net connection working eventually!.... now, any idea how to save a program?
I did my little bit of playing with Mathematica using the graphical interface. That lets you easily save a notebook.

On the command like you can get wolfram to read a file from stdin.

Code: Select all

echo 'ChemicalData["Silicon"]' | wolfram - > wf.out
so that could be a text file.

Code: Select all

cat text.file | wolfram - > wf.out
or

Code: Select all

wolfram text.file > wf.out