Update of /cvsroot/pywin32/pywin32/com/win32comext/axdebug
In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv27962/com/win32comext/axdebug
Modified Files:
Tag: py3k
codecontainer.py
Log Message:
merge recent UnicodeType, string module and NeedUnicodeConversions changes from trunk
Index: codecontainer.py
===================================================================
RCS file: /cvsroot/pywin32/pywin32/com/win32comext/axdebug/codecontainer.py,v
retrieving revision 1.4.4.2
retrieving revision 1.4.4.3
diff -C2 -d -r1.4.4.2 -r1.4.4.3
*** codecontainer.py 27 Nov 2008 04:58:41 -0000 1.4.4.2
--- codecontainer.py 4 Dec 2008 05:08:41 -0000 1.4.4.3
***************
*** 5,23 ****
"""
! import string, sys
from win32com.axdebug import axdebug
import tokenize
! from util import RaiseNotImpl, _wrap
from win32com.server.exception import Exception
import win32api, winerror
! import contexts
_keywords = {} # set of Python keywords
! for name in string.split("""
and assert break class continue def del elif else except exec
finally for from global if import in is lambda not
or pass print raise return try while
! """):
_keywords[name] = 1
--- 5,23 ----
"""
! import sys
from win32com.axdebug import axdebug
import tokenize
! from .util import RaiseNotImpl, _wrap
from win32com.server.exception import Exception
import win32api, winerror
! from . import contexts
_keywords = {} # set of Python keywords
! for name in """
and assert break class continue def del elif else except exec
finally for from global if import in is lambda not
or pass print raise return try while
! """.split():
_keywords[name] = 1
***************
*** 89,93 ****
def _buildline(self, pos):
! i = string.find(self.text, '\n', pos)
if i < 0:
newpos = len(self.text)
--- 89,93 ----
def _buildline(self, pos):
! i = self.text.find('\n', pos)
if i < 0:
newpos = len(self.text)
***************
*** 124,128 ****
if type==tokenize.NAME:
! if _keywords.has_key(token):
attr = axdebug.SOURCETEXT_ATTR_KEYWORD
elif type==tokenize.STRING:
--- 124,128 ----
if type==tokenize.NAME:
! if token in _keywords:
attr = axdebug.SOURCETEXT_ATTR_KEYWORD
elif type==tokenize.STRING:
***************
*** 221,225 ****
fname = name
if dnt==axdebug.DOCUMENTNAMETYPE_APPNODE:
! return string.split(name, ".")[-1]
elif dnt==axdebug.DOCUMENTNAMETYPE_TITLE:
return fname
--- 221,225 ----
fname = name
if dnt==axdebug.DOCUMENTNAMETYPE_APPNODE:
! return name.split(".")[-1]
elif dnt==axdebug.DOCUMENTNAMETYPE_TITLE:
return fname
|