[Tutor] gnupg within a for loop
Danny Yoo
dyoo at hashcollision.org
Mon Jun 2 02:35:44 CEST 2014
> 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20140601/488ff446/attachment.html>
More information about the Tutor
mailing list