Update PyRTF to Python 3

This commit is contained in:
Fran Boon
2020-02-12 09:54:21 +00:00
parent ec40c1b5a9
commit e89d2bc7fa
6 changed files with 45 additions and 20 deletions
+13 -8
View File
@@ -1,12 +1,17 @@
from PropertySets import *
from Elements import *
from Styles import *
from Renderer import *
from .PropertySets import *
from .Elements import *
from .Styles import *
from .Renderer import *
from .Constants import PY2
if PY2:
from cStringIO import StringIO as BytesIO
else:
from io import BytesIO
def dumps(doc):
import cStringIO
s=cStringIO.StringIO()
r=Renderer()
r.Write(doc,s)
s = BytesIO()
r = Renderer()
r.Write(doc, s)
return s.getvalue()