1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-15 20:35:17 +03:00

Use Python 2/3 compatible scripts

Almost entirely fixing print statements, but also a couple importing
changes, wrapped in try/excepts, and one case where dict.keys() not
being a list would be a problem.

Also reverts e41139a397

The real fix for #1907
This commit is contained in:
Sean Vig 2015-10-04 13:24:59 -05:00
parent b3d52e3525
commit 5efa5d47d3
14 changed files with 103 additions and 72 deletions

View file

@ -1,6 +1,7 @@
#!/usr/bin/env python #!/usr/bin/env python
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
from __future__ import print_function
import sys import sys
import os import os
@ -43,7 +44,7 @@ while True:
links = "(" + ", ".join(issue_links) + ")" links = "(" + ", ".join(issue_links) + ")"
line = "<li>" + line + " " + links + "</li>" line = "<li>" + line + " " + links + "</li>"
print line print(line)
inp.close() inp.close()

View file

@ -1,9 +1,11 @@
#!/bin/env python #!/bin/env python
from __future__ import print_function
import sys, glob import sys, glob
def addLine(filename, newline, after): def addLine(filename, newline, after):
print filename, newline print(filename, newline)
lines = file(filename, 'r').readlines() lines = file(filename, 'r').readlines()
for i, line in enumerate(lines): for i, line in enumerate(lines):
if after in line: if after in line:

View file

@ -1,5 +1,7 @@
#!/bin/env python #!/bin/env python
from __future__ import print_function
SIGN_BIT = (0x80) # Sign bit for a A-law byte. SIGN_BIT = (0x80) # Sign bit for a A-law byte.
QUANT_MASK = (0xf) # Quantization field mask. QUANT_MASK = (0xf) # Quantization field mask.
SEG_SHIFT = (4) # Left shift for segment number. SEG_SHIFT = (4) # Left shift for segment number.
@ -47,5 +49,5 @@ def tableToString(name, table):
result += ' };' result += ' };'
return result return result
print tableToString('alawTable', pcmTable(alaw2linear)) print(tableToString('alawTable', pcmTable(alaw2linear)))
print tableToString('ulawTable', pcmTable(ulaw2linear)) print(tableToString('ulawTable', pcmTable(ulaw2linear)))

View file

@ -1,5 +1,7 @@
#!/usr/bin/env python #!/usr/bin/env python
from __future__ import print_function
import os import os
import re import re
import sys import sys
@ -38,9 +40,9 @@ def writeheader(filename,header):
f = open(filename,'w') f = open(filename,'w')
f.writelines(output) f.writelines(output)
f.close() f.close()
print "added header to %s" %filename print("added header to %s" %filename)
except IOError,err: except IOError as err:
print "something went wrong trying to add header to %s: %s" % (filename,err) print("something went wrong trying to add header to %s: %s" % (filename,err))
def main(args=sys.argv): def main(args=sys.argv):
headerfile = open(args[1]) headerfile = open(args[1])

View file

@ -1,7 +1,9 @@
from __future__ import print_function
BITLEN_DSM2 = 16 BITLEN_DSM2 = 16
def sendByteDsm2(b): def sendByteDsm2(b):
print "%02x:" % b, print("%02x:" % b, end=' ')
lev = 0 lev = 0
len = BITLEN_DSM2 len = BITLEN_DSM2
for i in range(9): for i in range(9):
@ -9,13 +11,13 @@ def sendByteDsm2(b):
if (lev == nlev): if (lev == nlev):
len += BITLEN_DSM2 len += BITLEN_DSM2
else: else:
print len, print(len, end=' ')
# _send_1(nlev ? len-5 : len+3); # _send_1(nlev ? len-5 : len+3);
len = BITLEN_DSM2 len = BITLEN_DSM2
lev = nlev lev = nlev
b = (b>>1) | 0x80 b = (b>>1) | 0x80
# _send_1(len+BITLEN_DSM2+3); // 2 stop bits # _send_1(len+BITLEN_DSM2+3); // 2 stop bits
print len+BITLEN_DSM2 print(len+BITLEN_DSM2)
sendByteDsm2(24) sendByteDsm2(24)
sendByteDsm2(17) sendByteDsm2(17)

View file

@ -1,5 +1,7 @@
#!/bin/env python #!/bin/env python
from __future__ import division, print_function
curr = 0 curr = 0
idx = 0 idx = 0
byte = 0 byte = 0
@ -10,12 +12,12 @@ def push4bits(val):
curr += val << idx curr += val << idx
idx += 4 idx += 4
if idx == 8: if idx == 8:
print "0x%02X," % curr, print("0x%02X," % curr, end=' ')
idx = 0 idx = 0
curr = 0 curr = 0
byte += 1 byte += 1
if byte % 16 == 0: if byte % 16 == 0:
print print()
cluster = 0 cluster = 0
@ -27,8 +29,8 @@ def pushCluster(val):
cluster += 1 cluster += 1
def pushFile(size): def pushFile(size):
sectors = size / 512 sectors = size // 512
count = sectors / 8 count = sectors // 8
for i in range(count-1): for i in range(count-1):
pushCluster(cluster+1) pushCluster(cluster+1)
pushCluster(0xFFF) pushCluster(0xFFF)
@ -36,14 +38,14 @@ def pushFile(size):
def pushDisk(eeprom, flash): def pushDisk(eeprom, flash):
global curr, idx, byte, cluster global curr, idx, byte, cluster
curr = idx = byte = cluster = 0 curr = idx = byte = cluster = 0
print "Disk with %dk EEPROM and %dk FLASH:" % (eeprom, flash) print("Disk with %dk EEPROM and %dk FLASH:" % (eeprom, flash))
pushCluster(0xFF8) pushCluster(0xFF8)
pushCluster(0xFFF) pushCluster(0xFFF)
pushFile(eeprom*1024) pushFile(eeprom*1024)
pushFile(flash*1024) pushFile(flash*1024)
while byte < 512: while byte < 512:
push4bits(0) push4bits(0)
print print()
pushDisk(32, 512) pushDisk(32, 512)
pushDisk(64, 512) pushDisk(64, 512)

View file

@ -1,5 +1,7 @@
#!/usr/bin/env python #!/usr/bin/env python
from __future__ import division, print_function
import sys import sys
from PyQt4 import Qt, QtGui from PyQt4 import Qt, QtGui
@ -19,7 +21,7 @@ else:
def writeSize(f, width, height): def writeSize(f, width, height):
if lcdwidth > 255: if lcdwidth > 255:
f.write("%d,%d,%d,%d,\n" % (width%256, width/256, height%256, height/256)) f.write("%d,%d,%d,%d,\n" % (width%256, width//256, height%256, height//256))
else: else:
f.write("%d,%d,\n" % (width, height)) f.write("%d,%d,\n" % (width, height))
@ -27,7 +29,7 @@ if what == "1bit":
rows = 1 rows = 1
if len(sys.argv) > 5: if len(sys.argv) > 5:
rows = int(sys.argv[5]) rows = int(sys.argv[5])
writeSize(f, width, height/rows) writeSize(f, width, height//rows)
for y in range(0, height, 8): for y in range(0, height, 8):
for x in range(width): for x in range(width):
value = 0 value = 0
@ -42,7 +44,7 @@ elif what == "4/4/4/4":
for y in range(height): for y in range(height):
for x in range(width): for x in range(width):
pixel = image.pixel(x, y) pixel = image.pixel(x, y)
f.write("0x%1x%1x%1x%1x," % (Qt.qAlpha(pixel)/16, Qt.qRed(pixel)/16, Qt.qGreen(pixel)/16, Qt.qBlue(pixel)/16)) f.write("0x%1x%1x%1x%1x," % (Qt.qAlpha(pixel)//16, Qt.qRed(pixel)//16, Qt.qGreen(pixel)//16, Qt.qBlue(pixel)//16))
f.write("\n") f.write("\n")
elif what == "5/6/5/8": elif what == "5/6/5/8":
colors = [] colors = []
@ -148,4 +150,3 @@ elif what == "22x38":
f.write("\n") f.write("\n")
else: else:
print("wrong argument", sys.argv[4]) print("wrong argument", sys.argv[4])

View file

@ -1,5 +1,7 @@
#!/usr/bin/env python #!/usr/bin/env python
from __future__ import print_function
import sys, os import sys, os
for filename in sys.argv[1:]: for filename in sys.argv[1:]:
@ -14,7 +16,7 @@ for filename in sys.argv[1:]:
if line.startswith("#ifndef "): if line.startswith("#ifndef "):
guard = line[8:] guard = line[8:]
if lines[i+1].strip() == "#define %s" % guard: if lines[i+1].strip() == "#define %s" % guard:
print filename, ":", guard, "=>", newguard print(filename, ":", guard, "=>", newguard)
lines[i] = "#ifndef %s\n" % newguard lines[i] = "#ifndef %s\n" % newguard
lines[i+1] = "#define %s\n" % newguard lines[i+1] = "#define %s\n" % newguard
end = -1 end = -1

View file

@ -1,6 +1,7 @@
#!/usr/bin/env python #!/usr/bin/env python
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
from __future__ import print_function
import sys import sys
import os import os
@ -24,11 +25,11 @@ error = None
def checkName(name): def checkName(name):
global warning global warning
if name in dups_name: if name in dups_name:
print "WARNING: Duplicate name %s found for constant %s" % (name, CONSTANT_VALUE) print("WARNING: Duplicate name %s found for constant %s" % (name, CONSTANT_VALUE))
warning = True warning = True
dups_name.append(name) dups_name.append(name)
if name != name.lower(): if name != name.lower():
print "WARNING: Name not in lower case %s found for constant %s" % (name, CONSTANT_VALUE) print("WARNING: Name not in lower case %s found for constant %s" % (name, CONSTANT_VALUE))
warning = True warning = True
@ -46,9 +47,9 @@ def LEXP_MULTIPLE(nameFormat, descriptionFormat, valuesCount):
exports_multiple.append( (CONSTANT_VALUE, nameFormat, descriptionFormat, valuesCount) ) exports_multiple.append( (CONSTANT_VALUE, nameFormat, descriptionFormat, valuesCount) )
if len(sys.argv) < 3: if len(sys.argv) < 3:
print "Error: not enough arguments!" print("Error: not enough arguments!")
print "Usage:" print("Usage:")
print " luaexport.py <version> <input txt> <output cpp> [<doc output>]" print(" luaexport.py <version> <input txt> <output cpp> [<doc output>]")
version = sys.argv[1] version = sys.argv[1]
inputFile = sys.argv[2] inputFile = sys.argv[2]
@ -56,11 +57,11 @@ outputFile = sys.argv[3]
docFile = None docFile = None
if len(sys.argv) >= 4: if len(sys.argv) >= 4:
docFile = sys.argv[4] docFile = sys.argv[4]
print "Version %s" % version print("Version %s" % version)
print "Input file %s" % inputFile print("Input file %s" % inputFile)
print "Output file %s" % outputFile print("Output file %s" % outputFile)
if docFile: if docFile:
print "Documentation file %s" % docFile print("Documentation file %s" % docFile)
inp = open(inputFile, "r") inp = open(inputFile, "r")
@ -75,7 +76,7 @@ while True:
parts = line.split('LEXP') parts = line.split('LEXP')
#print parts #print parts
if len(parts) != 2: if len(parts) != 2:
print "Wrong line: %s" % line print("Wrong line: %s" % line)
continue continue
cmd = 'LEXP' + parts[1] cmd = 'LEXP' + parts[1]
cnst = parts[0].rstrip(', ') cnst = parts[0].rstrip(', ')
@ -93,7 +94,7 @@ while True:
# print cmd # print cmd
eval(cmd) eval(cmd)
except: except:
print "ERROR: problem with the definition: %s" % line print("ERROR: problem with the definition: %s" % line)
traceback.print_exc() traceback.print_exc()
error = True error = True
@ -130,7 +131,7 @@ exports.sort(key = lambda x: x[1]) #sort by name
data = [" {%s, \"%s\", \"%s\"}" % export for export in exports] data = [" {%s, \"%s\", \"%s\"}" % export for export in exports]
out.write(",\n".join(data)) out.write(",\n".join(data))
out.write("\n};\n\n") out.write("\n};\n\n")
print "Generated %d items in luaFields[]" % len(exports) print("Generated %d items in luaFields[]" % len(exports))
out.write(""" out.write("""
// The list of Lua fields that have a range of values // The list of Lua fields that have a range of values
@ -139,7 +140,7 @@ const LuaMultipleField luaMultipleFields[] = {
data = [" {%s, \"%s\", \"%s\", %d}" % export for export in exports_multiple] data = [" {%s, \"%s\", \"%s\", %d}" % export for export in exports_multiple]
out.write(",\n".join(data)) out.write(",\n".join(data))
out.write("\n};\n\n") out.write("\n};\n\n")
print "Generated %d items in luaMultipleFields[]" % len(exports_multiple) print("Generated %d items in luaMultipleFields[]" % len(exports_multiple))
out.close() out.close()
if docFile: if docFile:

View file

@ -1,9 +1,11 @@
#!/usr/bin/env python #!/usr/bin/env python
from __future__ import print_function
import sys import sys
filename = sys.argv[1] filename = sys.argv[1]
print filename print(filename)
fr = open(filename) fr = open(filename)
fw = open(filename+".new", "w") fw = open(filename+".new", "w")
ew = open(filename+".en", "w") ew = open(filename+".en", "w")
@ -46,10 +48,10 @@ for line in fr.readlines():
if str_rep in replacements.keys(): if str_rep in replacements.keys():
if replacements[str_rep] != str: if replacements[str_rep] != str:
print "!!!!! NON !!!!!" print("!!!!! NON !!!!!")
else: else:
replacements[str_rep] = str replacements[str_rep] = str
print glob_str, "=>", str, str_rep print(glob_str, "=>", str, str_rep)
ew.write("#define " + str_rep[1:] + " "*(17-len(str_rep)) + '"%s"\n' % str) ew.write("#define " + str_rep[1:] + " "*(17-len(str_rep)) + '"%s"\n' % str)
hw.write("extern const PROGMEM char %s[];\n" % str_rep) hw.write("extern const PROGMEM char %s[];\n" % str_rep)
cw.write("const prog_char APM %s[] = %s;\n" % (str_rep, str_rep[1:])) cw.write("const prog_char APM %s[] = %s;\n" % (str_rep, str_rep[1:]))

View file

@ -1,5 +1,7 @@
#!/bin/env python #!/bin/env python
from __future__ import print_function
import math import math
samples = 1024 samples = 1024
@ -17,13 +19,13 @@ for i in range(samples):
max = sample max = sample
elif sample < min: elif sample < min:
min = sample min = sample
print "%d," % sample, print("%d," % sample, end=' ')
if i % 10 == 9: if i % 10 == 9:
print print()
print print()
print 'Range is:', min, max print('Range is:', min, max)
if max > 32767 or min < -32768: if max > 32767 or min < -32768:
print "Invalid range!" print("Invalid range!")

View file

@ -3,6 +3,7 @@
# This program parses sport.log files # This program parses sport.log files
from __future__ import division, print_function
import os import os
import sys import sys
@ -28,28 +29,28 @@ quiet = False
def ParseFlVSS(packet, dataId, prim, appId, data, crc): def ParseFlVSS(packet, dataId, prim, appId, data, crc):
# if dataId != 0xa1: # if dataId != 0xa1:
# return # return
print "packet: %s (%4d)" % (dump(packet), lineNumber) , print("packet: %s (%4d)" % (dump(packet), lineNumber), end=' ')
cells = (data & 0xF0) >> 4 cells = (data & 0xF0) >> 4
battnumber = data & 0xF; battnumber = data & 0xF;
voltage1 = ((data & 0x000FFF00) >> 8) / 5 voltage1 = ((data & 0x000FFF00) >> 8) // 5
voltage2 = ((data & 0xFFF00000) >> 20) / 5 voltage2 = ((data & 0xFFF00000) >> 20) // 5
print " FLVSS: no cells: %d, cell: %d: voltages: %0.2f %0.2f" % (cells, battnumber, voltage1/100.0, voltage2/100.0) print(" FLVSS: no cells: %d, cell: %d: voltages: %0.2f %0.2f" % (cells, battnumber, voltage1/100., voltage2/100.))
def ParseRSSI(packet, dataId, prim, appId, data, crc): def ParseRSSI(packet, dataId, prim, appId, data, crc):
print "packet: %s (%4d)" % (dump(packet), lineNumber) , print("packet: %s (%4d)" % (dump(packet), lineNumber), end=' ')
print " RSSI: %d" % (data & 0xFF) print(" RSSI: %d" % (data & 0xFF))
def ParseAdc(packet, dataId, prim, appId, data, crc): def ParseAdc(packet, dataId, prim, appId, data, crc):
print "packet: %s (%4d)" % (dump(packet), lineNumber) , print("packet: %s (%4d)" % (dump(packet), lineNumber), end=' ')
print " A%d: %d" % (dataId - 0xf102, data & 0xFF) print(" A%d: %d" % (dataId - 0xf102, data & 0xFF))
def ParseBatt(packet, dataId, prim, appId, data, crc): def ParseBatt(packet, dataId, prim, appId, data, crc):
print "packet: %s (%4d)" % (dump(packet), lineNumber) , print("packet: %s (%4d)" % (dump(packet), lineNumber), end=' ')
print " Batt: %d" % (data & 0xFF) print(" Batt: %d" % (data & 0xFF))
def ParseSWR(packet, dataId, prim, appId, data, crc): def ParseSWR(packet, dataId, prim, appId, data, crc):
print "packet: %s (%4d)" % (dump(packet), lineNumber) , print("packet: %s (%4d)" % (dump(packet), lineNumber), end=' ')
print " SWR: %d" % (data & 0xFF) print(" SWR: %d" % (data & 0xFF))
def ParseAirSpeed(packet, dataId, prim, appId, data, crc): def ParseAirSpeed(packet, dataId, prim, appId, data, crc):
print "packet: %s (%4d)" % (dump(packet), lineNumber) , print "packet: %s (%4d)" % (dump(packet), lineNumber) ,
@ -77,7 +78,7 @@ def ParseSportPacket(packet):
(dataId, prim, appId, data, crc) = struct.unpack('<BBHIB', packet) (dataId, prim, appId, data, crc) = struct.unpack('<BBHIB', packet)
#print "dataId:%02x, prim:%02x, appId:%04x, data:%08x, crc:%02x)\n" % (dataId, prim, appId, data, crc) #print "dataId:%02x, prim:%02x, appId:%04x, data:%08x, crc:%02x)\n" % (dataId, prim, appId, data, crc)
if prim != DATA_FRAME: if prim != DATA_FRAME:
print "unknown prim: %02x for packet %s in line %s" % (prim, dump(packet), lineNumber) print("unknown prim: %02x for packet %s in line %s" % (prim, dump(packet), lineNumber))
#proces according to appId #proces according to appId
for (firstId, lastId, parser) in appIdParsers: for (firstId, lastId, parser) in appIdParsers:
if appId >= firstId and appId <= lastId: if appId >= firstId and appId <= lastId:
@ -85,8 +86,8 @@ def ParseSportPacket(packet):
return return
#no parser found #no parser found
if not quiet: if not quiet:
print "\tdataId:%02x, prim:%02x, appId:%04x, data:%08x, crc:%02x)" % (dataId, prim, appId, data, crc) print("\tdataId:%02x, prim:%02x, appId:%04x, data:%08x, crc:%02x)" % (dataId, prim, appId, data, crc))
print "\tparser for appId %02x not implemented" % appId print("\tparser for appId %02x not implemented" % appId)
def ParsePacket(packet): def ParsePacket(packet):
global lineNumber global lineNumber
@ -104,7 +105,7 @@ def ParsePacket(packet):
#print "buff after unstuff %s" % dump(packet, 20) #print "buff after unstuff %s" % dump(packet, 20)
else: else:
#missin data, wait for more data #missin data, wait for more data
print "unstuff missing data" print("unstuff missing data")
return return
#print "packet: %s" % dump(packet, 10) #print "packet: %s" % dump(packet, 10)
@ -113,11 +114,11 @@ def ParsePacket(packet):
#print "\npacket: %s @%d" % (dump(packet), lineNumber) #print "\npacket: %s @%d" % (dump(packet), lineNumber)
#check crc #check crc
if not CheckSportCrc(packet): if not CheckSportCrc(packet):
print "error: wrong CRC for packet %s at line %d" % (dump(packet), lineNumber) print("error: wrong CRC for packet %s at line %d" % (dump(packet), lineNumber))
ParseSportPacket(packet) ParseSportPacket(packet)
else: else:
if len(packet) > 1: if len(packet) > 1:
print "warning: wrong length %s for packet %s at line %d" % (len(packet), dump(packet, 10), lineNumber) print("warning: wrong length %s for packet %s at line %d" % (len(packet), dump(packet, 10), lineNumber))
def ParseSportData(data): def ParseSportData(data):
@ -169,7 +170,7 @@ while True:
#print line #print line
parts = line.split(': ') parts = line.split(': ')
if len(parts) < 2: if len(parts) < 2:
print "weird data: \"%s\" at line %d" % (line, lineNumber) print("weird data: \"%s\" at line %d" % (line, lineNumber))
continue continue
sportData = parts[1].strip() sportData = parts[1].strip()
# print "sd: %s" % sportData # print "sd: %s" % sportData

View file

@ -127,7 +127,7 @@ parser.add_argument("--reverse", help="Reversed char conversion (from number to
args = parser.parse_args() args = parser.parse_args()
if args.language not in translations: if args.language not in translations:
parser.error(args.language + ' is not a supported language. Try one of the supported ones: ' + str(translations.keys())) parser.error(args.language + ' is not a supported language. Try one of the supported ones: ' + str(list(translations.keys())))
system.exit() system.exit()
if args.reverse: if args.reverse:

View file

@ -26,7 +26,18 @@
# Portuguese : Romolo Manfredini # Portuguese : Romolo Manfredini
# Spanish : Romolo Manfredini (With the help of Jose Moreno) # Spanish : Romolo Manfredini (With the help of Jose Moreno)
import os, sys, shutil, platform, subprocess, wave, zipfile, httplib, urllib from __future__ import print_function
import os, sys, shutil, platform, subprocess, wave, zipfile
try:
# Python 3
from http.client import HTTPConnection
from urllib.parse import urlencode
except ImportError:
# Python 2
from httplib import HTTPConnection
from urllib import urlencode
NO_ALTERNATE = 1024 NO_ALTERNATE = 1024
@ -53,7 +64,7 @@ def wavstrip(filename):
def generate(str, filename): def generate(str, filename):
print filename, str print(filename, str)
if not str: if not str:
str = " !" #this is so blank wav files never exist! str = " !" #this is so blank wav files never exist!
@ -67,7 +78,7 @@ def generate(str, filename):
"speak not implemented with google tts engine" "speak not implemented with google tts engine"
exit() exit()
else: else:
print "which speach engine?" print("which speach engine?")
exit() exit()
else: else:
if "sapi" in sys.argv: if "sapi" in sys.argv:
@ -82,8 +93,8 @@ def generate(str, filename):
elif "google" in sys.argv: elif "google" in sys.argv:
ttsmp3 = "ttsfile.mp3" ttsmp3 = "ttsfile.mp3"
ttsfilename = "ttsfile.wav" ttsfilename = "ttsfile.wav"
conn = httplib.HTTPConnection("translate.google.com") conn = HTTPConnection("translate.google.com")
params = urllib.urlencode({'ie': "UTF-8", 'tl': directory, 'q': str.encode("utf-8")}) params = urlencode({'ie': "UTF-8", 'tl': directory, 'q': str.encode("utf-8")})
headers = {"User-Agent": "Mozilla"} headers = {"User-Agent": "Mozilla"}
conn.request("GET", u"/translate_tts?%s" % params, headers=headers) conn.request("GET", u"/translate_tts?%s" % params, headers=headers)
# conn.request("GET", "/translate_tts?ie=UTF-8&tl=%s&q=%s" % (directory, urllib.urlencode(str)), headers={"User-Agent": "Mozilla"}) # conn.request("GET", "/translate_tts?ie=UTF-8&tl=%s&q=%s" % (directory, urllib.urlencode(str)), headers={"User-Agent": "Mozilla"})
@ -93,7 +104,7 @@ def generate(str, filename):
conn.close() conn.close()
else: else:
print "which speach engine?" print("which speach engine?")
exit() exit()
wavstrip(ttsfilename) wavstrip(ttsfilename)
@ -771,7 +782,7 @@ if __name__ == "__main__":
# tts.Volume = 40 # tts.Volume = 40
# tts.SetRate(1) # tts.SetRate(1)
if "list" in sys.argv: if "list" in sys.argv:
print tts.GetVoiceNames() print(tts.GetVoiceNames())
exit() exit()
if "mulaw" in sys.argv: if "mulaw" in sys.argv:
@ -887,7 +898,7 @@ if __name__ == "__main__":
systemSounds, sounds = ttsCz() systemSounds, sounds = ttsCz()
else: else:
print "which language?" print("which language?")
exit() exit()
if "csv" in sys.argv: if "csv" in sys.argv: