Changed all strings to unicodestrings

This commit is contained in:
Jorgen Stenarson
2008-11-11 20:22:45 +01:00
parent 7f2793a4b3
commit 2cda7c0863
31 changed files with 2683 additions and 2678 deletions
+12 -12
View File
@@ -15,11 +15,11 @@ try:
import msvcrt
except ImportError:
msvcrt=None
print "problem"
print u"problem"
port=logging.handlers.DEFAULT_TCP_LOGGING_PORT
host='localhost'
host=u'localhost'
def check_key():
if msvcrt is None:
@@ -28,18 +28,18 @@ def check_key():
if msvcrt.kbhit()!=0:
q=msvcrt.getch()
return q
return ""
return u""
singleline=False
def main():
print "Starting TCP logserver on port:",port
print "Press q to quit logserver", port
print "Press c to clear screen", port
print u"Starting TCP logserver on port:",port
print u"Press q to quit logserver", port
print u"Press c to clear screen", port
s=socket.socket(socket.AF_INET,socket.SOCK_DGRAM)
s.bind(("",port))
s.bind((u"",port))
s.settimeout(1)
while 1:
try:
@@ -47,11 +47,11 @@ def main():
print data,
except socket.timeout:
key=check_key().lower()
if "q"==key:
print "Quitting logserver"
if u"q"==key:
print u"Quitting logserver"
break
elif "c" == key:
print "\n"*100
elif u"c" == key:
print u"\n"*100
if __name__ == "__main__":
if __name__ == u"__main__":
main()