[Tutor] File copying - best way?
Sun, 5 Aug 2001 18:48:20 -0400 (EDT)
Ok. This makes sense (although I always considered "no such file of
directory" an error message. I guess it's just more of an explanation! :)
- fleet -
On Sun, 5 Aug 2001 email@example.com wrote:
> > "errno" useful also
> > - but I have no clue how to use it. Would this have allowed
> > me to test:
> > os.popen("ls *.jpg")
> > if it found no jpg files?
> No. The reason being that in Unix 'ls' findng no files is
> NOT an error. 'ls' simply reports, quite accurately, the contents
> of a directory, if it's empty 'ls' returns am empty list! That's
> not an error. 'ls' will return an error if you ask it to list
> the contents of a non existent directory however.
> In that case the errno() stuff might be useful to you...
> Alan g