Python iconThis tutorial has been updated from Mavericks to Yosemite. I have tested it and it works perfectly. Before the tutorial, I want to point out a few of the best authors of “beginning python” books. The first is Al Sweigart, who not only sells his book in print on Amazon, but also offers them for free on his website. His three beginning python books, Invent You Own Computer Games with Python, Making Games with Python & Pygame, and Hacking Secret Ciphers with Python can be found for free in PDF here. If you want to purchase the print versions, go here. Another author is Jason Briggs, whose book Python for Kids can be found here. The last author in our spotlight, Professor Craven, has an incredible website called Program Arcade Games with Python and his book on the same subject can be found here. All of these books are written for Python 3 programming.

You can find a great writeup about Pycharm 3 CE, the best free IDE you can get for Python here.

Now about the tutorial. Please note, there are three command line entries that I had to break into two lines because I like my ridiculously narrow blog. I noted them in the tutorial and reminded you to enter them on one line. Here we go:

Install the Xcode Command Line Tools from Apple. Apple now provides an official Command Line Tools for Xcode package that you can install without needing to install Xcode itself! You can install it with xcode-select –install on Mavericks and Yosemite or download it from Apple’s developer site (free registration required) and search for “Command Line Tools”

Install Quartz from here

Install Homebrew and necessary tools:

*** Type this on one line ***

ruby -e “$(curl -fsSL
https://raw.githubusercontent.com/Homebrew/install/master/install)”

brew update

brew install python3 (this currently installs version 3.4.3)

brew install mercurial

brew install sdl sdl_image sdl_mixer sdl_ttf portmidi

*** Type this on one line ***

brew install –HEAD
https://raw.github.com/Homebrew/homebrew-headonly/master/smpeg.rb

Make sure you are using TWO ‘-’ (dashes) in front of HEAD.

Clone the pygame repository:

cd /Users/YourName/Downloads
hg clone https://bitbucket.org/pygame/pygame
cd pygame
cd src

Copy this file into src, replacing the one there.

Now install pygame by typing this on one line:

/usr/local/Cellar/python3/3.4.3/bin/pip3.4
install /Users/YourName/Downloads/pygame

That’s it. You can test your install by opening idle3 app located in:
/usr/local/Cellar/python3/3.4.3
then type: import pygame [hit return]
if there is no error, you were successful.

If this tutorial helped you, please follow me on twitter @dudeslife .

Comments 41 Comments »

FiretvLast month, Amazon through their hat into the “set top box” ring and by now, you probably know the hardware specs of the Amazon FireTV far surpass those of the AppleTV and Roku. You probably already know what apps come with it (Prime, Netflix, Hulu, etc) and which ones do not (HBO Go, Xfinity TV Go, Dish Anywhere, Time Warner App, etc). Well, the good news is that it doesn’t really matter what apps come with FireTV because you can install almost anything yourself. HBO Go? yes. Slingbox Player? yes. Dish Anywhere? yes. This reviewtorial will be from the perspective of “outside of the box cool stuff you can do with your Amazon FireTV” and how well it works.

Here we go:

Not essential but some apps require a mouse for navigation (I recommend the Logitech k400 Keyboard $30)
Turn on Development Mode on your FireTV under setting:
Settings>System>Developer Options>ADB debugging on

Install the Android Development Package on your computer (not the FireTV). You can find it here. The important part is the program ADB which moves your apps from your computer to your FireTV. The best thing to do is create and android directory on your computer and move ADB there. Put any apps (the .apk files) in the same directory. This will make your command line entries easier.

Make sure your FireTV is connected to your network. Get the IP of the FireTV. To do this go to:

settings>system>about>network and write down the ip address.

On your computer, open up a Terminal window and enter the directory containing adb (and app .apks) and enter these commands

adb kill-server
adb start-server
adb connect Your.FireTV.ip.address

You will see a message “connected to firetv.ip:5555″

You are now ready to install your apps

adb install yourapp.apk

All of these sideloaded apps will appear in your Settings>Applications listing. They will not appear on the main screen.

The first and most important app to install: XBMC of course. You can get it here. It runs perfectly with the FireTV Remote. I have installed and confirmed working MAME4droid, Snes9X EX+ (Both work with FireTV game controllers), ES File Explorer and Slingplayer for Android Tablets (requires k400 Mouse for Navigation). Reddit reports that HBO Go, Xfinity TV Go, Dish Anywhere, Time Warner App, and Charter TV app are all working but need the K400 Mouse for navigation. Keep in mind that this is all being done BEFORE the FireTV has been rooted. Because Amazon made the app sideloading option available, the FireTV is the most powerful and open of the big three set top boxes.

Comments 10 Comments »