What's the difference between these two python scripts?

File script = FileSystem.open("/tmp/example.py", FILE_WRITE);
script.print("import urllib\n");
script.print("import ast\n");
script.print("r = urllib.urlopen('https://api/fields=transaction_sold_count&api_key=asdfasdfasdf')\n");
script.print("a = r.read()\n");
script.print("y = ast.literal_eval(a)\n");
script.print("b = y[]\n");
script.print("print b"); //should print an int


File script = FileSystem.open("/tmp/example.py", FILE_WRITE);
script.print("a = 394079273014\n");
script.print("print a"); 

NOTE: Both these scripts are set to be executable and the linux "cat" process shows that they both were input into the python script file without error. They were run with this process:

Process reading;

String output;
  output += (char)reading.read();

The latter, more simple example.py script runs flawlessly and prints to the serial monitor, while the former doesn't output anything. I'm really, really confused by this. I've run them both in my OSX terminal and they both run well there too. Are the imported modules in the former not included with the yun's version of python? Any leads would be appreciated!

At Mac Terminal:

ssh root@arduino.local

password: arduino

Please test at Linino console. Post error code here.

I had no idea that is how you accessed the Linino console. Now all the "opkg" recommendations make so much more sense.
Sorry for my noobery.

I installed the ssl module for python and the script runs perfectly now.

Thanks for all the help, Sonnyyu!!