Boston Python Workshop/Friday handout: Difference between revisions

imported>Lsblakk
imported>Lsblakk
Line 43:
</gallery>
 
===Get project files===
<ol>
<li>Create a folder on your desktop called colorwall</li>
Line 55 ⟶ 56:
</ul>
</li>
===Installing Tkinter===
<li>The ColorWall project depends on Tkinter which is pre-installed on some Windows, OS X, and Linux* distributions. To check if you have Tkinter installed, open your Terminal/cmd window and start your Python prompt:</li>
python
Line 61 ⟶ 63:
 
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>
 
<li>Run the example effects:
===Run the ColorWall===
<ul>
<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\ColorWall\run.py"</code></li>
 
<li>On OS X, assuming the ColorWall software was downloaded to <code>~/Desktop/colorwall/ColorWall</code>, run</li>
<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>
run \Python27\python.exe "C:\Users\yourusername\Desktop\colorwall\ColorWall\run.py"
<li>* On OS X, assuming the ColorWall software was downloaded to <code>~/Desktop/colorwall/ColorWall</code>, run</li>
python ~/Desktop/colorwall/ColorWall/run.py
<li>* On Linux, assuming the ColorWall software was downloaded to <code>~/Desktop/colorwall/ColorWall</code>, run</li>
python ~/Desktop/colorwall/ColorWall/run.py
===Open run.py in text editor===
</ul>
<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</li>
</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</li>
# Linux
gedit run.py
 
# Mac & Windows right-click on run.py and "open with" your text editor of choice
 
</ol>
=== 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.
Anonymous user