
def file_path_verification_code_reader(path):
    def reader(image):
        with open(path, 'wb') as output:
            output.write(image)
        print 'Verification code picture is saved to %s, please open it manually and enter what you see.' % path
        code = raw_input('Verification code: ')
        return code
    return reader

def ascii_verification_code_reader(image_data):
    import ascii_verification_code
    print ascii_verification_code.convert_to_ascii(image_data)
    code = raw_input('Verification code: ')
    return code

def default_verification_code_reader(args):
    if args.verification_code_handler == 'ascii':
        return ascii_verification_code_reader
    elif args.verification_code_path:
        return file_path_verification_code_reader(args.verification_code_path)
@@ -40,20 +40,17 @@
 (path):%0A
-    
+%09
 def read
@@ -60,24 +60,18 @@
 image):%0A
-        
+%09%09
 with ope
@@ -99,20 +99,11 @@
 ut:%0A
-            
+%09%09%09
 outp
@@ -118,24 +118,18 @@
 (image)%0A
-        
+%09%09
 print 'V
@@ -225,24 +225,18 @@
  %25 path%0A
-        
+%09%09
 code = r
@@ -267,24 +267,18 @@
 ode: ')%0A
-        
+%09%09
 return c
@@ -281,20 +281,17 @@
 rn code%0A
-    
+%09
 return r
@@ -345,20 +345,17 @@
 _data):%0A
-    
+%09
 import a
@@ -377,20 +377,17 @@
 on_code%0A
-    
+%09
 print as
@@ -437,20 +437,17 @@
 e_data)%0A
-    
+%09
 code = r
@@ -478,20 +478,17 @@
 ode: ')%0A
-    
+%09
 return c
@@ -536,20 +536,17 @@
 (args):%0A
-    
+%09
 if args.
@@ -583,24 +583,18 @@
 ascii':%0A
-        
+%09%09
 return a
@@ -623,20 +623,17 @@
 _reader%0A
-    
+%09
 elif arg
@@ -662,16 +662,10 @@
 th:%0A
-        
+%09%09
 retu
@@ -726,12 +726,14 @@
 n_code_path)
+%0A%0A

convert spaces to tabs