Skip to content

Instantly share code, notes, and snippets.

@vext01
Created January 18, 2012 15:32
Show Gist options
  • Save vext01/1633547 to your computer and use it in GitHub Desktop.
Save vext01/1633547 to your computer and use it in GitHub Desktop.
Quick script to print student's assignments fr marking
#!/usr/bin/env python
import os
import os.path
tree = os.walk(".")
for root, dirs, files in tree:
if ("Doodle.java" not in files):
continue
uid = root.split("/")[1]
print("Processing %s..." % uid)
path = root.replace(" ", "\\ ") + "/Doodle.java"
os.system("a2ps -o %s.ps --center-title='%s' %s" % (uid, uid, path))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment