[Tutor] gnupg within a for loop
Alan Gauld
alan.gauld at btinternet.com
Sun Jun 1 22:59:04 CEST 2014
On 01/06/14 17:22, Wolfgang Maier wrote:
> The really basic thing is that os.listdir returns the file names it finds in
> the specified directory, but that does not include the path to the file
> again. So the first element of unencrypted in your case is just 'file1' and
> that doesn't seem to exist in your working directory. You'll have to prepend
> your original path '/home/adam/temp/' to it again (via os.path.join for
> example).
An alternative is to use os.chdir() to set your working directory
to /home/adam/temp
That should also fix the problem.
hth
--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.flickr.com/photos/alangauldphotos
More information about the Tutor
mailing list