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>Paulproteus No edit summary |
imported>Brittag (removing spam) |
||
(38 intermediate revisions by 7 users not shown) | |||
Line 20:
* On Windows, you might use NotePad. To start NotePad: click Start, point to Programs, point to Accessories, and then click Notepad.
* On OS X, you might use TextEdit. To start TextEdit: search for TextEdit from Spotlight, or navigate to Applications/TextEdit.
* On Linux, you might use GEdit. To start GEdit: click Applications, point to Accessories, and click Text Editor
gedit
== How to get to a Python prompt ==
Line 32 ⟶ 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 42 ⟶ 43:
</gallery>
===Get project files===
* Create a folder on your desktop called colorwall</li>
cd Desktop/colorwall
wget http://mit.edu/jesstess/www/BostonPythonWorkshop/ColorWall.tar.gz
# unpack the tarball
<li>The ColorWall project has no dependencies to install on common, modern Windows, OS X, and Linux* distributions. To confirm that you have no dependencies to install, at a Python prompt run:▼
tar -xvf ColorWall.tar.gz
▲
python
>>> import Tkinter
If that command results in an <code>ImportError</code>
<li>Run the example effects:▼
<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\run.py</code></li>▼
<li>On OS X, assuming the ColorWall software was downloaded to <code>~/Downloads/ColorWall</code>, run <code>python ~/Downloads/ColorWall/run.py</code></li>▼
<li>On Linux, assuming the ColorWall software was downloaded to <code>~/Downloads/ColorWall</code>, run <code>python ~/Downloads/ColorWall/run.py</code></li>▼
<li>Make sure you can open Python files in a text editor. Test this by running the text editor, navigating to your ColorWall directory, and opening <code>run.py</code>.</li>▼
===
▲
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 it's setup are optional. Attendees interested in the material or who have some programming experience are encouraged to work through the setup instructions with a staff member.▼
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/Windows right-click on run.py and "open with" your text editor of choice
==== 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.
|