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

_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor

Reply via email to