Update of /cvsroot/pywin32/pywin32/com/win32comext/axscript/test
In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv13317/axscript/test
Modified Files:
testHost.py
Log Message:
Syntax modernizations for use with py3k
Index: testHost.py
===================================================================
RCS file: /cvsroot/pywin32/pywin32/com/win32comext/axscript/test/testHost.py,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** testHost.py 7 May 2007 02:27:44 -0000 1.5
--- testHost.py 26 Nov 2008 01:14:40 -0000 1.6
***************
*** 1,7 ****
! import string, sys
from win32com.axscript.server.error import Exception
from win32com.axscript import axscript
from win32com.axscript.server import axsite
- import pythoncom
from win32com.server import util, connect
import win32com.server.policy
--- 1,7 ----
! import sys
! import pythoncom
from win32com.axscript.server.error import Exception
from win32com.axscript import axscript
from win32com.axscript.server import axsite
from win32com.server import util, connect
import win32com.server.policy
***************
*** 31,35 ****
if st is None: st = ""
text = st + "\n" + (" " * (char-1)) + "^" + "\n" + exc[2]
! for line in string.split(text,"\n"):
print " >" + line
--- 31,35 ----
if st is None: st = ""
text = st + "\n" + (" " * (char-1)) + "^" + "\n" + exc[2]
! for line in text.splitlines():
print " >" + line
***************
*** 49,53 ****
def echo(self, *args):
! self.last = string.join(map(str, args))
if self.verbose:
for arg in args:
--- 49,53 ----
def echo(self, *args):
! self.last = "".join([str(s) for s in args])
if self.verbose:
for arg in args:
***************
*** 125,131 ****
"""
PyScript_Exc = u"""\
def hello(arg1):
! raise RuntimeError, "exc with extended \xa9har"
"""
--- 125,134 ----
"""
+ # XXX - needs py3k work! Throwing a bytes string with an extended char
+ # doesn't make much sense, but py2x allows it. What it gets upset with
+ # is a real unicode arg - which is the only thing py3k allows!
PyScript_Exc = u"""\
def hello(arg1):
! raise RuntimeError("exc with extended \xa9har")
"""
|