Changes to use the new fontTools.misc.eexec module instead of the old eexec module.


git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@57 4cde692c-a291-49d1-8350-778aa11640f8
diff --git a/Lib/fontTools/psLib.py b/Lib/fontTools/psLib.py
index 8408680..314171e 100644
--- a/Lib/fontTools/psLib.py
+++ b/Lib/fontTools/psLib.py
@@ -1,7 +1,7 @@
 import StringIO
 import regex
 import string
-import eexec
+from fontTools.misc import eexec
 import types
 from psOperators import *
 
@@ -99,7 +99,7 @@
 		self.pos = self.pos + 1
 		#self.skipwhite()
 		self.dirtybuf = self.buf[self.pos:]
-		self.buf, R = eexec.Decrypt(self.dirtybuf, 55665)
+		self.buf, R = eexec.decrypt(self.dirtybuf, 55665)
 		self.len = len(self.buf)
 		self.pos = 4
 	
diff --git a/Lib/fontTools/t1Lib.py b/Lib/fontTools/t1Lib.py
index a2c63fb..c4a2261 100644
--- a/Lib/fontTools/t1Lib.py
+++ b/Lib/fontTools/t1Lib.py
@@ -20,7 +20,7 @@
 __version__ = "1.0b2"
 DEBUG = 0
 
-import eexec
+from fontTools.misc import eexec
 import string
 import re
 import os
@@ -68,11 +68,11 @@
 		lenIV = self.font["Private"].get("lenIV", 4)
 		assert lenIV >= 0
 		for glyphName, charString in charStrings.items():
-			charString, R = eexec.Decrypt(charString, 4330)
+			charString, R = eexec.decrypt(charString, 4330)
 			charStrings[glyphName] = psCharStrings.T1CharString(charString[lenIV:])
 		subrs = self.font["Private"]["Subrs"]
 		for i in range(len(subrs)):
-			charString, R = eexec.Decrypt(subrs[i], 4330)
+			charString, R = eexec.decrypt(subrs[i], 4330)
 			subrs[i] = psCharStrings.T1CharString(charString[lenIV:])
 		del self.data
 	
@@ -246,7 +246,7 @@
 				code = 1
 			if code == 2 and dohex:
 				while chunk:
-					f.write(eexec.hexstring(chunk[:hexlinelen]))
+					f.write(eexec.hexString(chunk[:hexlinelen]))
 					f.write('\r')
 					chunk = chunk[hexlinelen:]
 			else:
@@ -279,7 +279,7 @@
 		if isencrypted:
 			if ishex(chunk[:4]):
 				chunk = dehexstring(chunk)
-			decrypted, R = eexec.Decrypt(chunk, 55665)
+			decrypted, R = eexec.decrypt(chunk, 55665)
 			decrypted = decrypted[4:]
 			if decrypted[-len(EEXECINTERNALEND)-1:-1] <> EEXECINTERNALEND \
 					and decrypted[-len(EEXECINTERNALEND)-2:-2] <> EEXECINTERNALEND:
@@ -309,7 +309,7 @@
 	return chunks
 
 def dehexstring(hexstring):
-	return eexec.dehexstring(string.join(string.split(hexstring), ""))
+	return eexec.deHexString(string.join(string.split(hexstring), ""))
 
 
 # Type 1 assertion