[cse491] On putting absolute paths in your code
C. Titus Brown
ctb at msu.edu
Mon Nov 23 19:16:09 PST 2009
I would really, really appreciate it if you could avoid hard-coding
paths into your code -- e.g. several of you have been putting
file_server = FileServer('/user/nermal/cse491/trunk/templates')
into your code. You can just do
templates_path = os.path.abspath('./templates')
file_server = FileServer(templates_path)
If you put hard-coded paths in it makes life difficult for me when I
download your code to run it on my own computers...
thanks,
--titus
--
C. Titus Brown, ctb at msu.edu
More information about the cse491-fall-2009
mailing list