@@ -0,0 +1,817 @@
+#/usr/bdin/env python%0Aimport random%0A%0A# File name source%0Af_num = %5Bchr(48 + x) for x in range(1, 10)%5D%0A%0A# A to Z%0Af_alphabat = %5Bchr(65 + x) for x in range(0, 26)%5D%0A%0A# Make up filename in 5 chars%0Afile_name = %5B%5D%0Afor i in range(1, 6):%0A    use_num = random.randint(0, 1)%0A    if use_num:%0A        file_name.append(random.choice(f_num))%0A    else:%0A        file_name.append(random.choice(f_alphabat))%0A%0A# Convert to string%0Afile_name = %22%22.join(file_name)%0A%0Aprint(file_name)%0A%0A# Show a open file exception with details%0Atry:%0A    file = open(file_name)%0Aexcept IOError as file_err:%0A    print(file_err)%0A%0A# Fire a self exception%0Aclass my_error(Exception):%0A    def __init__(self, errno):%0A        self.value = errno%0A    def __str__(self):%0A        return repr(self.value)%0A%0Atry:%0A    raise my_error(%22ouch...%22);%0Aexcept my_error as e:%0A    print(e)%0A

Test exception