Boston Python Workshop/Friday handout: Difference between revisions

Content added Content deleted
imported>Brittag
(removing spam)
 
Line 8: Line 8:
* To access the wireless network, connect to the Cambridge network and open a browser. You should be redirected to a login page, which will prompt you for a wireless code. The code is: pw304.
* To access the wireless network, connect to the Cambridge network and open a browser. You should be redirected to a login page, which will prompt you for a wireless code. The code is: pw304.


== Setting up Python ==
I'm so glad I found my solution onnile.

This section has instructions for installing Python and running Python from a terminal prompt.

# [[Python on Windows|Windows]]
# [[Python on OSX|OS X]]
# [[Python on Linux|Linux]]

In addition to being able to run Python, you should pick the text editor you'll use for writing and saving Python code during the workshop.

* 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 or you can start it from a terminal with:
gedit

== How to get to a Python prompt ==

Often in these directions, you'll need to type things at Python prompt. To get one:

* On Windows: Start -> Run -> cmd.exe
** Type this, and press enter:
** \python27\python
* On Linux or Mac OS:
** Open a Terminal, and type 'python'


== Intro to Programming stream: Setting up for the ColorWall ==
== Intro to Programming stream: Setting up for the ColorWall ==
Line 38: Line 61:
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.
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.


=== Run the ColorWall ===
Such a deep asnewr! GD&RVVF
Run the example effects:

* On Windows, assuming the ColorWall software was downloaded to C:\Users\yourusername\Desktop\ColorWall
run \Python27\python.exe "C:\Users\yourusername\Desktop\colorwall\ColorWall\run.py"
* On OS X, assuming the ColorWall software was downloaded to ~/Desktop/colorwall/ColorWall run
python ~/Desktop/colorwall/ColorWall/run.py
* On Linux, assuming the ColorWall software was downloaded to ~/Desktop/colorwall/ColorWall run
python ~/Desktop/colorwall/ColorWall/run.py


=== Open run.py in text editor ===
=== Open run.py in text editor ===
Line 54: Line 85:
If you want to make a web app on Saturday, you'll need to install some additional packages. 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 an instructor. '''Instructions''': [[Setting up the web app]]
If you want to make a web app on Saturday, you'll need to install some additional packages. 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 an instructor. '''Instructions''': [[Setting up the web app]]


==== Web Developer: You're ready for Saturday!====
Short, sweet, to the point, FREE-exactly as ifnoramtoin should be!

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.