[Tutor] gnupg within a for loop

Adam Gold awg1 at gmx.com
Mon Jun 2 02:40:22 CEST 2014

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,

More information about the Tutor mailing list