Drop python2 support.

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
pull/6/head r14.1.0
Slávek Banko 1 year 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")
while 1:
try:
line=raw_input()
line=input()
except:break
if line == "" : continue # empty line
line = line.replace('"','',) # Strip out ' "' quotes
@ -91,8 +91,8 @@ while 1:
both = True
continue
else:
print 'Error in col[2]'
print '*** Error in header - col 2 s/b Debit, Credit, or Amount'
print('Error in col[2]')
print('*** Error in header - col 2 s/b Debit, Credit, or Amount')
#continue
exit
setup ==False
@ -148,4 +148,4 @@ while 1:
col = '-' + col # Mark as -ve
line = line + 'T' + col + '\n'
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"
# ^
fin = raw_input('Please enter the input Prices filename (.csv, .PRN, etc.) : ')
fout = raw_input('Please enter the output filename (add .qif) : ')
symbol = raw_input('Please enter the symbol for this stock: ')
fin = input('Please enter the input Prices filename (.csv, .PRN, etc.) : ')
fout = input('Please enter the output filename (add .qif) : ')
symbol = input('Please enter the symbol for this stock: ')
symbol ='"'+ symbol+'"'# Add " " around symbol
inputfile = csv.reader(open(fin, 'rb'))
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.extend(inputfile)

@ -35,11 +35,11 @@ import csv
# 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.
fin = raw_input('Please enter the input Securities filename (.csv, .PRN, etc.) : ')
fout = raw_input('Please enter the output filename (add .qif) : ')
fin = input('Please enter the input Securities filename (.csv, .PRN, etc.) : ')
fout = input('Please enter the output filename (add .qif) : ')
line = csv.reader(open(fin, "rb"))
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.extend(line)
line = "!Option:AutoSwitch\n"

Loading…
Cancel
Save