IT 117: Intermediate to Scripting
Class 21 Exercise
Script for this exercise
Open a text editor
You can use the editor built into IDLE or use a program like Sublime.
Copy the text below into the file
Save the file as ex21.py
Copy the files students.txt and
students.dat and
student.py from
/home/ghoffman/course_files/it117_files
Use FileZilla to do this.
Run this script in IDLE
Open the script file in IDLE. Under the Run menu, select Run Module.
You should see something like
it117 s17 section 1
Adams Jane, 45235
Smith John, 34524
Copy the file to Unix
Open FileZilla and connect to
pe15.cs.umb.edu
You will have to connect using your Unix username and password.
Go to your 117 directory
Go to your ex directory
Inside this directory create the directory ex21
Right-click in the whitespace inside the
ex directory.
Click and drag down to Create directory.
Add ex21 to the path in the dialog box.
Click OK.
Copy your ex21.py
Click and drag the script from your machine to the
ex21 directory.
Make your script executable
Right-click on the file and select "Permissions" from the menu.
Enter 755 in the box provided.
Click OK.
This will make the script executable.
Copy the data files to pe15
Click and drag students.txt,
students.dat and
student.py from your machine to the
ex21 directory
Running my test script on your script
If you want to run my text script on your Class Exercise script do the following
Connect to pe15.cs.umb.edu
Use an ssh client.
Go to your ex21 directory
Run my test code on your script
~ghoffman/it117_test/ex21.sh
The script will prompt you for your Unix username.