Update of /cvsroot/pywin32/pywin32/win32/scripts
In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv27962/win32/scripts
Modified Files:
Tag: py3k
rasutil.py regsetup.py
Log Message:
merge recent UnicodeType, string module and NeedUnicodeConversions changes from trunk
Index: regsetup.py
===================================================================
RCS file: /cvsroot/pywin32/pywin32/win32/scripts/regsetup.py,v
retrieving revision 1.15.2.2
retrieving revision 1.15.2.3
diff -C2 -d -r1.15.2.2 -r1.15.2.3
*** regsetup.py 27 Nov 2008 04:58:42 -0000 1.15.2.2
--- regsetup.py 4 Dec 2008 05:08:41 -0000 1.15.2.3
***************
*** 90,94 ****
regPath = regutil.GetRegisteredNamedPath(appName)
if regPath:
! pathLook = string.split(regPath,";")[0]
if regPath and FileExists(os.path.join(pathLook, knownFileName)):
return None # The currently registered one is good.
--- 90,94 ----
regPath = regutil.GetRegisteredNamedPath(appName)
if regPath:
! pathLook = regPath.split(";")[0]
if regPath and FileExists(os.path.join(pathLook, knownFileName)):
return None # The currently registered one is good.
***************
*** 130,134 ****
import regutil, string
try:
! string.index(fname, " ") # Other chars forcing quote?
return '"%s"' % fname
except ValueError:
--- 130,134 ----
import regutil, string
try:
! fname.index(" ") # Other chars forcing quote?
return '"%s"' % fname
except ValueError:
***************
*** 145,149 ****
"""
import regutil, string, os
! fileNames = string.split(fileNamesString,";")
for path in searchPaths:
for fileName in fileNames:
--- 145,149 ----
"""
import regutil, string, os
! fileNames = fileNamesString.split(";")
for path in searchPaths:
for fileName in fileNames:
***************
*** 201,208 ****
the Python path.
"""
! import string, os, regutil
currentPath = regutil.GetRegisteredNamedPath(None)
if currentPath:
! presearchPaths = string.split(currentPath, ";")
else:
presearchPaths = [os.path.abspath(".")]
--- 201,208 ----
the Python path.
"""
! import os, regutil
currentPath = regutil.GetRegisteredNamedPath(None)
if currentPath:
! presearchPaths = currentPath.split(";")
else:
presearchPaths = [os.path.abspath(".")]
***************
*** 243,247 ****
import regutil, string
if not packageName: raise error("A package name must be supplied")
! corePaths = string.split(regutil.GetRegisteredNamedPath(None),";")
if not searchPaths: searchPaths = corePaths
registryAppName = registryAppName or packageName
--- 243,247 ----
import regutil, string
if not packageName: raise error("A package name must be supplied")
! corePaths = regutil.GetRegisteredNamedPath(None).split(";")
if not searchPaths: searchPaths = corePaths
registryAppName = registryAppName or packageName
***************
*** 279,283 ****
return
! regutil.RegisterNamedPath(appName, string.join(paths,";"))
def FindRegisterPythonExe(exeAlias, searchPaths, actualFileNames = None):
--- 279,283 ----
return
! regutil.RegisterNamedPath(appName, ";".join(paths))
def FindRegisterPythonExe(exeAlias, searchPaths, actualFileNames = None):
***************
*** 317,321 ****
sys.path.append(path)
! import string, os
import regutil, win32api,win32con
--- 317,321 ----
sys.path.append(path)
! import os
import regutil, win32api,win32con
***************
*** 323,327 ****
# Register the core Pythonpath.
print(corePaths)
! regutil.RegisterNamedPath(None, string.join(corePaths,";"))
# Register the install path.
--- 323,327 ----
# Register the core Pythonpath.
print(corePaths)
! regutil.RegisterNamedPath(None, ';'.join(corePaths))
# Register the install path.
***************
*** 493,497 ****
if o=='-a':
import regutil
! path = string.join(searchPaths,";")
print("Registering application", a,"to path",path)
regutil.RegisterNamedPath(a,path)
--- 493,497 ----
if o=='-a':
import regutil
! path = ";".join(searchPaths)
print("Registering application", a,"to path",path)
regutil.RegisterNamedPath(a,path)
***************
*** 500,504 ****
raise error("-c option must provide at least one additional path")
import win32api, regutil
! currentPaths = string.split(regutil.GetRegisteredNamedPath(None),";")
oldLen = len(currentPaths)
for newPath in searchPaths:
--- 500,504 ----
raise error("-c option must provide at least one additional path")
import win32api, regutil
! currentPaths = regutil.GetRegisteredNamedPath(None).split(";")
oldLen = len(currentPaths)
for newPath in searchPaths:
***************
*** 507,511 ****
if len(currentPaths)!=oldLen:
print("Registering %d new core paths" % (len(currentPaths)-oldLen))
! regutil.RegisterNamedPath(None,string.join(currentPaths,";"))
else:
print("All specified paths are already registered.")
--- 507,511 ----
if len(currentPaths)!=oldLen:
print("Registering %d new core paths" % (len(currentPaths)-oldLen))
! regutil.RegisterNamedPath(None,";".join(currentPaths))
else:
print("All specified paths are already registered.")
Index: rasutil.py
===================================================================
RCS file: /cvsroot/pywin32/pywin32/win32/scripts/rasutil.py,v
retrieving revision 1.2.4.2
retrieving revision 1.2.4.3
diff -C2 -d -r1.2.4.2 -r1.2.4.3
*** rasutil.py 27 Nov 2008 04:58:42 -0000 1.2.4.2
--- rasutil.py 4 Dec 2008 05:08:41 -0000 1.2.4.3
***************
*** 1,5 ****
# A demo of using the RAS API from Python
import sys
- import string
import win32ras
--- 1,4 ----
***************
*** 19,23 ****
assert numRetries > 0
for info in win32ras.EnumConnections():
! if string.lower(info[1])==string.lower(rasEntryName):
print("Already connected to", rasEntryName)
return 0, info[0]
--- 18,22 ----
assert numRetries > 0
for info in win32ras.EnumConnections():
! if info[1].lower()==rasEntryName.lower():
print("Already connected to", rasEntryName)
return 0, info[0]
***************
*** 47,51 ****
if type(handle)==type(''): # have they passed a connection name?
for info in win32ras.EnumConnections():
! if string.lower(info[1])==string.lower(handle):
handle = info[0]
break
--- 46,50 ----
if type(handle)==type(''): # have they passed a connection name?
for info in win32ras.EnumConnections():
! if info[1].lower()==handle.lower():
handle = info[0]
break
|