
import codecs
from docopt import docopt

__version__ = '0.1'
__author__ = 'Honghe'

BLOCKSIZE = 1024**2 # size in bytes

def convert(sourceFile, targetFile, sourceEncoding, targetEncoding):
    with codecs.open(sourceFile, 'rb', sourceEncoding) as sfile:
        with codecs.open(targetFile, 'wb', targetEncoding) as tfile:
            while True:
                contents = sfile.read(BLOCKSIZE)
                if not contents:
                    break 
                tfile.write(contents)

if __name__ == '__main__':
    arguments = docopt(__doc__)
    sourceFile = arguments['<sourceFile>']
    targetFile = arguments['<targetFile>']
    sourceEncoding = arguments['<sourceEncoding>']
    targetEncoding = arguments['<targetEncoding>']
    convert(sourceFile, targetFile, sourceEncoding, targetEncoding)


import codecs
from docopt import docopt

__version__ = '0.1'
__author__ = 'Honghe'

BLOCKSIZE = 1024 # number of characters in corresponding encoding, not bytes 

def convert(sourceFile, targetFile, sourceEncoding, targetEncoding):
    with codecs.open(sourceFile, 'rb', sourceEncoding) as sfile:
        with codecs.open(targetFile, 'wb', targetEncoding) as tfile:
            while True:
                contents = sfile.read(BLOCKSIZE)
                if not contents:
                    break 
                tfile.write(contents)

if __name__ == '__main__':
    arguments = docopt(__doc__)
    sourceFile = arguments['<sourceFile>']
    targetFile = arguments['<targetFile>']
    sourceEncoding = arguments['<sourceEncoding>']
    targetEncoding = arguments['<targetEncoding>']
    convert(sourceFile, targetFile, sourceEncoding, targetEncoding)

Correct the comment of BLOCKSIZE
Correct the comment of BLOCKSIZE

  
  import codecs
  from docopt import docopt
  
  __version__ = '0.1'
  __author__ = 'Honghe'
  
- BLOCKSIZE = 1024**2 # size in bytes
+ BLOCKSIZE = 1024 # number of characters in corresponding encoding, not bytes 
  
  def convert(sourceFile, targetFile, sourceEncoding, targetEncoding):
      with codecs.open(sourceFile, 'rb', sourceEncoding) as sfile:
          with codecs.open(targetFile, 'wb', targetEncoding) as tfile:
              while True:
                  contents = sfile.read(BLOCKSIZE)
                  if not contents:
                      break 
                  tfile.write(contents)
  
  if __name__ == '__main__':
      arguments = docopt(__doc__)
      sourceFile = arguments['<sourceFile>']
      targetFile = arguments['<targetFile>']
      sourceEncoding = arguments['<sourceEncoding>']
      targetEncoding = arguments['<targetEncoding>']
      convert(sourceFile, targetFile, sourceEncoding, targetEncoding)
  
Correct the comment of BLOCKSIZE
## Code Before:

import codecs
from docopt import docopt

__version__ = '0.1'
__author__ = 'Honghe'

BLOCKSIZE = 1024**2 # size in bytes

def convert(sourceFile, targetFile, sourceEncoding, targetEncoding):
    with codecs.open(sourceFile, 'rb', sourceEncoding) as sfile:
        with codecs.open(targetFile, 'wb', targetEncoding) as tfile:
            while True:
                contents = sfile.read(BLOCKSIZE)
                if not contents:
                    break 
                tfile.write(contents)

if __name__ == '__main__':
    arguments = docopt(__doc__)
    sourceFile = arguments['<sourceFile>']
    targetFile = arguments['<targetFile>']
    sourceEncoding = arguments['<sourceEncoding>']
    targetEncoding = arguments['<targetEncoding>']
    convert(sourceFile, targetFile, sourceEncoding, targetEncoding)

## Instruction:
Correct the comment of BLOCKSIZE
## Code After:

import codecs
from docopt import docopt

__version__ = '0.1'
__author__ = 'Honghe'

BLOCKSIZE = 1024 # number of characters in corresponding encoding, not bytes 

def convert(sourceFile, targetFile, sourceEncoding, targetEncoding):
    with codecs.open(sourceFile, 'rb', sourceEncoding) as sfile:
        with codecs.open(targetFile, 'wb', targetEncoding) as tfile:
            while True:
                contents = sfile.read(BLOCKSIZE)
                if not contents:
                    break 
                tfile.write(contents)

if __name__ == '__main__':
    arguments = docopt(__doc__)
    sourceFile = arguments['<sourceFile>']
    targetFile = arguments['<targetFile>']
    sourceEncoding = arguments['<sourceEncoding>']
    targetEncoding = arguments['<targetEncoding>']
    convert(sourceFile, targetFile, sourceEncoding, targetEncoding)
