Update PyRTF to Python 3
This commit is contained in:
@@ -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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user