• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Generate a large text file to test compile
2# the resulting code that contains a large (>65536 bytes)
3# resource entry.  Just have 12 iterations of the following:
4#
5# -100 of each of the lowercase letters
6# -100 of each of the uppercase letters
7# -100 of the numbers 0 to 9
8#
9# See issue #1580
10
11import io
12import string
13import sys
14
15if len(sys.argv) != 2:
16    raise SystemExit('Usage: %s <output-file>' % sys.argv[0])
17
18with open(sys.argv[1], 'w', newline='\n') as f:
19    for count in range(12):
20        for c in string.ascii_lowercase:
21            f.write("%s\n" % (c * 100))
22
23        for c in string.ascii_uppercase:
24            f.write("%s\n" % (c * 100))
25
26        for i in range(10):
27            f.write("%s\n" % (str(i) * 100))
28