Drop python2 support.

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
pull/6/head r14.1.0
Slávek Banko 2 years ago
parent 08ab6ec214
commit d09e55dfbb
No known key found for this signature in database
GPG Key ID: 608F5293A04BE668

@ -60,7 +60,7 @@ both = False # only one amount column
print("!Type:Bank") print("!Type:Bank")
while 1: while 1:
try: try:
line=raw_input() line=input()
except:break except:break
if line == "" : continue # empty line if line == "" : continue # empty line
line = line.replace('"','',) # Strip out ' "' quotes line = line.replace('"','',) # Strip out ' "' quotes
@ -91,8 +91,8 @@ while 1:
both = True both = True
continue continue
else: else:
print 'Error in col[2]' print('Error in col[2]')
print '*** Error in header - col 2 s/b Debit, Credit, or Amount' print('*** Error in header - col 2 s/b Debit, Credit, or Amount')
#continue #continue
exit exit
setup ==False setup ==False
@ -148,4 +148,4 @@ while 1:
col = '-' + col # Mark as -ve col = '-' + col # Mark as -ve
line = line + 'T' + col + '\n' line = line + 'T' + col + '\n'
cnum+=1 cnum+=1
print line + '^' # output this entry print(line + '^') # output this entry

@ -38,14 +38,14 @@ import csv
# "HJU8.BE",61.62,"23.12.09" # "HJU8.BE",61.62,"23.12.09"
# ^ # ^
fin = raw_input('Please enter the input Prices filename (.csv, .PRN, etc.) : ') fin = input('Please enter the input Prices filename (.csv, .PRN, etc.) : ')
fout = raw_input('Please enter the output filename (add .qif) : ') fout = input('Please enter the output filename (add .qif) : ')
symbol = raw_input('Please enter the symbol for this stock: ') symbol = input('Please enter the symbol for this stock: ')
symbol ='"'+ symbol+'"'# Add " " around symbol symbol ='"'+ symbol+'"'# Add " " around symbol
inputfile = csv.reader(open(fin, 'rb')) inputfile = csv.reader(open(fin, 'rb'))
outputfile = open(fout, 'w') outputfile = open(fout, 'w')
inputfile.next() # Skip header line. Comment out if no header. next(inputfile) # Skip header line. Comment out if no header.
inputfile_list = [] inputfile_list = []
inputfile_list.extend(inputfile) inputfile_list.extend(inputfile)

@ -35,11 +35,11 @@ import csv
# These fields are accepted and suffixed with 'M' in the output file. # These fields are accepted and suffixed with 'M' in the output file.
# Anything of importance in them will need to be copy/pasted into KMM. # Anything of importance in them will need to be copy/pasted into KMM.
fin = raw_input('Please enter the input Securities filename (.csv, .PRN, etc.) : ') fin = input('Please enter the input Securities filename (.csv, .PRN, etc.) : ')
fout = raw_input('Please enter the output filename (add .qif) : ') fout = input('Please enter the output filename (add .qif) : ')
line = csv.reader(open(fin, "rb")) line = csv.reader(open(fin, "rb"))
outputfile = open(fout, 'w') outputfile = open(fout, 'w')
line.next() # Skip header line. Comment out if no header. next(line) # Skip header line. Comment out if no header.
line_list = [] line_list = []
line_list.extend(line) line_list.extend(line)
line = "!Option:AutoSwitch\n" line = "!Option:AutoSwitch\n"

Loading…
Cancel
Save