File: 2to3_grepseq.patch

package info (click to toggle)
python-biotools 1.2.12-5
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye
  • size: 348 kB
  • sloc: python: 2,373; sh: 21; makefile: 4
file content (35 lines) | stat: -rw-r--r-- 1,125 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
Author: Andreas Tille <tille@debian.org>
Last-Update: Thu, 02 Mar 2017 11:51:33 +0100
Description: Fix Python3 errors by using 2to3

--- a/grepseq
+++ b/grepseq
@@ -14,7 +14,7 @@ def search(regex, filename, options):
     cmx = options.max_count
 
     if pfn and not cnt:
-        print '\n=======>', filename, '<=======\n'
+        print('\n=======>', filename, '<=======\n')
 
     for seq in io.open(filename, 'r'):
         in_name = snm and regex.search(seq.name + ' ' + seq.defline)
@@ -22,16 +22,16 @@ def search(regex, filename, options):
         if not inv and (in_name or in_seq):
             options.curr_count += 1
             if not cnt:
-                print seq
+                print(seq)
         elif inv and not (in_name or in_seq):
             options.curr_count += 1
             if not cnt:
-                print seq
+                print(seq)
         if cmx and options.curr_count > cmx:
             break
 
     if cnt:
-        print options.curr_count
+        print(options.curr_count)
 
 if __name__ == '__main__':
     optp = OptionParser(usage="%prog [options] <pattern> <files ...>")