Choral Music for Holy Week - Chanticleer_Mysteria- Gregorian Chants_10_Holy Sunday- Hymn- Vexilla Regis.mp3 (07/11), exception problem

Alex cut_me_out at
Fri Apr 14 16:46:14 CEST 2000

> from uu import *
> decode(infile, outfile)
> raise Error, 'No valid begin line found in input file'
> uu.Error: No valid begin line found in input file
> how do i trap it
> i've tried
> try:
>     decode(infile, outfile)
> except uu.error:
>     pass
> gives me
> NameError uu :

I'm not sure, but I think you've bought all of uu into your current
namespace.  If that's the case, you probably want

    decode(infile, outfile)
except error:

...except that 'error' should probably be 'Error' judging by the

On the face of it, it seems like you would be better off keeping uu in
its own namespace in this case:

import uu
    uu.decode (infile, outfile)
except: uu.Error


More information about the Python-list mailing list