Tutorial Moodle VPL Gremlins -- Python

From dftwiki3
Revision as of 11:33, 11 June 2014 by Thiebaut (talk | contribs) (Created page with "--~~~~ ---- {| style="width:100%;" | style="width:60%;" | __TOC__ | Image:MoodleVPLLogo.png |} <br /> <bluebox> This tutorial builds on the [[Tutorial: Moodle VPL Hello ...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

--D. Thiebaut (talk) 12:33, 11 June 2014 (EDT)


MoodleVPLLogo.png


This tutorial builds on the first one in the series, which should be done first, as the present tutorial skips some steps. In this tutorial we setup a VPL activity that tests a Python program that is supposed to

  1. ask the user for the name of a file (that must exists)
  2. open the file, read it, and replace all g- and G-letters with gremlin or Gremlin, and
  3. save the new content in the original file.

We perform the evaluation and automatic grading of the program by using a second Python program that creates the sample text file and feeds its name via a redirected stdin to the student program.