[Tutor] Running .py files in shell
Robert Layne
robert.layne at rockets.utoledo.edu
Wed Sep 21 23:23:54 CEST 2011
Well everybody, sorry for the incomplete sentences
and overall poor English but I wanted to make this
simple to read and understand for someone who
is completely inexperienced in any sort of programming,
as I am (very first day messing with this stuff, e.g.,
terminal). This is the result of hours of Googling that
was all done in one day. Perhaps someone who is
familiar with the commands below (in bold) wouldn’t
mind explaining what exactly is taking place. Additionally,
this was all done in terminal on a MacBook Pro
running Mac OS Lion.
1. Install macport binary (comes with installer; easy)
2. sudo port install py-game
a. not sure if this is necessary, as it doesn’t appear to cause
pygame to be functional
for python version 2.7.1 (stock python on lion)
3. sudo port select --set python python 2.7
a. I believe this set the default python version to 2.7.2
which I also believe was
downloaded during step 2 (therefore why I think this
ends up being a necessary step)
4. Download setuptools-0.6c11-py2.7.tar
5. In folder gasp-0.3.4, which appears after clicking
on the .tar, place setup.py in the gasp folder
6. sudo python gasp/setup.py install
a. make sure your directory is the folder gasp-0.3.4
7. sudo port –v install py27-gtk
a. takes about an hour for this step to complete
8. sudo port uninstall py-game
a. this step is not necessary for gasp to work; I simply
didn’t want any unnecessary
stuff on my computer that was downloaded during the
second step; however, this step
put python 2.7.2 on my computer; could install 2.7.2
separately I guess but this way
worked for me; a lot of other unnecessary stuff is installed
during this step too but
I think it’ll remain even after this command, oh well
More information about the Tutor
mailing list