diff -Naur pyPdf-1.12/pyPdf/generic.py src/pyPdf-1.12/pyPdf/generic.py --- pyPdf-1.12/pyPdf/generic.py 2009-08-03 19:11:12.000000000 +0200 +++ pyPdf-1.12/pyPdf/generic.py 2009-08-03 20:40:22.000000000 +0200 @@ -212,8 +212,6 @@ class NumberObject(int, PdfObject): - def __init__(self, value): - int.__init__(self, value) def writeToStream(self, stream, encryption_key): stream.write(repr(self)) @@ -402,9 +400,6 @@ class NameObject(str, PdfObject): delimiterCharacters = "(", ")", "<", ">", "[", "]", "{", "}", "/", "%" - def __init__(self, data): - str.__init__(self, data) - def writeToStream(self, stream, encryption_key): stream.write(self) diff -Naur pyPdf-1.12/pyPdf/pdf.py src/pyPdf-1.12/pyPdf/pdf.py --- pyPdf-1.12/pyPdf/pdf.py 2009-08-03 19:11:12.000000000 +0200 +++ pyPdf-1.12/pyPdf/pdf.py 2009-08-03 20:40:22.000000000 +0200 @@ -49,7 +49,6 @@ import warnings from generic import * from utils import readNonWhitespace, readUntilWhitespace, ConvertFunctionsToVirtualList -from sets import ImmutableSet ## # This class supports writing PDF files out, given pages produced by another @@ -119,7 +118,8 @@ # encryption. When false, 40bit encryption will be used. By default, this # flag is on. def encrypt(self, user_pwd, owner_pwd = None, use_128bit = True): - import md5, time, random + import time, random + from hashlib import md5 if owner_pwd == None: owner_pwd = user_pwd if use_128bit: @@ -160,7 +160,8 @@ # @param stream An object to write the file to. The object must support # the write method, and the tell method, similar to a file object. def write(self, stream): - import struct, md5 + import struct + from hashlib import md5 externalReferenceMap = {} self.stack = [] @@ -554,7 +555,8 @@ if not hasattr(self, '_decryption_key'): raise Exception, "file has not been decrypted" # otherwise, decrypt here... - import struct, md5 + import struct + from hashlib import md5 pack1 = struct.pack("