1
0
mirror of https://github.com/kanzure/pdfparanoia.git synced 2024-12-04 23:15:52 +01:00

use io.StringIO when py3k

This commit is contained in:
Bryan Bishop 2013-07-19 21:25:42 -05:00
parent c3e590f22f
commit 59a71a7cd3

View File

@ -12,7 +12,11 @@ if __name__ == "__main__":
import sys import sys
import pdfparanoia import pdfparanoia
import argparse import argparse
from StringIO import StringIO
try:
from StringIO import StringIO
except ImportError:
from io import StringIO, BytesIO
ArgP = argparse.ArgumentParser(description="pdfparanoia is a PDF watermark removal library for academic papers. Some publishers include private information like institution names, personal names, ip addresses, timestamps and other identifying information in watermarks on each page.") ArgP = argparse.ArgumentParser(description="pdfparanoia is a PDF watermark removal library for academic papers. Some publishers include private information like institution names, personal names, ip addresses, timestamps and other identifying information in watermarks on each page.")
ArgP.add_argument('in_pdf', nargs='?', type=argparse.FileType('rb'), ArgP.add_argument('in_pdf', nargs='?', type=argparse.FileType('rb'),