On 02/06/14 01:35, Danny Yoo wrote: >> Thanks Danny, that was spot on. I actually used os.chdir to change to >> the base directory (which I assigned to a variable) just before the open >> statement. I don't know if that's 'pythonically' correct but it seemed >> like a simple way to do it. Again, thank you for helping me fix this. > > I am glad! I would recommend using os.path.join instead to build absolute > paths, as it's less fragile to external factors. I think of current > working directory the same way I think of global variables: use it > judiciously.
Yup, makes sense, thanks for the advice, _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor