mirror of
https://github.com/kanzure/pdfparanoia.git
synced 2024-12-04 15:05:52 +01:00
use io.StringIO when py3k
This commit is contained in:
parent
c3e590f22f
commit
59a71a7cd3
@ -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'),
|
||||||
|
Loading…
Reference in New Issue
Block a user