Anonymous user
Boston Python Workshop/Friday handout: Difference between revisions
Boston Python Workshop/Friday handout (view source)
Revision as of 07:58, 18 August 2013
, 10 years agoremoving spam
imported>Lsblakk |
imported>Brittag (removing spam) |
||
(23 intermediate revisions by 7 users not shown) | |||
Line 33:
** Open a Terminal, and type 'python'
== Intro to Programming stream: Setting up for the ColorWall ==
The ColorWall is a framework for writing effects for a wall of pixels. During the Saturday workshop, you will write your own effects for the ColorWall. (see it [http://vimeo.com/16522975 in action])
Line 43:
</gallery>
===Get project files===
▲<li>Windows users, try http://mit.edu/jesstess/www/BostonPythonWorkshop/ColorWall.zip first, and download it to your colorwall folder. The file should automatically get uncompressed when you download it.</li>
▲<li>OS X and Linux users can get .tar.gz file through Terminal with</li>
cd Desktop/colorwall
wget http://mit.edu/jesstess/www/BostonPythonWorkshop/ColorWall.tar.gz
# unpack the tarball
tar -xvf ColorWall.tar.gz
===Install Tkinter===
python
>>> import Tkinter
If that command results in an <code>ImportError</code> try following the [http://tkinter.unpythonic.net/wiki/How_to_install_Tkinter instructions for installing Tkinter here] and if you have problems let a staff member know and we'll help you. (*On some Debian installation, when you <code>import Tkinter</code> it will tell you that you need to install the <code>python-tk</code> package, which you should do). After you are done at the Python prompt, exit to the regular terminal by typing <code>exit()</code> and hitting enter.
<li>Run the example effects:▼
=== Run the ColorWall ===
<li>On Windows, assuming the ColorWall software was downloaded to <code>C:\Users\yourusername\Desktop\ColorWall</code>, run <code>\Python27\python.exe "C:\Users\yourusername\Desktop\colorwall\ColorWall\run.py"</code></li>▼
<li>On OS X, assuming the ColorWall software was downloaded to <code>~/Desktop/colorwall/ColorWall</code>, run</li> ▼
▲
run \Python27\python.exe "C:\Users\yourusername\Desktop\colorwall\ColorWall\run.py"
▲
python ~/Desktop/colorwall/ColorWall/run.py
python ~/Desktop/colorwall/ColorWall/run.py
=== Open run.py in text editor ===
# Linux
gedit run.py
# Mac
If you want to make a web app on Saturday, you have to go through this process. This is an optional step in setup; however, it can be an exciting and fulfilling one. The web app is an example of an integrated Python-based application. It uses the [http://www.djangoproject.com/ Django] web framework. Because the setup for this project is somewhat involved, this project and its setup are optional. If you run into trouble, get the help of a staff member.▼
==== Programmer: You're ready for Saturday! ====
If you're doing the programming section of the workshop tomorrow and you got this far, you're ready to go. Show an instructor your run.py working and also opened in a text editor, get your sticker and go have a good sleep.
== Intro to Web App stream: Setting up Django ==
▲If you want to make a web app on Saturday, you'll
==== Web Developer: You're ready for Saturday!====
If you're doing the web app stream of the workshop tomorrow and you got this far, you're ready to go. Show an instructor that your welcome page on alwaysdata.net is working, get your sticker and go have a good sleep.
|