Although the CS department has a number of labs available for working on Python projects (such as HAAS G056 and LWSN B160), sometimes these labs are occupied, or some other circumstances keep you from being able to make it to the computer labs to get your work done. It is easy to set up your Windows or Mac computer to let you work on labs and projects from home.
Note that you can only work on labs from home if you are in one of the online sections. You must come to your lab session to work on your lab if you are in a regular section, but you can still use these steps to work on projects at home.
After this tutorial, you will be able to do the following on your Windows or Mac machine:
Although there are many different ways to set up Python and the other software that you'll need to work from home, the tools in this tutorial are consistent across platforms, so you will follow similar steps no matter whether you have a computer running Windows 7, Windows 8 or Mac OS X.
You can download Python via Python's official website. As of the time of writing, the most current version of Python is 3.3.3. This version is a bit newer than the one we use in lab, and that's okay - just make sure not to download Python 2.7.6, as the code you work on in this class will not work with that version!
Read below to see which link to follow, depending on your operating system.Before downloading a version of Python, you must determine if you have a 32-bit or 64-bit version of Windows. This is simple on both Windows 7 and 8.
If you have a 32-bit machine, click on the link Python 3.3.3 Windows x86 MSI Installer to get Python.
Otherwise, if you have a 64-bit machine, click on the link Python 3.3.3 Windows X86-64 MSI Installer to get Python.
Once you have downloaded the installer, double-click on it and follow the instructions on screen to install Python. Then, you can use IDLE to interact with Python the same way you did in lab.
Before downloading a version of Python, you must determine what kind of processor you have in your Mac. Fortunately, this is an easy process.
To do this, click on the blue apple icon in the upper left corner of the screen, then click About This Mac. Look at the Processor section.
If your processor's name contains the word Intel, download Python from the link Python 3.3.3 Mac OS X 64-bit/32-bit x86-64/i386 Installer.
Otherwise, if you have an older Mac using the PowerPC architecture, get Python from the link Python 3.3.3 Mac OS X 32-bit i386/PPC Installer.
Once you have downloaded the installer, double-click on it and follow the instructions on screen to install Python. Then, you can use IDLE to interact with Python the same way you did in lab.
The instructions here diverge a little bit depending on your operating system. Please read below the heading for your appropriate operating system.
To access the data.cs.purdue.edu UNIX system, we are going to use the same software (PuTTY) that we use in lab.
You can download PuTTY from its official website. (The link provided links directly to the .exe you need to download.)
Double-click on the file you just downloaded, and enter data.cs.purdue.edu under Host Name (or IP address). Then, hit Open.
You may get a window that looks like the one below when connecting to the server. If you do, just press Yes.
Type your Purdue login name and password when prompted. Note that PuTTY will not show any characters when you are typing in your password, so make sure to type it very carefully.
Now, you should be in somewhat more familiar territory. You can refer to the UNIX tutorial and to the older labs to turn in your work.
If you are using a Mac, access a Terminal window (under Applications -> Utilities). We will be using a UNIX program called ssh (secure shell) to remotely connect to the UNIX machine, just like we used PuTTY on the Windows machines to do so.
Once you are at your Terminal prompt, enter the following command (if this example doesn't make sense to you, please read the UNIX tutorial). Remember to not type the dollar sign:
$ ssh your_purdue_login@data.cs.purdue.edu
Replace your_purdue_login with your actual Purdue login.
You may receive a prompt which asks you something along the lines of:
The authenticity of the host 'data.cs.purdue.edu' cannot be established.
RSA key fingerprint is ... (some set of letters and numbers)
Are you sure you wish to continue connecting? (yes/no):
If so, type yes and hit Enter.
The program should prompt you for your password. Once you enter it, you will be remotely connected to the UNIX machine.
At this point, you should see a terminal interface which is virtually identical to the PuTTY interface you saw in lab, and you can follow general turn-in instructions.
Generally, when you are turning in any lab, you are going to be submitting your entire folder's worth of work to a particular directory on our end. If all of your folders are organized as cs177/lab1, cs177/lab2, etc., then you can simply follow the procedure below to turn in any lab.
$ cd
$ cd cs177
$ turnin -v -c cs177 -p labXX your_folder_name
So, for example, if my code for the lab lab04 were stored in a folder called cs177/Lab4, then I would type:
$ cd
$ cd cs177
$ turnin -v -c cs177 -p lab04 Lab4
The naming schema for the directories on our end will be as follows: lab03, lab04, ..., labXX. Apologies for the earlier inconsistency.
Don't forget that UNIX systems are case-sensitive. If your cs177 folder is called CS177, then the cd cs177 would become cd CS177.
Finally, you can make sure you submitted the correct files for labXX by typing:
$ turnin -v -c cs177 -p labXX
Notice that you do not put the name of a folder at the end of the command. This shows what files were submitted for that lab.
Hopefully, this tutorial has made working from home a little less intimidating. The Python download is easily accessible and lets you work on your projects from the comfort of your home. FileZilla allows you to transfer your files to the network drive. PuTTY (or the terminal, if on OS X) allows you to access the UNIX system to turn your files in.
For direct feedback on this tutorial - if anything written is unclear, if additional examples are requested, or if you simply liked it and want to tell me (and make my day!), feel free to send me an email at suversky at purdue dot edu.
Good luck and happy coding from your friendly neighborhood TA!
-- Sergei Uversky