pywin32-checkins Mailing List for Python for Windows Extensions (Page 145)
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
You can subscribe to this list here.
| 2003 |
Jan
|
Feb
|
Mar
|
Apr
(2) |
May
(1) |
Jun
(6) |
Jul
(50) |
Aug
(11) |
Sep
(24) |
Oct
(184) |
Nov
(118) |
Dec
(22) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2004 |
Jan
(31) |
Feb
(25) |
Mar
(34) |
Apr
(105) |
May
(49) |
Jun
(38) |
Jul
(39) |
Aug
(7) |
Sep
(98) |
Oct
(79) |
Nov
(20) |
Dec
(17) |
| 2005 |
Jan
(66) |
Feb
(32) |
Mar
(43) |
Apr
(30) |
May
(58) |
Jun
(30) |
Jul
(16) |
Aug
(4) |
Sep
(21) |
Oct
(42) |
Nov
(11) |
Dec
(14) |
| 2006 |
Jan
(42) |
Feb
(30) |
Mar
(22) |
Apr
(1) |
May
(9) |
Jun
(15) |
Jul
(20) |
Aug
(9) |
Sep
(8) |
Oct
(1) |
Nov
(9) |
Dec
(43) |
| 2007 |
Jan
(52) |
Feb
(45) |
Mar
(20) |
Apr
(12) |
May
(59) |
Jun
(39) |
Jul
(35) |
Aug
(31) |
Sep
(17) |
Oct
(20) |
Nov
(4) |
Dec
(4) |
| 2008 |
Jan
(28) |
Feb
(111) |
Mar
(4) |
Apr
(27) |
May
(40) |
Jun
(27) |
Jul
(32) |
Aug
(94) |
Sep
(87) |
Oct
(153) |
Nov
(336) |
Dec
(331) |
| 2009 |
Jan
(298) |
Feb
(127) |
Mar
(20) |
Apr
(8) |
May
|
Jun
(10) |
Jul
(6) |
Aug
|
Sep
(2) |
Oct
(2) |
Nov
|
Dec
(1) |
| 2010 |
Jan
(7) |
Feb
(1) |
Mar
|
Apr
|
May
(15) |
Jun
(4) |
Jul
(3) |
Aug
(28) |
Sep
(1) |
Oct
(19) |
Nov
(16) |
Dec
(6) |
| 2011 |
Jan
(2) |
Feb
(18) |
Mar
(17) |
Apr
(12) |
May
(5) |
Jun
(11) |
Jul
(7) |
Aug
(2) |
Sep
(2) |
Oct
(4) |
Nov
(4) |
Dec
|
| 2012 |
Jan
(6) |
Feb
(2) |
Mar
|
Apr
(8) |
May
(4) |
Jun
(3) |
Jul
(13) |
Aug
(27) |
Sep
(8) |
Oct
(9) |
Nov
(3) |
Dec
(2) |
| 2013 |
Jan
|
Feb
(1) |
Mar
(5) |
Apr
(10) |
May
|
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
(9) |
| 2014 |
Jan
(2) |
Feb
(4) |
Mar
(4) |
Apr
(1) |
May
(4) |
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
|
Dec
(1) |
| 2015 |
Jan
(1) |
Feb
|
Mar
|
Apr
(6) |
May
(2) |
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
| 2016 |
Jan
(3) |
Feb
(2) |
Mar
|
Apr
(3) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2017 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
|
From: <mha...@us...> - 2003-11-11 07:32:09
|
Update of /cvsroot/pywin32/pywin32
In directory sc8-pr-cvs1:/tmp/cvs-serv27143
Modified Files:
setup_win32all_core.py
Log Message:
Merge Thomas's hacks for EXE building in.
Index: setup_win32all_core.py
===================================================================
RCS file: /cvsroot/pywin32/pywin32/setup_win32all_core.py,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** setup_win32all_core.py 10 Nov 2003 23:54:00 -0000 1.14
--- setup_win32all_core.py 11 Nov 2003 07:32:05 -0000 1.15
***************
*** 81,85 ****
fields = line.strip().split("=", 2)
if fields[0]=="SOURCE":
! if os.path.splitext(fields[1])[1].lower() in ['.cpp', '.c', '.i', '.mc']:
pathname = os.path.normpath(os.path.join(dsp_path, fields[1]))
result.append(pathname)
--- 81,85 ----
fields = line.strip().split("=", 2)
if fields[0]=="SOURCE":
! if os.path.splitext(fields[1])[1].lower() in ['.cpp', '.c', '.i', '.rc', '.mc']:
pathname = os.path.normpath(os.path.join(dsp_path, fields[1]))
result.append(pathname)
***************
*** 165,169 ****
# Maybe I should just rename the file, but a case-only rename is likely to be
# worse!
- import distutils.msvccompiler
if ".CPP" not in self.compiler.src_extensions:
self.compiler._cpp_extensions.append(".CPP")
--- 165,168 ----
***************
*** 186,189 ****
--- 185,295 ----
self.build_extension(ext)
+ for ext in W32_exe_files:
+ try:
+ self.package = ext.get_pywin32_dir()
+ except AttributeError:
+ raise RuntimeError, "Not a win32 package!"
+ self.build_exefile(ext)
+
+ def build_exefile(self, ext):
+ from types import ListType, TupleType
+ sources = ext.sources
+ if sources is None or type(sources) not in (ListType, TupleType):
+ raise DistutilsSetupError, \
+ ("in 'ext_modules' option (extension '%s'), " +
+ "'sources' must be present and must be " +
+ "a list of source filenames") % ext.name
+ sources = list(sources)
+
+ print "building exe %s" % ext.name
+
+ fullname = self.get_ext_fullname(ext.name)
+ if self.inplace:
+ # ignore build-lib -- put the compiled extension into
+ # the source tree along with pure Python modules
+
+ modpath = string.split(fullname, '.')
+ package = string.join(modpath[0:-1], '.')
+ base = modpath[-1]
+
+ build_py = self.get_finalized_command('build_py')
+ package_dir = build_py.get_package_dir(package)
+ ext_filename = os.path.join(package_dir,
+ self.get_ext_filename(base))
+ else:
+ ext_filename = os.path.join(self.build_lib,
+ self.get_ext_filename(fullname))
+ depends = sources + ext.depends
+ if not (self.force or newer_group(depends, ext_filename, 'newer')):
+ log.debug("skipping '%s' executable (up-to-date)", ext.name)
+ return
+ else:
+ log.info("building '%s' executable", ext.name)
+
+ # First, scan the sources for SWIG definition files (.i), run
+ # SWIG on 'em to create .c files, and modify the sources list
+ # accordingly.
+ sources = self.swig_sources(sources)
+
+ # Next, compile the source code to object files.
+
+ # XXX not honouring 'define_macros' or 'undef_macros' -- the
+ # CCompiler API needs to change to accommodate this, and I
+ # want to do one thing at a time!
+
+ # Two possible sources for extra compiler arguments:
+ # - 'extra_compile_args' in Extension object
+ # - CFLAGS environment variable (not particularly
+ # elegant, but people seem to expect it and I
+ # guess it's useful)
+ # The environment variable should take precedence, and
+ # any sensible compiler will give precedence to later
+ # command line args. Hence we combine them in order:
+ extra_args = ext.extra_compile_args or []
+
+ macros = ext.define_macros[:]
+ for undef in ext.undef_macros:
+ macros.append((undef,))
+
+ objects = self.compiler.compile(sources,
+ output_dir=self.build_temp,
+ macros=macros,
+ include_dirs=ext.include_dirs,
+ debug=self.debug,
+ extra_postargs=extra_args,
+ depends=ext.depends)
+
+ # XXX -- this is a Vile HACK!
+ #
+ # The setup.py script for Python on Unix needs to be able to
+ # get this list so it can perform all the clean up needed to
+ # avoid keeping object files around when cleaning out a failed
+ # build of an extension module. Since Distutils does not
+ # track dependencies, we have to get rid of intermediates to
+ # ensure all the intermediates will be properly re-built.
+ #
+ self._built_objects = objects[:]
+
+ # Now link the object files together into a "shared object" --
+ # of course, first we have to figure out all the other things
+ # that go into the mix.
+ if ext.extra_objects:
+ objects.extend(ext.extra_objects)
+ extra_args = ext.extra_link_args or []
+
+ # Detect target language, if not provided
+ language = ext.language or self.compiler.detect_language(sources)
+
+ self.compiler.link(
+ "executable",
+ objects, ext_filename,
+ libraries=self.get_libraries(ext),
+ library_dirs=ext.library_dirs,
+ runtime_library_dirs=ext.runtime_library_dirs,
+ extra_postargs=extra_args,
+ debug=self.debug,
+ build_temp=self.build_temp,
+ target_lang=language)
+
def build_extension(self, ext):
# It is well known that some of these extensions are difficult to
***************
*** 242,246 ****
return r"system32\pythoncom%d%d%s" % (sys.version_info[0], sys.version_info[1], extra)
elif name.endswith("win32.perfmondata"):
! return r"win32\perfmondata.dll"
return build_ext.get_ext_filename(self, name)
--- 348,359 ----
return r"system32\pythoncom%d%d%s" % (sys.version_info[0], sys.version_info[1], extra)
elif name.endswith("win32.perfmondata"):
! extra = self.debug and "_d.dll" or ".dll"
! return r"win32\perfmondata" + extra
! elif name.endswith("win32.win32popenWin9x"):
! extra = self.debug and "_d.exe" or ".exe"
! return r"win32\win32popenWin9x" + extra
! elif name.endswith("pythonwin.Pythonwin"):
! extra = self.debug and "_d.exe" or ".exe"
! return r"pythonwin\Pythonwin" + extra
return build_ext.get_ext_filename(self, name)
***************
*** 402,405 ****
--- 515,524 ----
]
+ W32_exe_files = [
+ WinExt_win32("win32popenWin9x",
+ libraries = "user32"),
+ WinExt_pythonwin("Pythonwin"),
+ ## extra_compile_args = ['-D_WINDOWS', '-D_AFXDLL', '-D_MBCS']),
+ ]
################################################################
|
|
From: <mha...@us...> - 2003-11-10 23:54:05
|
Update of /cvsroot/pywin32/pywin32
In directory sc8-pr-cvs1:/tmp/cvs-serv19994
Modified Files:
setup_win32all_core.py
Log Message:
Try and locate the libraries we need, and elegantly skip building
extensions that require libraries that aren't installed, reporting
a summary of skipped extensions at the end.
Index: setup_win32all_core.py
===================================================================
RCS file: /cvsroot/pywin32/pywin32/setup_win32all_core.py,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** setup_win32all_core.py 10 Nov 2003 21:24:37 -0000 1.13
--- setup_win32all_core.py 10 Nov 2003 23:54:00 -0000 1.14
***************
*** 146,149 ****
--- 146,163 ----
self.libraries.append("stdc++")
+ def _why_cant_build_extension(self, ext):
+ # Return None, or a reason it can't be built.
+ common_dirs = self.compiler.library_dirs
+ common_dirs += os.environ.get("LIB").split(os.pathsep)
+ for lib in ext.libraries:
+ if self.found_libraries.has_key(lib.lower()):
+ continue
+ for dir in common_dirs + ext.library_dirs:
+ if os.path.isfile(os.path.join(dir, lib + ".lib")):
+ self.found_libraries[lib.lower()] = True
+ break
+ else:
+ return "No library '%s'" % lib
+
def build_extensions(self):
# Is there a better way than this?
***************
*** 155,158 ****
--- 169,181 ----
self.compiler._cpp_extensions.append(".CPP")
self.compiler.src_extensions.append(".CPP")
+
+ # First, sanity-check the 'extensions' list
+ self.check_extensions_list(self.extensions)
+
+ self.found_libraries = {}
+ self.excluded_extensions = [] # list of (ext, why)
+
+ # Here we hack a "pywin32" directory into the mix. Distutils
+ # doesn't seem to like the concept of multiple top-level directories.
assert self.package is None
for ext in self.extensions:
***************
*** 164,167 ****
--- 187,204 ----
def build_extension(self, ext):
+ # It is well known that some of these extensions are difficult to
+ # build, requiring various hard-to-track libraries etc. So we
+ # check the extension list for the extra libraries explicitly
+ # listed. We then search for this library the same way the C
+ # compiler would - if we can't find a library, we exclude the
+ # extension from the build.
+ # Note we can't do this in advance, as some of the .lib files
+ # we depend on may be built as part of the process - thus we can
+ # only check an extension's lib files as we are building it.
+ why = self._why_cant_build_extension(ext)
+ if why is not None:
+ self.excluded_extensions.append((ext, why))
+ return
+
# some source files are compiled for different extensions
# with special defines. So we cannot use a shared
***************
*** 333,337 ****
com_extensions = [pythoncom]
com_extensions += [
! ### WinExt_win32com('adsi', libraries="ACTIVEDS ADSIID"),
WinExt_win32com('axcontrol'),
WinExt_win32com('axscript',
--- 370,374 ----
com_extensions = [pythoncom]
com_extensions += [
! WinExt_win32com('adsi', libraries="ACTIVEDS ADSIID"),
WinExt_win32com('axcontrol'),
WinExt_win32com('axscript',
***************
*** 339,357 ****
extra_compile_args = ['-DPY_BUILD_AXSCRIPT'],
),
! ### WinExt_win32com('axdebug',
! ### dsp_file=r"com\Active Debugging.dsp",
! ### libraries="axscript msdbg",
! ### ),
WinExt_win32com('internet'),
! ### WinExt_win32com('mapi', libraries="mapi32"),
! ### WinExt_win32com_mapi('exchange',
! ### libraries="""MBLOGON ADDRLKUP mapi32 exchinst
! ### EDKCFG EDKUTILS EDKMAPI
! ### ACLCLS version""",
! ### extra_link_args=["/nodefaultlib:libc"]),
! ### WinExt_win32com_mapi('exchdapi',
! ### libraries="""DAPI ADDRLKUP exchinst EDKCFG EDKUTILS
! ### EDKMAPI mapi32 version""",
! ### extra_link_args=["/nodefaultlib:libc"]),
WinExt_win32com('shell', libraries='shell32')
]
--- 376,394 ----
extra_compile_args = ['-DPY_BUILD_AXSCRIPT'],
),
! WinExt_win32com('axdebug',
! dsp_file=r"com\Active Debugging.dsp",
! libraries="axscript msdbg",
! ),
WinExt_win32com('internet'),
! WinExt_win32com('mapi', libraries="mapi32"),
! WinExt_win32com_mapi('exchange',
! libraries="""MBLOGON ADDRLKUP mapi32 exchinst
! EDKCFG EDKUTILS EDKMAPI
! ACLCLS version""",
! extra_link_args=["/nodefaultlib:libc"]),
! WinExt_win32com_mapi('exchdapi',
! libraries="""DAPI ADDRLKUP exchinst EDKCFG EDKUTILS
! EDKMAPI mapi32 version""",
! extra_link_args=["/nodefaultlib:libc"]),
WinExt_win32com('shell', libraries='shell32')
]
***************
*** 361,365 ****
extra_compile_args =
['-DBUILD_PYW']),
! ### WinExt_pythonwin("win32uiole"),
WinExt_pythonwin("dde"),
]
--- 398,402 ----
extra_compile_args =
['-DBUILD_PYW']),
! WinExt_pythonwin("win32uiole"),
WinExt_pythonwin("dde"),
]
***************
*** 367,371 ****
################################################################
! setup(name="pywin32",
version="version",
description="Python for Window Extensions",
--- 404,408 ----
################################################################
! dist = setup(name="pywin32",
version="version",
description="Python for Window Extensions",
***************
*** 426,427 ****
--- 463,474 ----
],
)
+ # If we did any extension building...
+ if dist.command_obj.has_key('build_ext'):
+ # Print the list of extension modules we skipped building.
+ excluded_extensions = dist.command_obj['build_ext'].excluded_extensions
+ if excluded_extensions:
+ print "*** NOTE: The following extensions were NOT built:"
+ for ext, why in excluded_extensions:
+ print " %s: %s" % (ext.name, why)
+ else:
+ print "All extension modules built OK"
|
|
From: <th...@us...> - 2003-11-10 21:24:41
|
Update of /cvsroot/pywin32/pywin32
In directory sc8-pr-cvs1:/tmp/cvs-serv20810
Modified Files:
setup_win32all_core.py
Log Message:
Note that I commented out everything which does not build for me.
Propably because I don't have mapi installed, no active debug header files
and other things like this.
Real changes:
parse_dsp_file() must also look for .mc source files.
It's better to use raw strings with backslashes.
Made perfmondata.dll build - a dll is the same as a python extension
module except that there's no init<modname> exported symbol, and the
file extension is .dll instead of .pyd.
Uncomment the list of python packages. Some of them are not packages
(no __init__.py file) so we get some warnings when building/installing.
Using the pywin32_postinstall.py script for bdist_wininst I can now
create a binary installer.
Notes:
There are some .def files in the sources which are not yet used.
Probably it would be best to find them with parse_dsp_file(), and use
their contents as exported_symbols list.
Index: setup_win32all_core.py
===================================================================
RCS file: /cvsroot/pywin32/pywin32/setup_win32all_core.py,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** setup_win32all_core.py 10 Nov 2003 10:40:20 -0000 1.12
--- setup_win32all_core.py 10 Nov 2003 21:24:37 -0000 1.13
***************
*** 81,85 ****
fields = line.strip().split("=", 2)
if fields[0]=="SOURCE":
! if os.path.splitext(fields[1])[1].lower() in ['.cpp', '.c', '.i']:
pathname = os.path.normpath(os.path.join(dsp_path, fields[1]))
result.append(pathname)
--- 81,85 ----
fields = line.strip().split("=", 2)
if fields[0]=="SOURCE":
! if os.path.splitext(fields[1])[1].lower() in ['.cpp', '.c', '.i', '.mc']:
pathname = os.path.normpath(os.path.join(dsp_path, fields[1]))
result.append(pathname)
***************
*** 200,209 ****
if name == "system32.pywintypes":
extra = self.debug and "_d.dll" or ".dll"
! return "system32\pywintypes%d%d%s" % (sys.version_info[0], sys.version_info[1], extra)
elif name == "system32.pythoncom":
extra = self.debug and "_d.dll" or ".dll"
! return "system32\pythoncom%d%d%s" % (sys.version_info[0], sys.version_info[1], extra)
return build_ext.get_ext_filename(self, name)
def find_swig (self):
# We know where swig is
--- 200,216 ----
if name == "system32.pywintypes":
extra = self.debug and "_d.dll" or ".dll"
! return r"system32\pywintypes%d%d%s" % (sys.version_info[0], sys.version_info[1], extra)
elif name == "system32.pythoncom":
extra = self.debug and "_d.dll" or ".dll"
! return r"system32\pythoncom%d%d%s" % (sys.version_info[0], sys.version_info[1], extra)
! elif name.endswith("win32.perfmondata"):
! return r"win32\perfmondata.dll"
return build_ext.get_ext_filename(self, name)
+ def get_export_symbols(self, ext):
+ if ext.name.endswith("perfmondata"):
+ return ext.export_symbols
+ return build_ext.get_export_symbols(self, ext)
+
def find_swig (self):
# We know where swig is
***************
*** 260,263 ****
--- 267,278 ----
win32_extensions = [pywintypes]
+ win32_extensions.append(
+ WinExt_win32("perfmondata",
+ libraries="advapi32",
+ extra_compile_args=["-DUNICODE", "-D_UNICODE", "-DWINNT"],
+ export_symbol_file = "win32/src/PerfMon/perfmondata.def",
+ ),
+ )
+
for name, lib_names, is_unicode in (
("dbi", "", False),
***************
*** 295,298 ****
--- 310,314 ----
extra_compile_args = extra_compile_args)
win32_extensions.append(ext)
+
# The few that need slightly special treatment
win32_extensions += [
***************
*** 317,321 ****
com_extensions = [pythoncom]
com_extensions += [
! WinExt_win32com('adsi', libraries="ACTIVEDS ADSIID"),
WinExt_win32com('axcontrol'),
WinExt_win32com('axscript',
--- 333,337 ----
com_extensions = [pythoncom]
com_extensions += [
! ### WinExt_win32com('adsi', libraries="ACTIVEDS ADSIID"),
WinExt_win32com('axcontrol'),
WinExt_win32com('axscript',
***************
*** 323,341 ****
extra_compile_args = ['-DPY_BUILD_AXSCRIPT'],
),
! WinExt_win32com('axdebug',
! dsp_file=r"com\Active Debugging.dsp",
! libraries="axscript msdbg",
! ),
WinExt_win32com('internet'),
! WinExt_win32com('mapi', libraries="mapi32"),
! WinExt_win32com_mapi('exchange',
! libraries="""MBLOGON ADDRLKUP mapi32 exchinst
! EDKCFG EDKUTILS EDKMAPI
! ACLCLS version""",
! extra_link_args=["/nodefaultlib:libc"]),
! WinExt_win32com_mapi('exchdapi',
! libraries="""DAPI ADDRLKUP exchinst EDKCFG EDKUTILS
! EDKMAPI mapi32 version""",
! extra_link_args=["/nodefaultlib:libc"]),
WinExt_win32com('shell', libraries='shell32')
]
--- 339,357 ----
extra_compile_args = ['-DPY_BUILD_AXSCRIPT'],
),
! ### WinExt_win32com('axdebug',
! ### dsp_file=r"com\Active Debugging.dsp",
! ### libraries="axscript msdbg",
! ### ),
WinExt_win32com('internet'),
! ### WinExt_win32com('mapi', libraries="mapi32"),
! ### WinExt_win32com_mapi('exchange',
! ### libraries="""MBLOGON ADDRLKUP mapi32 exchinst
! ### EDKCFG EDKUTILS EDKMAPI
! ### ACLCLS version""",
! ### extra_link_args=["/nodefaultlib:libc"]),
! ### WinExt_win32com_mapi('exchdapi',
! ### libraries="""DAPI ADDRLKUP exchinst EDKCFG EDKUTILS
! ### EDKMAPI mapi32 version""",
! ### extra_link_args=["/nodefaultlib:libc"]),
WinExt_win32com('shell', libraries='shell32')
]
***************
*** 345,351 ****
extra_compile_args =
['-DBUILD_PYW']),
! WinExt_pythonwin("win32uiole"),
WinExt_pythonwin("dde"),
]
################################################################
--- 361,368 ----
extra_compile_args =
['-DBUILD_PYW']),
! ### WinExt_pythonwin("win32uiole"),
WinExt_pythonwin("dde"),
]
+
################################################################
***************
*** 361,403 ****
'build_ext': my_build_ext,
},
!
ext_modules = win32_extensions + com_extensions + pythonwin_extensions,
! ## packages=['win32',
!
! ## 'win32com',
! ## 'win32com.client',
! ## 'win32com.demos',
! ## 'win32com.makegw',
! ## 'win32com.server',
! ## 'win32com.servers',
! ## 'win32com.test',
! ## 'win32comext.axscript',
! ## 'win32comext.axscript.client',
! ## 'win32comext.axscript.server',
! ## 'win32comext.axscript.demos', # XXX not a package
! ## 'win32comext.axscript.demos.client',
! ## 'win32comext.axscript.demos.client.asp',
! ## 'win32comext.axscript.demos.client.ie',
! ## 'win32comext.axscript.demos.client.wsh',
! ## 'win32comext.axscript.test', # XXX not a package
! ## 'win32comext.axdebug',
! ## 'win32comext.axscript',
! ## 'win32comext.axscript.client',
! ## 'win32comext.axscript.server',
! ## 'pywin',
! ## 'pywin.debugger',
! ## 'pywin.dialogs',
! ## 'pywin.docking',
! ## 'pywin.framework',
! ## 'pywin.framework.editor',
! ## 'pywin.framework.editor.color',
! ## 'pywin.idle',
! ## 'pywin.mfc',
! ## 'pywin.scintilla',
! ## 'pywin.tools',
! ## ],
)
--- 378,427 ----
'build_ext': my_build_ext,
},
! options = {"bdist_wininst": {"install_script": "pywin32_postinstall.py"}},
!
! scripts = ["pywin32_postinstall.py"],
!
ext_modules = win32_extensions + com_extensions + pythonwin_extensions,
! package_dir = {"win32": "win32/lib",
! "win32com": "com/win32com",
! "win32comext": "com/win32comext",
! "Pythonwin": "Pythonwin/pywin"},
! packages=['win32',
! 'win32com',
! 'win32com.client',
! 'win32com.demos',
! 'win32com.makegw',
! 'win32com.server',
! 'win32com.servers',
! 'win32com.test',
! 'win32comext.axscript',
! 'win32comext.axscript.client',
! 'win32comext.axscript.server',
! 'win32comext.axscript.demos', # XXX not a package
! 'win32comext.axscript.demos.client',
! 'win32comext.axscript.demos.client.asp',
! 'win32comext.axscript.demos.client.ie',
! 'win32comext.axscript.demos.client.wsh',
! 'win32comext.axscript.test', # XXX not a package
! 'win32comext.axdebug',
! 'win32comext.axscript',
! 'win32comext.axscript.client',
! 'win32comext.axscript.server',
!
! 'Pythonwin',
! 'Pythonwin.debugger',
! 'Pythonwin.dialogs',
! 'Pythonwin.docking',
! 'Pythonwin.framework',
! 'Pythonwin.framework.editor',
! 'Pythonwin.framework.editor.color',
! 'Pythonwin.idle',
! 'Pythonwin.mfc',
! 'Pythonwin.scintilla',
! 'Pythonwin.tools',
! ],
)
|
|
From: <th...@us...> - 2003-11-10 20:47:22
|
Update of /cvsroot/pywin32/pywin32
In directory sc8-pr-cvs1:/tmp/cvs-serv13472
Added Files:
pywin32_postinstall.py
Log Message:
A post install script for bdist_wininst, which:
- creates a pywin32.pth file containing the paths
- copies pywintypesxx.dll and pythoncomxx.dll into the system
directory
- registers all the above files with bdist_wininst's uninstaller, so
that they are removed when pywin32 is uninstalled.
I'm not sure if it's correct to remove the files in the system dir,
the WISE installer seems to leave them.
--- NEW FILE: pywin32_postinstall.py ---
# postinstall script for pywin32
#
# copies PyWinTypesxx.dll and PythonCOMxx.dll into the system directory,
# and creates a pth file
import os, sys, glob, shutil
if sys.argv[1] == "-install":
import distutils.sysconfig
lib_dir = distutils.sysconfig.get_python_lib(plat_specific=1)
fname = os.path.join(sys.prefix, "pywin32.pth")
print "Creating PTH FILE %s" % fname
pthfile = open(fname, "w")
# Register the file with the uninstaller
file_created(fname)
for name in "win32 win32com Pythonwin".split():
# Create entries for the PTH file, and at the same time
# add the directory to sys.path so we can load win32api below.
path = os.path.join(lib_dir, name)
pthfile.write(path + "\n")
sys.path.append(path)
# To be able to import win32api, PyWinTypesxx.dll must be on the PATH
# We must be carefull to use the one we just installed, not one already
# in the system directory, otherwise we will not be able to copy the one
# just installed into the system dir.
os.environ["PATH"] = "%s;%s" % (os.path.join(lib_dir, "system32"), os.environ["PATH"])
import win32api
# and now we can get the system directory:
sysdir = win32api.GetSystemDirectory()
# and copy some files over there
for fname in glob.glob(os.path.join(lib_dir, "system32\\*.*")):
base = os.path.basename(fname)
dst = os.path.join(sysdir, base)
print "Copy %s to %s" % (base, sysdir)
shutil.copyfile(fname, dst)
# Register the files with the uninstaller
file_created(dst)
|
|
From: <mha...@us...> - 2003-11-10 10:56:41
|
Update of /cvsroot/pywin32/pywin32/Pythonwin In directory sc8-pr-cvs1:/tmp/cvs-serv20282 Modified Files: dde.dsp pythonwin.dsp Scintilla.dsp Log Message: Damn I have CVS :) Converted these to "-kb", which promptly converted then to \n-only lineends. convert back to \r\n. Index: dde.dsp =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/dde.dsp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** dde.dsp 10 Nov 2003 04:39:44 -0000 1.1 --- dde.dsp 10 Nov 2003 10:56:37 -0000 1.2 *************** *** 1,134 **** ! # Microsoft Developer Studio Project File - Name="dde" - Package Owner=<4> ! # Microsoft Developer Studio Generated Build File, Format Version 6.00 ! # ** DO NOT EDIT ** ! ! # TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 ! ! CFG=dde - Win32 Debug ! !MESSAGE This is not a valid makefile. To build this project using NMAKE, ! !MESSAGE use the Export Makefile command and run ! !MESSAGE ! !MESSAGE NMAKE /f "dde.mak". ! !MESSAGE ! !MESSAGE You can specify a configuration when running NMAKE ! !MESSAGE by defining the macro CFG on the command line. For example: ! !MESSAGE ! !MESSAGE NMAKE /f "dde.mak" CFG="dde - Win32 Debug" ! !MESSAGE ! !MESSAGE Possible choices for configuration are: ! !MESSAGE ! !MESSAGE "dde - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") ! !MESSAGE "dde - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") ! !MESSAGE ! ! # Begin Project ! # PROP AllowPerConfigDependencies 0 ! # PROP Scc_ProjName ""$/Python/win32", EJAAAAAA" ! # PROP Scc_LocalPath "." ! CPP=cl.exe ! MTL=midl.exe ! RSC=rc.exe ! ! !IF "$(CFG)" == "dde - Win32 Release" ! ! # PROP BASE Use_MFC 0 ! # PROP BASE Use_Debug_Libraries 0 ! # PROP BASE Output_Dir "Build" ! # PROP BASE Intermediate_Dir "Build\Temp\dde\Release" ! # PROP BASE Target_Dir "" ! # PROP Use_MFC 0 ! # PROP Use_Debug_Libraries 0 ! # PROP Output_Dir "Build" ! # PROP Intermediate_Dir "Build\Temp\dde\Release" ! # PROP Ignore_Export_Lib 0 ! # PROP Target_Dir "" ! F90=df.exe ! # ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c ! # ADD CPP /nologo /MD /W3 /GX /Zi /O2 /I "..\win32\src" /D "_AFXDLL" /D "_AFXEXT" /D "_MBCS" /D "WIN32" /D "_WINDOWS" /D "__WIN32__" /D "NDEBUG" /D "STRICT" /YX"stdafxdde.h" /FD /c ! # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o /win32 "NUL" ! # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o /win32 "NUL" ! # ADD BASE RSC /l 0x409 /d "NDEBUG" ! # ADD RSC /l 0x409 /d "NDEBUG" ! BSC32=bscmake.exe ! # ADD BASE BSC32 /nologo ! # ADD BSC32 /nologo ! LINK32=link.exe ! # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386 ! # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /base:"0x1ec00000" /subsystem:windows /dll /debug /machine:I386 /out:"Build\dde.pyd" /libpath:"..\win32\build" ! # SUBTRACT LINK32 /pdb:none ! ! !ELSEIF "$(CFG)" == "dde - Win32 Debug" ! ! # PROP BASE Use_MFC 0 ! # PROP BASE Use_Debug_Libraries 1 ! # PROP BASE Output_Dir "Build" ! # PROP BASE Intermediate_Dir "Build\Temp\dde\Debug" ! # PROP BASE Target_Dir "" ! # PROP Use_MFC 0 ! # PROP Use_Debug_Libraries 1 ! # PROP Output_Dir "Build" ! # PROP Intermediate_Dir "Build\Temp\dde\Debug" ! # PROP Ignore_Export_Lib 0 ! # PROP Target_Dir "" ! F90=df.exe ! # ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c ! # ADD CPP /nologo /MDd /W3 /GX /ZI /Od /I "..\win32\src" /D "_AFXDLL" /D "_AFXEXT" /D "_MBCS" /D "WIN32" /D "_WINDOWS" /D "__WIN32__" /D "_DEBUG" /D "STRICT" /YX"stdafxdde.h" /FD /c ! # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o /win32 "NUL" ! # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o /win32 "NUL" ! # ADD BASE RSC /l 0x409 /d "_DEBUG" ! # ADD RSC /l 0x409 /d "_DEBUG" ! BSC32=bscmake.exe ! # ADD BASE BSC32 /nologo ! # ADD BSC32 /nologo ! LINK32=link.exe ! # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386 /pdbtype:sept ! # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /base:"0x1ec00000" /subsystem:windows /dll /debug /machine:I386 /nodefaultlib:"nafxcwd.lib" /out:"Build\dde_d.pyd" /pdbtype:sept /libpath:"..\win32\build" ! ! !ENDIF ! ! # Begin Target ! ! # Name "dde - Win32 Release" ! # Name "dde - Win32 Debug" ! # Begin Group "Source Files" ! ! # PROP Default_Filter "" ! # Begin Source File ! ! SOURCE=.\ddeconv.cpp ! # End Source File ! # Begin Source File ! ! SOURCE=.\ddeitem.cpp ! # End Source File ! # Begin Source File ! ! SOURCE=.\ddemodule.cpp ! # End Source File ! # Begin Source File ! ! SOURCE=.\ddeserver.cpp ! # End Source File ! # Begin Source File ! ! SOURCE=.\ddetopic.cpp ! # End Source File ! # End Group ! # Begin Source File ! ! SOURCE=.\ddemodule.h ! # End Source File ! # Begin Source File ! ! SOURCE=.\stdafxdde.h ! # End Source File ! # Begin Source File ! ! SOURCE=.\stddde.cpp ! # End Source File ! # Begin Source File ! ! SOURCE=.\stddde.h ! # End Source File ! # End Target ! # End Project --- 1,134 ---- ! # Microsoft Developer Studio Project File - Name="dde" - Package Owner=<4> ! # Microsoft Developer Studio Generated Build File, Format Version 6.00 ! # ** DO NOT EDIT ** ! ! # TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 ! ! CFG=dde - Win32 Debug ! !MESSAGE This is not a valid makefile. To build this project using NMAKE, ! !MESSAGE use the Export Makefile command and run ! !MESSAGE ! !MESSAGE NMAKE /f "dde.mak". ! !MESSAGE ! !MESSAGE You can specify a configuration when running NMAKE ! !MESSAGE by defining the macro CFG on the command line. For example: ! !MESSAGE ! !MESSAGE NMAKE /f "dde.mak" CFG="dde - Win32 Debug" ! !MESSAGE ! !MESSAGE Possible choices for configuration are: ! !MESSAGE ! !MESSAGE "dde - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") ! !MESSAGE "dde - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") ! !MESSAGE ! ! # Begin Project ! # PROP AllowPerConfigDependencies 0 ! # PROP Scc_ProjName ""$/Python/win32", EJAAAAAA" ! # PROP Scc_LocalPath "." ! CPP=cl.exe ! MTL=midl.exe ! RSC=rc.exe ! ! !IF "$(CFG)" == "dde - Win32 Release" ! ! # PROP BASE Use_MFC 0 ! # PROP BASE Use_Debug_Libraries 0 ! # PROP BASE Output_Dir "Build" ! # PROP BASE Intermediate_Dir "Build\Temp\dde\Release" ! # PROP BASE Target_Dir "" ! # PROP Use_MFC 0 ! # PROP Use_Debug_Libraries 0 ! # PROP Output_Dir "Build" ! # PROP Intermediate_Dir "Build\Temp\dde\Release" ! # PROP Ignore_Export_Lib 0 ! # PROP Target_Dir "" ! F90=df.exe ! # ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c ! # ADD CPP /nologo /MD /W3 /GX /Zi /O2 /I "..\win32\src" /D "_AFXDLL" /D "_AFXEXT" /D "_MBCS" /D "WIN32" /D "_WINDOWS" /D "__WIN32__" /D "NDEBUG" /D "STRICT" /YX"stdafxdde.h" /FD /c ! # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o /win32 "NUL" ! # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o /win32 "NUL" ! # ADD BASE RSC /l 0x409 /d "NDEBUG" ! # ADD RSC /l 0x409 /d "NDEBUG" ! BSC32=bscmake.exe ! # ADD BASE BSC32 /nologo ! # ADD BSC32 /nologo ! LINK32=link.exe ! # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386 ! # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /base:"0x1ec00000" /subsystem:windows /dll /debug /machine:I386 /out:"Build\dde.pyd" /libpath:"..\win32\build" ! # SUBTRACT LINK32 /pdb:none ! ! !ELSEIF "$(CFG)" == "dde - Win32 Debug" ! ! # PROP BASE Use_MFC 0 ! # PROP BASE Use_Debug_Libraries 1 ! # PROP BASE Output_Dir "Build" ! # PROP BASE Intermediate_Dir "Build\Temp\dde\Debug" ! # PROP BASE Target_Dir "" ! # PROP Use_MFC 0 ! # PROP Use_Debug_Libraries 1 ! # PROP Output_Dir "Build" ! # PROP Intermediate_Dir "Build\Temp\dde\Debug" ! # PROP Ignore_Export_Lib 0 ! # PROP Target_Dir "" ! F90=df.exe ! # ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c ! # ADD CPP /nologo /MDd /W3 /GX /ZI /Od /I "..\win32\src" /D "_AFXDLL" /D "_AFXEXT" /D "_MBCS" /D "WIN32" /D "_WINDOWS" /D "__WIN32__" /D "_DEBUG" /D "STRICT" /YX"stdafxdde.h" /FD /c ! # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o /win32 "NUL" ! # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o /win32 "NUL" ! # ADD BASE RSC /l 0x409 /d "_DEBUG" ! # ADD RSC /l 0x409 /d "_DEBUG" ! BSC32=bscmake.exe ! # ADD BASE BSC32 /nologo ! # ADD BSC32 /nologo ! LINK32=link.exe ! # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386 /pdbtype:sept ! # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /base:"0x1ec00000" /subsystem:windows /dll /debug /machine:I386 /nodefaultlib:"nafxcwd.lib" /out:"Build\dde_d.pyd" /pdbtype:sept /libpath:"..\win32\build" ! ! !ENDIF ! ! # Begin Target ! ! # Name "dde - Win32 Release" ! # Name "dde - Win32 Debug" ! # Begin Group "Source Files" ! ! # PROP Default_Filter "" ! # Begin Source File ! ! SOURCE=.\ddeconv.cpp ! # End Source File ! # Begin Source File ! ! SOURCE=.\ddeitem.cpp ! # End Source File ! # Begin Source File ! ! SOURCE=.\ddemodule.cpp ! # End Source File ! # Begin Source File ! ! SOURCE=.\ddeserver.cpp ! # End Source File ! # Begin Source File ! ! SOURCE=.\ddetopic.cpp ! # End Source File ! # End Group ! # Begin Source File ! ! SOURCE=.\ddemodule.h ! # End Source File ! # Begin Source File ! ! SOURCE=.\stdafxdde.h ! # End Source File ! # Begin Source File ! ! SOURCE=.\stddde.cpp ! # End Source File ! # Begin Source File ! ! SOURCE=.\stddde.h ! # End Source File ! # End Target ! # End Project Index: pythonwin.dsp =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/pythonwin.dsp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** pythonwin.dsp 1 Sep 1999 23:32:59 -0000 1.1 --- pythonwin.dsp 10 Nov 2003 10:56:37 -0000 1.2 *************** *** 1,154 **** ! # Microsoft Developer Studio Project File - Name="pythonwin" - Package Owner=<4> ! # Microsoft Developer Studio Generated Build File, Format Version 6.00 ! # ** DO NOT EDIT ** ! ! # TARGTYPE "Win32 (x86) Application" 0x0101 ! ! CFG=pythonwin - Win32 Release ! !MESSAGE This is not a valid makefile. To build this project using NMAKE, ! !MESSAGE use the Export Makefile command and run ! !MESSAGE ! !MESSAGE NMAKE /f "pythonwin.mak". ! !MESSAGE ! !MESSAGE You can specify a configuration when running NMAKE ! !MESSAGE by defining the macro CFG on the command line. For example: ! !MESSAGE ! !MESSAGE NMAKE /f "pythonwin.mak" CFG="pythonwin - Win32 Release" ! !MESSAGE ! !MESSAGE Possible choices for configuration are: ! !MESSAGE ! !MESSAGE "pythonwin - Win32 Release" (based on "Win32 (x86) Application") ! !MESSAGE "pythonwin - Win32 Debug" (based on "Win32 (x86) Application") ! !MESSAGE ! ! # Begin Project ! # PROP AllowPerConfigDependencies 0 ! # PROP Scc_ProjName ""$/Python/Pythonwin/pythonwin", FTAAAAAA" ! # PROP Scc_LocalPath "." ! CPP=cl.exe ! MTL=midl.exe ! RSC=rc.exe ! ! !IF "$(CFG)" == "pythonwin - Win32 Release" ! ! # PROP BASE Use_MFC 0 ! # PROP BASE Use_Debug_Libraries 0 ! # PROP BASE Output_Dir ".\pythonwin\Release" ! # PROP BASE Intermediate_Dir ".\pythonwin\Release" ! # PROP BASE Target_Dir ".\pythonwin" ! # PROP Use_MFC 2 ! # PROP Use_Debug_Libraries 0 ! # PROP Output_Dir "Build" ! # PROP Intermediate_Dir "Build\Temp\Pythonwin\Release" ! # PROP Ignore_Export_Lib 0 ! # PROP Target_Dir ".\pythonwin" ! # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /c ! # ADD CPP /nologo /MD /W3 /GX /Zi /O2 /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafxpw.h" /FD /c ! # ADD BASE MTL /nologo /D "NDEBUG" /win32 ! # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 ! # ADD BASE RSC /l 0xc09 /d "NDEBUG" ! # ADD RSC /l 0x409 /i "c:\src\python1.4\include" /d "NDEBUG" /d "_AFXDLL" ! BSC32=bscmake.exe ! # ADD BASE BSC32 /nologo ! # ADD BSC32 /nologo ! LINK32=link.exe ! # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 ! # ADD LINK32 /nologo /subsystem:windows /debug /machine:I386 ! # SUBTRACT LINK32 /pdb:none ! ! !ELSEIF "$(CFG)" == "pythonwin - Win32 Debug" ! ! # PROP BASE Use_MFC 0 ! # PROP BASE Use_Debug_Libraries 1 ! # PROP BASE Output_Dir ".\pythonwin\Debug" ! # PROP BASE Intermediate_Dir ".\pythonwin\Debug" ! # PROP BASE Target_Dir ".\pythonwin" ! # PROP Use_MFC 2 ! # PROP Use_Debug_Libraries 1 ! # PROP Output_Dir "Build" ! # PROP Intermediate_Dir "Build\Temp\Pythonwin\Debug" ! # PROP Ignore_Export_Lib 0 ! # PROP Target_Dir ".\pythonwin" ! # ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /c ! # ADD CPP /nologo /MDd /W3 /GX /Zi /Od /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafxpw.h" /Fd"Build\Temp\Pythonwin\Debug\pythonwin" /FD /c ! # ADD BASE MTL /nologo /D "_DEBUG" /win32 ! # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 ! # ADD BASE RSC /l 0xc09 /d "_DEBUG" ! # ADD RSC /l 0x409 /i "c:\src\python1.4\include" /d "_DEBUG" /d "_AFXDLL" ! BSC32=bscmake.exe ! # ADD BASE BSC32 /nologo ! # ADD BSC32 /nologo ! LINK32=link.exe ! # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 ! # ADD LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"Build/pythonwin_d.exe" ! # SUBTRACT LINK32 /pdb:none ! ! !ENDIF ! ! # Begin Target ! ! # Name "pythonwin - Win32 Release" ! # Name "pythonwin - Win32 Debug" ! # Begin Group "Source Files" ! ! # PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90" ! # Begin Source File ! ! SOURCE=.\pythonwin.cpp ! # End Source File ! # Begin Source File ! ! SOURCE=.\pythonwin.rc ! # End Source File ! # Begin Source File ! ! SOURCE=.\stdafxpw.cpp ! # ADD CPP /Yc"stdafxpw.h" ! # End Source File ! # End Group ! # Begin Group "Header Files" ! ! # PROP Default_Filter "h;hpp;hxx;hm;inl;fi;fd" ! # Begin Source File ! ! SOURCE=.\pythonwin.h ! # End Source File ! # Begin Source File ! ! SOURCE=.\stdafxpw.h ! # End Source File ! # Begin Source File ! ! SOURCE=.\Win32uiHostGlue.h ! # End Source File ! # End Group ! # Begin Group "Resource Files" ! ! # PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe" ! # Begin Source File ! ! SOURCE=.\res\ICO00002.ICO ! # End Source File ! # Begin Source File ! ! SOURCE=.\res\IDR_MAIN.ICO ! # End Source File ! # Begin Source File ! ! SOURCE=.\res\IDR_PYTH.ICO ! # End Source File ! # Begin Source File ! ! SOURCE=.\res\PADDOC.ICO ! # End Source File ! # Begin Source File ! ! SOURCE=.\res\pyc.ico ! # End Source File ! # Begin Source File ! ! SOURCE=.\res\pycon.ico ! # End Source File ! # End Group ! # End Target ! # End Project --- 1,154 ---- ! # Microsoft Developer Studio Project File - Name="pythonwin" - Package Owner=<4> ! # Microsoft Developer Studio Generated Build File, Format Version 6.00 ! # ** DO NOT EDIT ** ! ! # TARGTYPE "Win32 (x86) Application" 0x0101 ! ! CFG=pythonwin - Win32 Release ! !MESSAGE This is not a valid makefile. To build this project using NMAKE, ! !MESSAGE use the Export Makefile command and run ! !MESSAGE ! !MESSAGE NMAKE /f "pythonwin.mak". ! !MESSAGE ! !MESSAGE You can specify a configuration when running NMAKE ! !MESSAGE by defining the macro CFG on the command line. For example: ! !MESSAGE ! !MESSAGE NMAKE /f "pythonwin.mak" CFG="pythonwin - Win32 Release" ! !MESSAGE ! !MESSAGE Possible choices for configuration are: ! !MESSAGE ! !MESSAGE "pythonwin - Win32 Release" (based on "Win32 (x86) Application") ! !MESSAGE "pythonwin - Win32 Debug" (based on "Win32 (x86) Application") ! !MESSAGE ! ! # Begin Project ! # PROP AllowPerConfigDependencies 0 ! # PROP Scc_ProjName ""$/Python/Pythonwin/pythonwin", FTAAAAAA" ! # PROP Scc_LocalPath "." ! CPP=cl.exe ! MTL=midl.exe ! RSC=rc.exe ! ! !IF "$(CFG)" == "pythonwin - Win32 Release" ! ! # PROP BASE Use_MFC 0 ! # PROP BASE Use_Debug_Libraries 0 ! # PROP BASE Output_Dir ".\pythonwin\Release" ! # PROP BASE Intermediate_Dir ".\pythonwin\Release" ! # PROP BASE Target_Dir ".\pythonwin" ! # PROP Use_MFC 2 ! # PROP Use_Debug_Libraries 0 ! # PROP Output_Dir "Build" ! # PROP Intermediate_Dir "Build\Temp\Pythonwin\Release" ! # PROP Ignore_Export_Lib 0 ! # PROP Target_Dir ".\pythonwin" ! # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /c ! # ADD CPP /nologo /MD /W3 /GX /Zi /O2 /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafxpw.h" /FD /c ! # ADD BASE MTL /nologo /D "NDEBUG" /win32 ! # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 ! # ADD BASE RSC /l 0xc09 /d "NDEBUG" ! # ADD RSC /l 0x409 /i "c:\src\python1.4\include" /d "NDEBUG" /d "_AFXDLL" ! BSC32=bscmake.exe ! # ADD BASE BSC32 /nologo ! # ADD BSC32 /nologo ! LINK32=link.exe ! # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 ! # ADD LINK32 /nologo /subsystem:windows /debug /machine:I386 ! # SUBTRACT LINK32 /pdb:none ! ! !ELSEIF "$(CFG)" == "pythonwin - Win32 Debug" ! ! # PROP BASE Use_MFC 0 ! # PROP BASE Use_Debug_Libraries 1 ! # PROP BASE Output_Dir ".\pythonwin\Debug" ! # PROP BASE Intermediate_Dir ".\pythonwin\Debug" ! # PROP BASE Target_Dir ".\pythonwin" ! # PROP Use_MFC 2 ! # PROP Use_Debug_Libraries 1 ! # PROP Output_Dir "Build" ! # PROP Intermediate_Dir "Build\Temp\Pythonwin\Debug" ! # PROP Ignore_Export_Lib 0 ! # PROP Target_Dir ".\pythonwin" ! # ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /c ! # ADD CPP /nologo /MDd /W3 /GX /Zi /Od /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafxpw.h" /Fd"Build\Temp\Pythonwin\Debug\pythonwin" /FD /c ! # ADD BASE MTL /nologo /D "_DEBUG" /win32 ! # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 ! # ADD BASE RSC /l 0xc09 /d "_DEBUG" ! # ADD RSC /l 0x409 /i "c:\src\python1.4\include" /d "_DEBUG" /d "_AFXDLL" ! BSC32=bscmake.exe ! # ADD BASE BSC32 /nologo ! # ADD BSC32 /nologo ! LINK32=link.exe ! # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 ! # ADD LINK32 /nologo /subsystem:windows /debug /machine:I386 /out:"Build/pythonwin_d.exe" ! # SUBTRACT LINK32 /pdb:none ! ! !ENDIF ! ! # Begin Target ! ! # Name "pythonwin - Win32 Release" ! # Name "pythonwin - Win32 Debug" ! # Begin Group "Source Files" ! ! # PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90" ! # Begin Source File ! ! SOURCE=.\pythonwin.cpp ! # End Source File ! # Begin Source File ! ! SOURCE=.\pythonwin.rc ! # End Source File ! # Begin Source File ! ! SOURCE=.\stdafxpw.cpp ! # ADD CPP /Yc"stdafxpw.h" ! # End Source File ! # End Group ! # Begin Group "Header Files" ! ! # PROP Default_Filter "h;hpp;hxx;hm;inl;fi;fd" ! # Begin Source File ! ! SOURCE=.\pythonwin.h ! # End Source File ! # Begin Source File ! ! SOURCE=.\stdafxpw.h ! # End Source File ! # Begin Source File ! ! SOURCE=.\Win32uiHostGlue.h ! # End Source File ! # End Group ! # Begin Group "Resource Files" ! ! # PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe" ! # Begin Source File ! ! SOURCE=.\res\ICO00002.ICO ! # End Source File ! # Begin Source File ! ! SOURCE=.\res\IDR_MAIN.ICO ! # End Source File ! # Begin Source File ! ! SOURCE=.\res\IDR_PYTH.ICO ! # End Source File ! # Begin Source File ! ! SOURCE=.\res\PADDOC.ICO ! # End Source File ! # Begin Source File ! ! SOURCE=.\res\pyc.ico ! # End Source File ! # Begin Source File ! ! SOURCE=.\res\pycon.ico ! # End Source File ! # End Group ! # End Target ! # End Project Index: Scintilla.dsp =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/Scintilla.dsp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Scintilla.dsp 11 Mar 2000 00:46:21 -0000 1.1 --- Scintilla.dsp 10 Nov 2003 10:56:37 -0000 1.2 *************** *** 1,97 **** ! # Microsoft Developer Studio Project File - Name="Scintilla" - Package Owner=<4> ! # Microsoft Developer Studio Generated Build File, Format Version 6.00 ! # ** DO NOT EDIT ** ! ! # TARGTYPE "Win32 (x86) External Target" 0x0106 ! ! CFG=Scintilla - Win32 Debug ! !MESSAGE This is not a valid makefile. To build this project using NMAKE, ! !MESSAGE use the Export Makefile command and run ! !MESSAGE ! !MESSAGE NMAKE /f "Scintilla.mak". ! !MESSAGE ! !MESSAGE You can specify a configuration when running NMAKE ! !MESSAGE by defining the macro CFG on the command line. For example: ! !MESSAGE ! !MESSAGE NMAKE /f "Scintilla.mak" CFG="Scintilla - Win32 Debug" ! !MESSAGE ! !MESSAGE Possible choices for configuration are: ! !MESSAGE ! !MESSAGE "Scintilla - Win32 Release" (based on "Win32 (x86) External Target") ! !MESSAGE "Scintilla - Win32 Debug" (based on "Win32 (x86) External Target") ! !MESSAGE ! ! # Begin Project ! # PROP AllowPerConfigDependencies 0 ! # PROP Scc_ProjName "" ! # PROP Scc_LocalPath "" ! ! !IF "$(CFG)" == "Scintilla - Win32 Release" ! ! # PROP BASE Use_MFC ! # PROP BASE Use_Debug_Libraries 0 ! # PROP BASE Output_Dir "Build" ! # PROP BASE Intermediate_Dir "Build\Temp\Scintilla\Release" ! # PROP BASE Cmd_Line "NMAKE /f Scintilla.mak" ! # PROP BASE Rebuild_Opt "/a" ! # PROP BASE Target_File "Scintilla.exe" ! # PROP BASE Bsc_Name "Scintilla.bsc" ! # PROP BASE Target_Dir "" ! # PROP Use_MFC ! # PROP Use_Debug_Libraries 0 ! # PROP Output_Dir "Build" ! # PROP Intermediate_Dir "Build\Temp\Scintilla\Release" ! # PROP Cmd_Line "cd Scintilla && nmake /nologo /f makefile_pythonwin" ! # PROP Rebuild_Opt "/a" ! # PROP Target_File "Build\Scintilla.dll" ! # PROP Bsc_Name "" ! # PROP Target_Dir "" ! ! !ELSEIF "$(CFG)" == "Scintilla - Win32 Debug" ! ! # PROP BASE Use_MFC ! # PROP BASE Use_Debug_Libraries 1 ! # PROP BASE Output_Dir "Build" ! # PROP BASE Intermediate_Dir "Build\Temp\Scintilla\Debug" ! # PROP BASE Cmd_Line "NMAKE /f Scintilla.mak" ! # PROP BASE Rebuild_Opt "/a" ! # PROP BASE Target_File "Scintilla.exe" ! # PROP BASE Bsc_Name "Scintilla.bsc" ! # PROP BASE Target_Dir "" ! # PROP Use_MFC ! # PROP Use_Debug_Libraries 1 ! # PROP Output_Dir "Build" ! # PROP Intermediate_Dir "Build\Temp\Scintilla\Debug" ! # PROP Cmd_Line "cd Scintilla && nmake /f makefile_pythonwin DEBUG=1" ! # PROP Rebuild_Opt "/a" ! # PROP Target_File "Build\Scintilla_d.dll" ! # PROP Bsc_Name "" ! # PROP Target_Dir "" ! ! !ENDIF ! ! # Begin Target ! ! # Name "Scintilla - Win32 Release" ! # Name "Scintilla - Win32 Debug" ! ! !IF "$(CFG)" == "Scintilla - Win32 Release" ! ! !ELSEIF "$(CFG)" == "Scintilla - Win32 Debug" ! ! !ENDIF ! ! # Begin Group "Source Files" ! ! # PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" ! # End Group ! # Begin Group "Header Files" ! ! # PROP Default_Filter "h;hpp;hxx;hm;inl" ! # End Group ! # Begin Group "Resource Files" ! ! # PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" ! # End Group ! # End Target ! # End Project --- 1,97 ---- ! # Microsoft Developer Studio Project File - Name="Scintilla" - Package Owner=<4> ! # Microsoft Developer Studio Generated Build File, Format Version 6.00 ! # ** DO NOT EDIT ** ! ! # TARGTYPE "Win32 (x86) External Target" 0x0106 ! ! CFG=Scintilla - Win32 Debug ! !MESSAGE This is not a valid makefile. To build this project using NMAKE, ! !MESSAGE use the Export Makefile command and run ! !MESSAGE ! !MESSAGE NMAKE /f "Scintilla.mak". ! !MESSAGE ! !MESSAGE You can specify a configuration when running NMAKE ! !MESSAGE by defining the macro CFG on the command line. For example: ! !MESSAGE ! !MESSAGE NMAKE /f "Scintilla.mak" CFG="Scintilla - Win32 Debug" ! !MESSAGE ! !MESSAGE Possible choices for configuration are: ! !MESSAGE ! !MESSAGE "Scintilla - Win32 Release" (based on "Win32 (x86) External Target") ! !MESSAGE "Scintilla - Win32 Debug" (based on "Win32 (x86) External Target") ! !MESSAGE ! ! # Begin Project ! # PROP AllowPerConfigDependencies 0 ! # PROP Scc_ProjName "" ! # PROP Scc_LocalPath "" ! ! !IF "$(CFG)" == "Scintilla - Win32 Release" ! ! # PROP BASE Use_MFC ! # PROP BASE Use_Debug_Libraries 0 ! # PROP BASE Output_Dir "Build" ! # PROP BASE Intermediate_Dir "Build\Temp\Scintilla\Release" ! # PROP BASE Cmd_Line "NMAKE /f Scintilla.mak" ! # PROP BASE Rebuild_Opt "/a" ! # PROP BASE Target_File "Scintilla.exe" ! # PROP BASE Bsc_Name "Scintilla.bsc" ! # PROP BASE Target_Dir "" ! # PROP Use_MFC ! # PROP Use_Debug_Libraries 0 ! # PROP Output_Dir "Build" ! # PROP Intermediate_Dir "Build\Temp\Scintilla\Release" ! # PROP Cmd_Line "cd Scintilla && nmake /nologo /f makefile_pythonwin" ! # PROP Rebuild_Opt "/a" ! # PROP Target_File "Build\Scintilla.dll" ! # PROP Bsc_Name "" ! # PROP Target_Dir "" ! ! !ELSEIF "$(CFG)" == "Scintilla - Win32 Debug" ! ! # PROP BASE Use_MFC ! # PROP BASE Use_Debug_Libraries 1 ! # PROP BASE Output_Dir "Build" ! # PROP BASE Intermediate_Dir "Build\Temp\Scintilla\Debug" ! # PROP BASE Cmd_Line "NMAKE /f Scintilla.mak" ! # PROP BASE Rebuild_Opt "/a" ! # PROP BASE Target_File "Scintilla.exe" ! # PROP BASE Bsc_Name "Scintilla.bsc" ! # PROP BASE Target_Dir "" ! # PROP Use_MFC ! # PROP Use_Debug_Libraries 1 ! # PROP Output_Dir "Build" ! # PROP Intermediate_Dir "Build\Temp\Scintilla\Debug" ! # PROP Cmd_Line "cd Scintilla && nmake /f makefile_pythonwin DEBUG=1" ! # PROP Rebuild_Opt "/a" ! # PROP Target_File "Build\Scintilla_d.dll" ! # PROP Bsc_Name "" ! # PROP Target_Dir "" ! ! !ENDIF ! ! # Begin Target ! ! # Name "Scintilla - Win32 Release" ! # Name "Scintilla - Win32 Debug" ! ! !IF "$(CFG)" == "Scintilla - Win32 Release" ! ! !ELSEIF "$(CFG)" == "Scintilla - Win32 Debug" ! ! !ENDIF ! ! # Begin Group "Source Files" ! ! # PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" ! # End Group ! # Begin Group "Header Files" ! ! # PROP Default_Filter "h;hpp;hxx;hm;inl" ! # End Group ! # Begin Group "Resource Files" ! ! # PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" ! # End Group ! # End Target ! # End Project |
|
From: <mha...@us...> - 2003-11-10 10:40:24
|
Update of /cvsroot/pywin32/pywin32
In directory sc8-pr-cvs1:/tmp/cvs-serv18319
Modified Files:
setup_win32all_core.py
Log Message:
Making things work for Thomas.
Index: setup_win32all_core.py
===================================================================
RCS file: /cvsroot/pywin32/pywin32/setup_win32all_core.py,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** setup_win32all_core.py 10 Nov 2003 04:49:00 -0000 1.11
--- setup_win32all_core.py 10 Nov 2003 10:40:20 -0000 1.12
***************
*** 228,232 ****
swig_sources.append(source)
# and win32all has it's own naming convention for the wrappers:
! swig_targets[source] = base + 'module_win32' + target_ext
else:
new_sources.append(source)
--- 228,235 ----
swig_sources.append(source)
# and win32all has it's own naming convention for the wrappers:
! if base.endswith("win32pipe") or base.endswith("win32security"):
! swig_targets[source] = base + 'module' + target_ext
! else:
! swig_targets[source] = base + 'module_win32' + target_ext
else:
new_sources.append(source)
***************
*** 265,272 ****
("win2kras", "rasapi32", False),
("win32api", "user32 advapi32 shell32 version", False),
! ("win32file", "", False),
("win32event", "user32", False),
("win32clipboard", "gdi32 user32 shell32", False),
! ("win32evtlog", "advapi32", False),
# win32gui handled below
("win32help", "htmlhelp user32 advapi32", False),
--- 268,275 ----
("win2kras", "rasapi32", False),
("win32api", "user32 advapi32 shell32 version", False),
! ("win32file", "oleaut32", False),
("win32event", "user32", False),
("win32clipboard", "gdi32 user32 shell32", False),
! ("win32evtlog", "advapi32 oleaut32", False),
# win32gui handled below
("win32help", "htmlhelp user32 advapi32", False),
***************
*** 280,284 ****
("win32ras", "rasapi32 user32", False),
("win32security", "advapi32 user32", True),
! ("win32service", "advapi32", True),
("win32trace", "advapi32", False),
("win32wnet", "netapi32 mpr", False),
--- 283,287 ----
("win32ras", "rasapi32 user32", False),
("win32security", "advapi32 user32", True),
! ("win32service", "advapi32 oleaut32", True),
("win32trace", "advapi32", False),
("win32wnet", "netapi32 mpr", False),
|
|
From: Thomas H. <th...@py...> - 2003-11-10 09:14:31
|
Here's the patch. |
|
From: Thomas H. <th...@py...> - 2003-11-10 09:10:36
|
mha...@us... writes: > Update of /cvsroot/pywin32/pywin32 > In directory sc8-pr-cvs1:/tmp/cvs-serv2059 > > Modified Files: > setup_win32all_core.py > Log Message: > Add pythonwin extensions. > Mark, here is the status report for now. I checked out pywintypes.dsp and win32com.dsp with the Python23 tag, and tried to build the stuff with Python 2.3.2. win32file and win32evtlog seem to need oleaut32.lib (because they call Sys_FreeString). win32pipe did not build for me because swig creates win32pipemodule_win32.cpp, but win32pipemodule.cpp is needed, same for win32security. Then I had to comment out adsi, axdebug, mapi, exchange, exchdapi, and win32uiole because of other problems (files not found or such). Thomas |
|
From: <mha...@us...> - 2003-11-10 04:49:03
|
Update of /cvsroot/pywin32/pywin32
In directory sc8-pr-cvs1:/tmp/cvs-serv2059
Modified Files:
setup_win32all_core.py
Log Message:
Add pythonwin extensions.
Index: setup_win32all_core.py
===================================================================
RCS file: /cvsroot/pywin32/pywin32/setup_win32all_core.py,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** setup_win32all_core.py 10 Nov 2003 04:09:38 -0000 1.10
--- setup_win32all_core.py 10 Nov 2003 04:49:00 -0000 1.11
***************
*** 86,89 ****
--- 86,99 ----
return result
+ class WinExt_pythonwin(WinExt):
+ def __init__ (self, name, **kw):
+ if not kw.has_key("dsp_file"):
+ kw["dsp_file"] = "pythonwin/" + name + ".dsp"
+ kw.setdefault("extra_compile_args", []).extend(
+ ['-D_AFXDLL', '-D_AFXEXT','-D_MBCS'])
+ WinExt.__init__(self, name, **kw)
+ def get_pywin32_dir(self):
+ return "pythonwin"
+
class WinExt_win32(WinExt):
def __init__ (self, name, **kw):
***************
*** 327,330 ****
--- 337,348 ----
WinExt_win32com('shell', libraries='shell32')
]
+
+ pythonwin_extensions = [
+ WinExt_pythonwin("win32ui",
+ extra_compile_args =
+ ['-DBUILD_PYW']),
+ WinExt_pythonwin("win32uiole"),
+ WinExt_pythonwin("dde"),
+ ]
################################################################
***************
*** 341,345 ****
},
! ext_modules = win32_extensions + com_extensions,
## packages=['win32',
--- 359,363 ----
},
! ext_modules = win32_extensions + com_extensions + pythonwin_extensions,
## packages=['win32',
|
|
From: <mha...@us...> - 2003-11-10 04:39:47
|
Update of /cvsroot/pywin32/pywin32/win32 In directory sc8-pr-cvs1:/tmp/cvs-serv985/win32 Removed Files: dde.dsp Log Message: Move 'dde' module into the pythonwin directory, as it is not a generic win32 module, but depends on win32ui. --- dde.dsp DELETED --- |
Update of /cvsroot/pywin32/pywin32/win32/src In directory sc8-pr-cvs1:/tmp/cvs-serv985/win32/src Removed Files: ddeconv.cpp ddeitem.cpp ddemodule.cpp ddemodule.h ddeserver.cpp ddetopic.cpp stdafxdde.h stddde.cpp Log Message: Move 'dde' module into the pythonwin directory, as it is not a generic win32 module, but depends on win32ui. --- ddeconv.cpp DELETED --- --- ddeitem.cpp DELETED --- --- ddemodule.cpp DELETED --- --- ddemodule.h DELETED --- --- ddeserver.cpp DELETED --- --- ddetopic.cpp DELETED --- --- stdafxdde.h DELETED --- --- stddde.cpp DELETED --- |
|
From: <mha...@us...> - 2003-11-09 11:01:23
|
Update of /cvsroot/pywin32/pywin32/com/win32com/demos
In directory sc8-pr-cvs1:/tmp/cvs-serv23586
Modified Files:
connect.py
Log Message:
Add some checks rather than relying on 'eyeballing' the results. Add
unicode tests.
Index: connect.py
===================================================================
RCS file: /cvsroot/pywin32/pywin32/com/win32com/demos/connect.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** connect.py 1 Sep 1999 22:59:21 -0000 1.1
--- connect.py 9 Nov 2003 11:01:18 -0000 1.2
***************
*** 39,42 ****
--- 39,44 ----
# Normally some explicit DISPID->Method mapping is required.
_public_methods_ = ["OnDoneIt"]
+ def __init__(self):
+ self.last_event_arg = None
# A client must implement QI, and respond to a query for the Event interface.
# In addition, it must provide a COM object (which server.util.wrap) does.
***************
*** 48,67 ****
# And here is our event method which gets called.
def OnDoneIt(self, arg):
! print "OnDoneIt with ", repr(arg)
# A simple test script for all this.
# In the real world, it is likely that the code controlling the server
# will be in the same class as that getting the notifications.
! def test():
import win32com.client.dynamic, win32com.client.connect
import win32com.server.policy
server = win32com.client.dynamic.Dispatch(win32com.server.util.wrap(ConnectableServer()))
connection = win32com.client.connect.SimpleConnection()
! connection.Connect(server, ConnectableClient(),IID_IConnectDemoEvents)
! server.DoIt("Hello")
! server.DoIt("Here is a null>"+chr(0)+"<")
# Aggressive memory leak checking (ie, do nothing!) :-) All should cleanup OK???
if __name__=='__main__':
! test()
!
--- 50,82 ----
# And here is our event method which gets called.
def OnDoneIt(self, arg):
! self.last_event_arg = arg
!
! def CheckEvent(server, client, val, verbose):
! client.last_event_arg = None
! server.DoIt(val)
! if client.last_event_arg != val:
! raise RuntimeError, "Sent %r, but got back %r" % (val, client.last_event_arg)
! if verbose:
! print "Sent and received %r" % val
# A simple test script for all this.
# In the real world, it is likely that the code controlling the server
# will be in the same class as that getting the notifications.
! def test(verbose=0):
import win32com.client.dynamic, win32com.client.connect
import win32com.server.policy
server = win32com.client.dynamic.Dispatch(win32com.server.util.wrap(ConnectableServer()))
connection = win32com.client.connect.SimpleConnection()
! client = ConnectableClient()
! connection.Connect(server, client, IID_IConnectDemoEvents)
! CheckEvent(server, client, "Hello", verbose)
! CheckEvent(server, client, "Here is a null>"+chr(0)+"<", verbose)
! CheckEvent(server, client, u"Here is a null>"+unichr(0)+"<", verbose)
! val = unicode("test-\xe0\xf2", "latin-1") # 2 latin characters.
! CheckEvent(server, client, val, verbose)
! if verbose:
! print "Everything seemed to work!"
# Aggressive memory leak checking (ie, do nothing!) :-) All should cleanup OK???
if __name__=='__main__':
! test(1)
|
|
From: <mha...@us...> - 2003-11-08 12:37:22
|
Update of /cvsroot/pywin32/pywin32/win32/test
In directory sc8-pr-cvs1:/tmp/cvs-serv26705
Modified Files:
test_win32api.py
Log Message:
Add FormatMessage test.
Index: test_win32api.py
===================================================================
RCS file: /cvsroot/pywin32/pywin32/win32/test/test_win32api.py,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** test_win32api.py 23 Oct 2003 01:21:09 -0000 1.5
--- test_win32api.py 8 Nov 2003 12:37:16 -0000 1.6
***************
*** 80,83 ****
--- 80,94 ----
"Expected long name ('%s') to be original name ('%s')" % (long_name, fname))
+ class FormatMessage(unittest.TestCase):
+ def test_FromString(self):
+ msg = "Hello %1, how are you %2?"
+ inserts = ["Mark", "today"]
+ result = win32api.FormatMessage(win32con.FORMAT_MESSAGE_FROM_STRING,
+ msg, # source
+ 0, # ID
+ 0, # LangID
+ inserts)
+ self.assertEqual(result, "Hello Mark, how are you today?")
+
if __name__ == '__main__':
unittest.main()
|
|
From: <mha...@us...> - 2003-11-08 12:34:48
|
Update of /cvsroot/pywin32/pywin32/win32/src
In directory sc8-pr-cvs1:/tmp/cvs-serv26261
Modified Files:
PythonService.cpp win32evtlog.i win32service.i
Log Message:
Don't use BSTR when we mean WCHAR/TCHAR
Index: PythonService.cpp
===================================================================
RCS file: /cvsroot/pywin32/pywin32/win32/src/PythonService.cpp,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** PythonService.cpp 8 Nov 2003 00:56:36 -0000 1.10
--- PythonService.cpp 8 Nov 2003 12:34:45 -0000 1.11
***************
*** 142,147 ****
static PyObject *DoLogMessage(WORD errorType, PyObject *obMsg)
{
! BSTR msg;
! if (!PyWinObject_AsBstr(obMsg, &msg))
return NULL;
DWORD errorCode = errorType==EVENTLOG_ERROR_TYPE ? PYS_E_GENERIC_ERROR : PYS_E_GENERIC_WARNING;
--- 142,147 ----
static PyObject *DoLogMessage(WORD errorType, PyObject *obMsg)
{
! WCHAR *msg;
! if (!PyWinObject_AsWCHAR(obMsg, &msg))
return NULL;
DWORD errorCode = errorType==EVENTLOG_ERROR_TYPE ? PYS_E_GENERIC_ERROR : PYS_E_GENERIC_WARNING;
***************
*** 150,154 ****
Py_BEGIN_ALLOW_THREADS
ok = ReportError(errorCode, inserts, errorType);
! SysFreeString(msg);
Py_END_ALLOW_THREADS
if (!ok)
--- 150,154 ----
Py_BEGIN_ALLOW_THREADS
ok = ReportError(errorCode, inserts, errorType);
! PyWinObject_FreeWCHAR(msg);
Py_END_ALLOW_THREADS
if (!ok)
***************
*** 184,188 ****
goto cleanup;
}
! memset(pStrings, 0, sizeof(BSTR *)*(numStrings+1)); // this also terminates array!
for (int i=0;i<numStrings;i++) {
PyObject *obString = PySequence_GetItem(obStrings, i);
--- 184,188 ----
goto cleanup;
}
! memset(pStrings, 0, sizeof(TCHAR *)*(numStrings+1)); // this also terminates array!
for (int i=0;i<numStrings;i++) {
PyObject *obString = PySequence_GetItem(obStrings, i);
***************
*** 260,270 ****
return NULL;
}
! BSTR bstrName;
! if (!PyWinObject_AsBstr(nameOb, &bstrName))
return NULL;
! PY_SERVICE_TABLE_ENTRY *pe = FindPythonServiceEntry(bstrName);
if (pe==NULL) {
PyErr_SetString(PyExc_ValueError, "The service name is not hosted by this process");
! SysFreeString(bstrName);
return NULL;
}
--- 260,270 ----
return NULL;
}
! WCHAR *szName;
! if (!PyWinObject_AsWCHAR(nameOb, &szName))
return NULL;
! PY_SERVICE_TABLE_ENTRY *pe = FindPythonServiceEntry(szName);
if (pe==NULL) {
PyErr_SetString(PyExc_ValueError, "The service name is not hosted by this process");
! PyWinObject_FreeWCHAR(szName);
return NULL;
}
***************
*** 276,281 ****
return Py_None;
}
! pe->sshStatusHandle = RegisterServiceCtrlHandlerEx(bstrName, service_ctrl_ex, pe);
! SysFreeString(bstrName);
PyObject *rc;
if (pe->sshStatusHandle==0) {
--- 276,281 ----
return Py_None;
}
! pe->sshStatusHandle = RegisterServiceCtrlHandlerEx(szName, service_ctrl_ex, pe);
! PyWinObject_FreeWCHAR(szName);
PyObject *rc;
if (pe->sshStatusHandle==0) {
Index: win32evtlog.i
===================================================================
RCS file: /cvsroot/pywin32/pywin32/win32/src/win32evtlog.i,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** win32evtlog.i 2 Mar 2000 11:03:38 -0000 1.4
--- win32evtlog.i 8 Nov 2003 12:34:45 -0000 1.5
***************
*** 257,261 ****
goto cleanup;
}
! memset(pStrings, 0, sizeof(BSTR *)*numStrings);
for (i=0;i<numStrings;i++) {
PyObject *obString = PySequence_GetItem(obStrings, i);
--- 257,261 ----
goto cleanup;
}
! memset(pStrings, 0, sizeof(WCHAR *)*numStrings);
for (i=0;i<numStrings;i++) {
PyObject *obString = PySequence_GetItem(obStrings, i);
***************
*** 263,267 ****
goto cleanup;
}
! BOOL ok = PyWinObject_AsBstr(obString, pStrings+i);
Py_XDECREF(obString);
if (!ok)
--- 263,267 ----
goto cleanup;
}
! BOOL ok = PyWinObject_AsWCHAR(obString, pStrings+i);
Py_XDECREF(obString);
if (!ok)
***************
*** 295,299 ****
if (pStrings) {
for (i=0;i<numStrings;i++)
! SysFreeString(pStrings[i]);
delete [] pStrings;
}
--- 295,299 ----
if (pStrings) {
for (i=0;i<numStrings;i++)
! PyWinObject_FreeWCHAR(pStrings[i]);
delete [] pStrings;
}
***************
*** 373,378 ****
// @pyswig int|OpenEventLog|Opens an event log.
%name (OpenEventLog) HANDLE OpenEventLogW (
! %val PyWin_AutoFreeBstr &inNullWideString, // @pyparm <o PyUnicode>|serverName||The server name, or None
! %val PyWin_AutoFreeBstr &inWideString // @pyparm <o PyUnicode>|sourceName||specifies the name of the source that the returned handle will reference. The source name must be a subkey of a logfile entry under the EventLog key in the registry.
);
--- 373,378 ----
// @pyswig int|OpenEventLog|Opens an event log.
%name (OpenEventLog) HANDLE OpenEventLogW (
! WCHAR *INPUT_NULLOK, // @pyparm <o PyUnicode>|serverName||The server name, or None
! WCHAR *sourceName // @pyparm <o PyUnicode>|sourceName||specifies the name of the source that the returned handle will reference. The source name must be a subkey of a logfile entry under the EventLog key in the registry.
);
***************
*** 380,385 ****
%name (RegisterEventSource) HANDLE
RegisterEventSourceW (
! %val PyWin_AutoFreeBstr &inNullWideString, // @pyparm <o PyUnicode>|serverName||The server name, or None
! %val PyWin_AutoFreeBstr &inWideString // @pyparm <o PyUnicode>|sourceName||The source name
);
--- 380,385 ----
%name (RegisterEventSource) HANDLE
RegisterEventSourceW (
! WCHAR *INPUT_NULLOK, // @pyparm <o PyUnicode>|serverName||The server name, or None
! WCHAR *sourceName // @pyparm <o PyUnicode>|sourceName||The source name
);
***************
*** 387,392 ****
// @pyswig int|OpenBackupEventLog|Opens a previously saved event log.
%name (OpenBackupEventLog) HANDLE OpenBackupEventLogW (
! %val PyWin_AutoFreeBstr &inNullWideString, // @pyparm <o PyUnicode>|serverName||The server name, or None
! %val PyWin_AutoFreeBstr &inWideString // @pyparm <o PyUnicode>|fileName||The filename to open
);
--- 387,392 ----
// @pyswig int|OpenBackupEventLog|Opens a previously saved event log.
%name (OpenBackupEventLog) HANDLE OpenBackupEventLogW (
! WCHAR *INPUT_NULLOK, // @pyparm <o PyUnicode>|serverName||The server name, or None
! WCHAR *fileName // @pyparm <o PyUnicode>|fileName||The filename to open
);
Index: win32service.i
===================================================================
RCS file: /cvsroot/pywin32/pywin32/win32/src/win32service.i,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** win32service.i 30 Jul 2002 22:50:14 -0000 1.3
--- win32service.i 8 Nov 2003 12:34:45 -0000 1.4
***************
*** 45,57 ****
PyObject *obString = PySequence_GetItem(obDeps, i);
BSTR pStr;
! if (!PyWinObject_AsBstr(obString, &pStr)) {
Py_DECREF(obString);
goto cleanup;
}
! int len = SysStringLen(pStr);
_tcsncpy(p, pStr, len);
p += len;
*p++ = L'\0';
! SysFreeString(pStr);
Py_DECREF(obString);
}
--- 45,57 ----
PyObject *obString = PySequence_GetItem(obDeps, i);
BSTR pStr;
! if (!PyWinObject_AsTCHAR(obString, &pStr)) {
Py_DECREF(obString);
goto cleanup;
}
! int len = _tcslen(pStr);
_tcsncpy(p, pStr, len);
p += len;
*p++ = L'\0';
! PyWinObject_FreeTCHAR(pStr);
Py_DECREF(obString);
}
***************
*** 171,175 ****
}
pArgs[i] = NULL;
! PyWinObject_AsBstr(obString, pArgs+i);
Py_DECREF(obString);
}
--- 171,175 ----
}
pArgs[i] = NULL;
! PyWinObject_AsTCHAR(obString, pArgs+i);
Py_DECREF(obString);
}
***************
*** 182,186 ****
rc = PyWin_SetAPIError("StartService");
for (DWORD i=0;i<numStrings;i++)
! SysFreeString(pArgs[i]);
delete [] pArgs;
return rc;
--- 182,186 ----
rc = PyWin_SetAPIError("StartService");
for (DWORD i=0;i<numStrings;i++)
! PyWinObject_FreeTCHAR(pArgs[i]);
delete [] pArgs;
return rc;
***************
*** 432,442 ****
SC_HANDLE OpenService(
SC_HANDLE hSCManager, // @pyparm int|scHandle||Handle to the Service Control Mananger
! %val PyWin_AutoFreeBstr &inWideString, // @pyparm <o PyUnicode>|name||The name of the service to open.
unsigned long desiredAccess); // @pyparm int|desiredAccess||The access desired.
// @pyswig int|OpenSCManager|Returns a handle to the service control manager
SC_HANDLE OpenSCManager(
! %val PyWin_AutoFreeBstr &inNullWideString, // @pyparm <o PyUnicode>|machineName||The name of the computer, or None
! %val PyWin_AutoFreeBstr &inNullWideString, // @pyparm <o PyUnicode>|dbName||The name of the service database, or None
unsigned long desiredAccess); // @pyparm int|desiredAccess||The access desired.
--- 432,442 ----
SC_HANDLE OpenService(
SC_HANDLE hSCManager, // @pyparm int|scHandle||Handle to the Service Control Mananger
! TCHAR *name, // @pyparm <o PyUnicode>|name||The name of the service to open.
unsigned long desiredAccess); // @pyparm int|desiredAccess||The access desired.
// @pyswig int|OpenSCManager|Returns a handle to the service control manager
SC_HANDLE OpenSCManager(
! TCHAR *INPUT_NULLOK, // @pyparm <o PyUnicode>|machineName||The name of the computer, or None
! TCHAR *INPUT_NULLOK, // @pyparm <o PyUnicode>|dbName||The name of the service database, or None
unsigned long desiredAccess); // @pyparm int|desiredAccess||The access desired.
***************
*** 467,482 ****
%name (CreateService) PyObject * MyCreateService(
SC_HANDLE hSCManager, // @pyparm int|scHandle||handle to service control manager database
! %val PyWin_AutoFreeBstr &inWideString, // @pyparm <o PyUnicode>|name||Name of service
! %val PyWin_AutoFreeBstr &inWideString, // @pyparm <o PyUnicode>|displayName||Display name
DWORD dwDesiredAccess, // @pyparm int|desiredAccess||type of access to service
DWORD dwServiceType, // @pyparm int|serviceType||type of service
DWORD dwStartType, // @pyparm int|startType||When/how to start service
DWORD dwErrorControl, // @pyparm int|errorControl||severity if service fails to start
! %val PyWin_AutoFreeBstr &inWideString, // @pyparm <o PyUnicode>|binaryFile||name of binary file
! %val PyWin_AutoFreeBstr &inNullWideString, // @pyparm <o PyUnicode>|loadOrderGroup||name of load ordering group , or None
BOOL bFetchTag, // @pyparm int|bFetchTag||Should the tag be fetched and returned? If TRUE, the result is a tuple of (handle, tag), otherwise just handle.
PyObject *pyobject, // @pyparm [<o PyUnicode>,...]|serviceDeps||sequence of dependency names
! %val PyWin_AutoFreeBstr &inNullWideString, // @pyparm <o PyUnicode>|acctName||account name of service, or None
! %val PyWin_AutoFreeBstr &inNullWideString // @pyparm <o PyUnicode>|password||password for service account , or None
);
--- 467,482 ----
%name (CreateService) PyObject * MyCreateService(
SC_HANDLE hSCManager, // @pyparm int|scHandle||handle to service control manager database
! TCHAR *name, // @pyparm <o PyUnicode>|name||Name of service
! TCHAR *displayName, // @pyparm <o PyUnicode>|displayName||Display name
DWORD dwDesiredAccess, // @pyparm int|desiredAccess||type of access to service
DWORD dwServiceType, // @pyparm int|serviceType||type of service
DWORD dwStartType, // @pyparm int|startType||When/how to start service
DWORD dwErrorControl, // @pyparm int|errorControl||severity if service fails to start
! TCHAR *binaryFile, // @pyparm <o PyUnicode>|binaryFile||name of binary file
! TCHAR *INPUT_NULLOK, // @pyparm <o PyUnicode>|loadOrderGroup||name of load ordering group , or None
BOOL bFetchTag, // @pyparm int|bFetchTag||Should the tag be fetched and returned? If TRUE, the result is a tuple of (handle, tag), otherwise just handle.
PyObject *pyobject, // @pyparm [<o PyUnicode>,...]|serviceDeps||sequence of dependency names
! TCHAR *INPUT_NULLOK, // @pyparm <o PyUnicode>|acctName||account name of service, or None
! TCHAR *INPUT_NULLOK // @pyparm <o PyUnicode>|password||password for service account , or None
);
***************
*** 487,497 ****
DWORD dwStartType, // @pyparm int|startType||When/how to start service, or SERVICE_NO_CHANGE
DWORD dwErrorControl, // @pyparm int|errorControl||severity if service fails to start, or SERVICE_NO_CHANGE
! %val PyWin_AutoFreeBstr &inNullWideString, // @pyparm <o PyUnicode>|binaryFile||name of binary file, or None
! %val PyWin_AutoFreeBstr &inNullWideString, // @pyparm <o PyUnicode>|loadOrderGroup||name of load ordering group , or None
BOOL bFetchTag, // @pyparm int|bFetchTag||Should the tag be fetched and returned? If TRUE, the result is the tag, else None.
PyObject *pyobject, // @pyparm [<o PyUnicode>,...]|serviceDeps||sequence of dependency names
! %val PyWin_AutoFreeBstr &inNullWideString, // @pyparm <o PyUnicode>|acctName||account name of service, or None
! %val PyWin_AutoFreeBstr &inNullWideString, // @pyparm <o PyUnicode>|password||password for service account , or None
! %val PyWin_AutoFreeBstr &inNullWideString // @pyparm <o PyUnicode>|displayName||Display name
);
--- 487,497 ----
DWORD dwStartType, // @pyparm int|startType||When/how to start service, or SERVICE_NO_CHANGE
DWORD dwErrorControl, // @pyparm int|errorControl||severity if service fails to start, or SERVICE_NO_CHANGE
! TCHAR *INPUT_NULLOK, // @pyparm <o PyUnicode>|binaryFile||name of binary file, or None
! TCHAR *INPUT_NULLOK, // @pyparm <o PyUnicode>|loadOrderGroup||name of load ordering group , or None
BOOL bFetchTag, // @pyparm int|bFetchTag||Should the tag be fetched and returned? If TRUE, the result is the tag, else None.
PyObject *pyobject, // @pyparm [<o PyUnicode>,...]|serviceDeps||sequence of dependency names
! TCHAR *INPUT_NULLOK, // @pyparm <o PyUnicode>|acctName||account name of service, or None
! TCHAR *INPUT_NULLOK, // @pyparm <o PyUnicode>|password||password for service account , or None
! TCHAR *INPUT_NULLOK // @pyparm <o PyUnicode>|displayName||Display name
);
|
|
From: <mha...@us...> - 2003-11-08 12:29:01
|
Update of /cvsroot/pywin32/pywin32/win32/src
In directory sc8-pr-cvs1:/tmp/cvs-serv25242
Modified Files:
win32apimodule.cpp
Log Message:
Don't use BSTRs for WCHARs, especially now we have conversion functions
spelt WCHAR.
Index: win32apimodule.cpp
===================================================================
RCS file: /cvsroot/pywin32/pywin32/win32/src/win32apimodule.cpp,v
retrieving revision 1.31
retrieving revision 1.32
diff -C2 -d -r1.31 -r1.32
*** win32apimodule.cpp 7 Nov 2003 03:58:17 -0000 1.31
--- win32apimodule.cpp 8 Nov 2003 12:28:58 -0000 1.32
***************
*** 626,634 ****
}
else if (flags & FORMAT_MESSAGE_FROM_STRING) {
! if (!PyUnicode_Check(obSource)) {
! PyErr_SetString(PyExc_TypeError, "Flags has FORMAT_MESSAGE_FROM_STRING, but object not a Unicode object");
! goto cleanup;
! }
! if (!PyWinObject_AsBstr(obSource, &szSource))
goto cleanup;
pSource = (void *)szSource;
--- 626,630 ----
}
else if (flags & FORMAT_MESSAGE_FROM_STRING) {
! if (!PyWinObject_AsWCHAR(obSource, &szSource))
goto cleanup;
pSource = (void *)szSource;
***************
*** 655,659 ****
goto cleanup;
}
! if (!PyWinObject_AsBstr(subObject, pInserts+i)) {
goto cleanup;
}
--- 651,655 ----
goto cleanup;
}
! if (!PyWinObject_AsWCHAR(subObject, pInserts+i)) {
goto cleanup;
}
***************
*** 679,685 ****
if (pInserts) {
for (i=0;i<numInserts;i++)
! SysFreeString(pInserts[i]);
free(pInserts);
}
if (resultBuf)
LocalFree(resultBuf);
--- 675,682 ----
if (pInserts) {
for (i=0;i<numInserts;i++)
! PyWinObject_FreeWCHAR(pInserts[i]);
free(pInserts);
}
+ PyWinObject_FreeWCHAR(szSource);
if (resultBuf)
LocalFree(resultBuf);
***************
*** 3662,3666 ****
if ( PyInt_Check(obType) )
lpType = MAKEINTRESOURCEW(PyInt_AS_LONG((PyIntObject *)obType));
! else if (PyWinObject_AsBstr(obType, &lpType) )
bFreeType = TRUE;
else
--- 3659,3663 ----
if ( PyInt_Check(obType) )
lpType = MAKEINTRESOURCEW(PyInt_AS_LONG((PyIntObject *)obType));
! else if (PyWinObject_AsWCHAR(obType, &lpType) )
bFreeType = TRUE;
else
***************
*** 3670,3674 ****
if ( PyInt_Check(obName) )
lpName = MAKEINTRESOURCEW(PyInt_AS_LONG((PyIntObject *)obName));
! else if ( PyWinObject_AsBstr(obName, &lpName) )
bFreeName = TRUE;
else {
--- 3667,3671 ----
if ( PyInt_Check(obName) )
lpName = MAKEINTRESOURCEW(PyInt_AS_LONG((PyIntObject *)obName));
! else if ( PyWinObject_AsWCHAR(obName, &lpName) )
bFreeName = TRUE;
else {
***************
*** 3678,3683 ****
BOOL ok = UpdateResourceW(hUpdate, lpType, lpName, wLanguage, lpData, cbData);
! if (bFreeType) PyWinObject_FreeBstr(lpType);
! if (bFreeName) PyWinObject_FreeBstr(lpName);
if ( !ok )
return ReturnAPIError("UpdateResource");
--- 3675,3680 ----
BOOL ok = UpdateResourceW(hUpdate, lpType, lpName, wLanguage, lpData, cbData);
! if (bFreeType) PyWinObject_FreeWCHAR(lpType);
! if (bFreeName) PyWinObject_FreeWCHAR(lpName);
if ( !ok )
return ReturnAPIError("UpdateResource");
|
|
From: <mha...@us...> - 2003-11-08 12:18:44
|
Update of /cvsroot/pywin32/pywin32/SWIG/swig_lib/python
In directory sc8-pr-cvs1:/tmp/cvs-serv23371
Modified Files:
pywintypes.i
Log Message:
Use WCHAR converters for WCHAR functions, rather than BSTR (which happen
to be the same size, but...)
Index: pywintypes.i
===================================================================
RCS file: /cvsroot/pywin32/pywin32/SWIG/swig_lib/python/pywintypes.i,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** pywintypes.i 25 Nov 2002 11:12:09 -0000 1.2
--- pywintypes.i 8 Nov 2003 12:18:40 -0000 1.3
***************
*** 133,137 ****
%typemap(python,in) OLECHAR *, WCHAR *{
// Wide string code!
! if (!PyWinObject_AsBstr($source, &$target, FALSE))
return NULL;
}
--- 133,137 ----
%typemap(python,in) OLECHAR *, WCHAR *{
// Wide string code!
! if (!PyWinObject_AsWCHAR($source, &$target, FALSE))
return NULL;
}
***************
*** 140,144 ****
WCHAR *inNullWideString {
// Wide string code!
! if (!PyWinObject_AsBstr($source, &$target, TRUE))
return NULL;
}
--- 140,144 ----
WCHAR *inNullWideString {
// Wide string code!
! if (!PyWinObject_AsWCHAR($source, &$target, TRUE))
return NULL;
}
***************
*** 149,153 ****
%typemap(python,freearg) OLECHAR *, WCHAR *{
// Wide string cleanup
! SysFreeString($source);
}
--- 149,153 ----
%typemap(python,freearg) OLECHAR *, WCHAR *{
// Wide string cleanup
! PyWinObject_FreeWCHAR($source);
}
|
|
From: <mha...@us...> - 2003-11-08 12:13:42
|
Update of /cvsroot/pywin32/pywin32
In directory sc8-pr-cvs1:/tmp/cvs-serv22703
Modified Files:
setup_win32all_core.py
Log Message:
Get many more extensions building, including a few of the COM ones. Lots
of hacks to make things work - I'd be happy to see them replaced :)
Index: setup_win32all_core.py
===================================================================
RCS file: /cvsroot/pywin32/pywin32/setup_win32all_core.py,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** setup_win32all_core.py 7 Nov 2003 23:18:56 -0000 1.8
--- setup_win32all_core.py 8 Nov 2003 12:13:35 -0000 1.9
***************
*** 11,14 ****
--- 11,15 ----
import os, string, sys
+ # Python 2.2 has no True/False
try:
True; False
***************
*** 27,31 ****
undef_macros=None,
library_dirs=[],
! libraries=[],
runtime_library_dirs=None,
extra_objects=None,
--- 28,32 ----
undef_macros=None,
library_dirs=[],
! libraries="",
runtime_library_dirs=None,
extra_objects=None,
***************
*** 40,45 ****
include_dirs = ['com/win32com/src/include',
'win32/src'] + include_dirs
! libraries = ['user32', 'odbc32', 'advapi32', 'version',
! 'oleaut32', 'ole32', 'shell32'] + libraries
if export_symbol_file:
--- 41,45 ----
include_dirs = ['com/win32com/src/include',
'win32/src'] + include_dirs
! libraries=libraries.split()
if export_symbol_file:
***************
*** 86,89 ****
--- 86,117 ----
return result
+ class WinExt_win32(WinExt):
+ def __init__ (self, name, **kw):
+ if not kw.has_key("dsp_file"):
+ kw["dsp_file"] = "win32/" + name + ".dsp"
+ WinExt.__init__(self, name, **kw)
+ def get_pywin32_dir(self):
+ return "win32"
+
+ class WinExt_win32com(WinExt):
+ def __init__ (self, name, **kw):
+ if not kw.has_key("dsp_file"):
+ kw["dsp_file"] = "com/" + name + ".dsp"
+ kw["libraries"] = kw.get("libraries", "") + " oleaut32 ole32"
+ WinExt.__init__(self, name, **kw)
+ def get_pywin32_dir(self):
+ return "win32com/" + self.name
+
+ # 'win32com.mapi.exchange' and 'win32com.mapi.exchdapi' currently only
+ # ones with this special requirement
+ class WinExt_win32com_mapi(WinExt_win32com):
+ def get_pywin32_dir(self):
+ return "win32com/mapi"
+
+ # A hacky extension class for pywintypesXX.dll and pythoncomXX.dll
+ class WinExt_system32(WinExt):
+ def get_pywin32_dir(self):
+ return "system32"
+
################################################################
***************
*** 108,111 ****
--- 136,156 ----
self.libraries.append("stdc++")
+ def build_extensions(self):
+ # Is there a better way than this?
+ # Just one GUIDS.CPP and it gives trouble on mainwin too
+ # Maybe I should just rename the file, but a case-only rename is likely to be
+ # worse!
+ import distutils.msvccompiler
+ if ".CPP" not in self.compiler.src_extensions:
+ self.compiler._cpp_extensions.append(".CPP")
+ self.compiler.src_extensions.append(".CPP")
+ assert self.package is None
+ for ext in self.extensions:
+ try:
+ self.package = ext.get_pywin32_dir()
+ except AttributeError:
+ raise RuntimeError, "Not a win32 package!"
+ self.build_extension(ext)
+
def build_extension(self, ext):
# some source files are compiled for different extensions
***************
*** 149,158 ****
def get_ext_filename(self, name):
# The pywintypes and pythoncom extensions have special names
! if name == "pywintypes":
extra = self.debug and "_d.dll" or ".dll"
! return "pywintypes%d%d%s" % (sys.version_info[0], sys.version_info[1], extra)
! elif name == "pythoncom":
extra = self.debug and "_d.dll" or ".dll"
! return "pythoncom%d%d%s" % (sys.version_info[0], sys.version_info[1], extra)
return build_ext.get_ext_filename(self, name)
--- 194,203 ----
def get_ext_filename(self, name):
# The pywintypes and pythoncom extensions have special names
! if name == "system32.pywintypes":
extra = self.debug and "_d.dll" or ".dll"
! return "system32\pywintypes%d%d%s" % (sys.version_info[0], sys.version_info[1], extra)
! elif name == "system32.pythoncom":
extra = self.debug and "_d.dll" or ".dll"
! return "system32\pythoncom%d%d%s" % (sys.version_info[0], sys.version_info[1], extra)
return build_ext.get_ext_filename(self, name)
***************
*** 200,225 ****
################################################################
! pywintypes = WinExt('pywintypes',
dsp_file = r"win32\PyWinTypes.dsp",
! extra_compile_args = ['-DBUILD_PYWINTYPES']
)
! pythoncom = WinExt('pythoncom',
! dsp_file=r"com\win32com.dsp",
! export_symbol_file = 'com/win32com/src/PythonCOM.def',
! extra_compile_args = ['-DBUILD_PYTHONCOM'],
! )
- win32_extensions = []
for name, lib_names, is_unicode in (
("perfmon", "", True),
("win2kras", "rasapi32", False),
! ("win32api", "", False),
("win32file", "", False),
! ("win32event", "", False),
! ("win32clipboard", "gdi32", False),
! ("win32evtlog", "", False),
# win32gui handled below
! ("win32help", "htmlhelp", False),
("win32lz", "lz32", False),
("win32net", "netapi32", True),
--- 245,270 ----
################################################################
! pywintypes = WinExt_system32('pywintypes',
dsp_file = r"win32\PyWinTypes.dsp",
! extra_compile_args = ['-DBUILD_PYWINTYPES'],
! libraries = "advapi32 user32 ole32 oleaut32",
)
! win32_extensions = [pywintypes]
for name, lib_names, is_unicode in (
+ ("dbi", "", False),
+ ("mmapfile", "", False),
+ # ("odbc", "odbc32 odbccp32", False), # needs dbi - MH should clean this up
("perfmon", "", True),
+ ("timer", "user32", False),
("win2kras", "rasapi32", False),
! ("win32api", "user32 advapi32 shell32 version", False),
("win32file", "", False),
! ("win32event", "user32", False),
! ("win32clipboard", "gdi32 user32 shell32", False),
! ("win32evtlog", "advapi32", False),
# win32gui handled below
! ("win32help", "htmlhelp user32 advapi32", False),
("win32lz", "lz32", False),
("win32net", "netapi32", True),
***************
*** 227,236 ****
("win32pipe", "", False),
# win32popenWin9x later
! ("win32print", "winspool", False),
! ("win32process", "", False),
! ("win32ras", "rasapi32", False),
! ("win32security", "", True),
! ("win32service", "", True),
! ("win32trace", "", False),
("win32wnet", "netapi32 mpr", False),
):
--- 272,281 ----
("win32pipe", "", False),
# win32popenWin9x later
! ("win32print", "winspool user32", False),
! ("win32process", "advapi32 user32", False),
! ("win32ras", "rasapi32 user32", False),
! ("win32security", "advapi32 user32", True),
! ("win32service", "advapi32", True),
! ("win32trace", "advapi32", False),
("win32wnet", "netapi32 mpr", False),
):
***************
*** 239,268 ****
if is_unicode:
extra_compile_args = ['-DUNICODE', '-D_UNICODE', '-DWINNT']
! ext = WinExt(name,
! dsp_file = "win32\\" + name + ".dsp",
! libraries=lib_names.split(),
extra_compile_args = extra_compile_args)
win32_extensions.append(ext)
# The few that need slightly special treatment
win32_extensions += [
! WinExt("win32gui",
! dsp_file=r"win32\\win32gui.dsp",
! libraries=["gdi32", "comdlg32", "comctl32"],
extra_compile_args=["-DWIN32GUI"]
),
! WinExt('servicemanager',
extra_compile_args = ['-DUNICODE', '-D_UNICODE',
'-DWINNT', '-DPYSERVICE_BUILD_DLL'],
dsp_file = r"win32\Pythonservice servicemanager.dsp")
]
################################################################
! setup(name="PyWinTypes",
version="version",
description="Python for Window Extensions",
long_description="",
author="Mark Hammond (et al)",
! author_email = "mha...@sk...",
! url="http://starship.python.net/crew/mhammond/",
license="PSA",
cmdclass = { #'install_lib': my_install_lib,
--- 284,344 ----
if is_unicode:
extra_compile_args = ['-DUNICODE', '-D_UNICODE', '-DWINNT']
! ext = WinExt_win32(name,
! libraries=lib_names,
extra_compile_args = extra_compile_args)
win32_extensions.append(ext)
# The few that need slightly special treatment
win32_extensions += [
! WinExt_win32("win32gui",
! libraries="gdi32 user32 comdlg32 comctl32 shell32",
extra_compile_args=["-DWIN32GUI"]
),
! WinExt_win32('servicemanager',
extra_compile_args = ['-DUNICODE', '-D_UNICODE',
'-DWINNT', '-DPYSERVICE_BUILD_DLL'],
+ libraries = "user32 ole32 advapi32 shell32",
dsp_file = r"win32\Pythonservice servicemanager.dsp")
]
+
+ # The COM modules.
+ pythoncom = WinExt_system32('pythoncom',
+ dsp_file=r"com\win32com.dsp",
+ libraries = "oleaut32 ole32 user32",
+ export_symbol_file = 'com/win32com/src/PythonCOM.def',
+ extra_compile_args = ['-DBUILD_PYTHONCOM'],
+ )
+ com_extensions = [pythoncom]
+ com_extensions += [
+ # WinExt_win32com('adsi'), # bullshit "extern IID" issues :(
+ WinExt_win32com('axcontrol'),
+ WinExt_win32com('axscript',
+ dsp_file=r"com\Active Scripting.dsp",
+ extra_compile_args = ['-DPY_BUILD_AXSCRIPT'],
+ ),
+ # WinExt_win32com('axdebug', # bullshit "extern IID" issues :(
+ # dsp_file=r"com\Active Debugging.dsp",
+ # ),
+ WinExt_win32com('internet'),
+ WinExt_win32com('mapi', libraries="mapi32"),
+ WinExt_win32com_mapi('exchange',
+ libraries="""MBLOGON ADDRLKUP mapi32 exchinst
+ EDKCFG EDKUTILS EDKMAPI
+ ACLCLS version""",
+ extra_link_args=["/nodefaultlib:libc"]),
+ WinExt_win32com_mapi('exchdapi',
+ libraries="""DAPI ADDRLKUP exchinst EDKCFG EDKUTILS
+ EDKMAPI mapi32 version""",
+ extra_link_args=["/nodefaultlib:libc"]),
+ WinExt_win32com('shell', libraries='shell32')
+ ]
################################################################
! setup(name="pywin32",
version="version",
description="Python for Window Extensions",
long_description="",
author="Mark Hammond (et al)",
! author_email = "mha...@us...",
! url="http://sourceforge.net/projects/pywin32/",
license="PSA",
cmdclass = { #'install_lib': my_install_lib,
***************
*** 270,274 ****
},
! ext_modules = [pywintypes, pythoncom] + win32_extensions,
## packages=['win32',
--- 346,350 ----
},
! ext_modules = win32_extensions + com_extensions,
## packages=['win32',
|
|
From: <mha...@us...> - 2003-11-08 05:53:54
|
Update of /cvsroot/pywin32/pywin32/win32/src
In directory sc8-pr-cvs1:/tmp/cvs-serv333
Modified Files:
PyUnicode.cpp
Log Message:
Avoid blindly casting PyUNICODE to wchar_t - use Python's
PyUnicode_AsWideChar to do the right thing if the types aren't
the same (which it does).
Index: PyUnicode.cpp
===================================================================
RCS file: /cvsroot/pywin32/pywin32/win32/src/PyUnicode.cpp,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -d -r1.17 -r1.18
*** PyUnicode.cpp 7 Nov 2003 03:58:17 -0000 1.17
--- PyUnicode.cpp 8 Nov 2003 05:53:50 -0000 1.18
***************
*** 921,926 ****
// copy the value, including embedded NULLs
#if defined(PYWIN_USE_PYUNICODE)
! wchar_t *v = (wchar_t *)PyUnicode_AS_UNICODE(stringObject);
! *pResult = SysAllocStringLen(v, PyUnicode_GET_SIZE(stringObject));
#else
BSTR v = ((PyUnicode *)stringObject)->m_bstrValue;
--- 921,935 ----
// copy the value, including embedded NULLs
#if defined(PYWIN_USE_PYUNICODE)
! int nchars = PyUnicode_GET_SIZE(stringObject);
! *pResult = SysAllocStringLen(NULL, nchars);
! if (*pResult) {
! PyUnicode_AsWideChar((PyUnicodeObject *)stringObject, *pResult, nchars);
! // The SysAllocStringLen docs indicate that nchars+1 bytes are allocated,
! // and that normally a \0 is appened by the function. It also states
! // the \0 is not necessary! While it seems to work fine without it,
! // we do copy it, as the previous code, which used SysAllocStringLen
! // with a non-NULL arg is documented clearly as appending the \0.
! (*pResult)[nchars] = 0;
! }
#else
BSTR v = ((PyUnicode *)stringObject)->m_bstrValue;
|
|
From: <mha...@us...> - 2003-11-08 05:38:22
|
Update of /cvsroot/pywin32/pywin32/com/win32com/src/include In directory sc8-pr-cvs1:/tmp/cvs-serv31208 Modified Files: stdafx.h Log Message: Pull in pywintypes.h in the pre-compiled header, so any magic needed before python.h/windows.h gets done. Index: stdafx.h =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/src/include/stdafx.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** stdafx.h 10 Jan 2003 02:48:43 -0000 1.2 --- stdafx.h 8 Nov 2003 05:38:17 -0000 1.3 *************** *** 9,18 **** #define _WIN32_DCOM ! #include <limits.h> ! ! #include <Python.h> ! ! #ifndef MS_WINCE // win32 wont need that soon? ! // Must come after Python headers. ! #include <windows.h> ! #endif --- 9,12 ---- #define _WIN32_DCOM ! // PyWinTypes.h pulls in Python.h and windows.h. ! #include <PyWinTypes.h> |
|
From: <mha...@us...> - 2003-11-08 05:28:52
|
Update of /cvsroot/pywin32/pywin32/com/win32comext/axscript/src In directory sc8-pr-cvs1:/tmp/cvs-serv29819 Modified Files: GUIDS.CPP Log Message: Correct my correction of the case of the #include file Index: GUIDS.CPP =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/axscript/src/GUIDS.CPP,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** GUIDS.CPP 2 Nov 2003 10:00:32 -0000 1.3 --- GUIDS.CPP 8 Nov 2003 05:28:49 -0000 1.4 *************** *** 19,23 **** // === Project Guids === ! #include "GUIDS.h" // NOTE - The standard "activscp.h" header is not good enough - // need to use IE4 SDK or MSVC6 etc --- 19,23 ---- // === Project Guids === ! #include "GUIDS.H" // NOTE - The standard "activscp.h" header is not good enough - // need to use IE4 SDK or MSVC6 etc |
|
From: <mha...@us...> - 2003-11-08 05:23:56
|
Update of /cvsroot/pywin32/pywin32/com/win32comext/axscript/src
In directory sc8-pr-cvs1:/tmp/cvs-serv29194
Modified Files:
GUIDS.H
Log Message:
Fix: warning: no newline at end of file
Index: GUIDS.H
===================================================================
RCS file: /cvsroot/pywin32/pywin32/com/win32comext/axscript/src/GUIDS.H,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** GUIDS.H 1 Sep 1999 23:12:45 -0000 1.1
--- GUIDS.H 8 Nov 2003 05:23:49 -0000 1.2
***************
*** 22,24 ****
{ 0xdf630910, 0x1c1d, 0x11d0, { 0xae, 0x36, 0x8c, 0xf, 0x5e, 0x0, 0x0, 0x0 } };
! #endif
\ No newline at end of file
--- 22,24 ----
{ 0xdf630910, 0x1c1d, 0x11d0, { 0xae, 0x36, 0x8c, 0xf, 0x5e, 0x0, 0x0, 0x0 } };
! #endif
|
|
From: <mha...@us...> - 2003-11-08 02:02:00
|
Update of /cvsroot/pywin32/pywin32/com/win32com/src
In directory sc8-pr-cvs1:/tmp/cvs-serv5438
Modified Files:
PyRecord.cpp PythonCOM.cpp
Log Message:
Cast literal -1 to their correct unsigned type to avoid gcc warnings.
Index: PyRecord.cpp
===================================================================
RCS file: /cvsroot/pywin32/pywin32/com/win32com/src/PyRecord.cpp,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** PyRecord.cpp 20 Oct 2003 04:48:26 -0000 1.9
--- PyRecord.cpp 8 Nov 2003 02:01:55 -0000 1.10
***************
*** 390,394 ****
for (i = 0; i < num_names && s != NULL; i++) {
char *name;
! if (PyWin_WCHAR_AsString(strings[i], -1, &name)) {
if (i > 0)
PyString_Concat(&s, comma);
--- 390,394 ----
for (i = 0; i < num_names && s != NULL; i++) {
char *name;
! if (PyWin_WCHAR_AsString(strings[i], (DWORD)-1, &name)) {
if (i > 0)
PyString_Concat(&s, comma);
***************
*** 444,448 ****
PyErr_Clear();
WCHAR *wname;
! if (!PyWin_String_AsWCHAR(name, -1, &wname))
return NULL;
--- 444,448 ----
PyErr_Clear();
WCHAR *wname;
! if (!PyWin_String_AsWCHAR(name, (DWORD)-1, &wname))
return NULL;
***************
*** 519,523 ****
WCHAR *wname;
! if (!PyWin_String_AsWCHAR(name, -1, &wname))
return -1;
--- 519,523 ----
WCHAR *wname;
! if (!PyWin_String_AsWCHAR(name, (DWORD)-1, &wname))
return -1;
***************
*** 552,556 ****
ret = 0;
char *name;
! if (PyWin_WCHAR_AsString(strings[i], -1, &name)) {
PyObject *self_sub = PyRecord::tp_getattr(self, name);
if (self_sub) {
--- 552,556 ----
ret = 0;
char *name;
! if (PyWin_WCHAR_AsString(strings[i], (DWORD)-1, &name)) {
PyObject *self_sub = PyRecord::tp_getattr(self, name);
if (self_sub) {
Index: PythonCOM.cpp
===================================================================
RCS file: /cvsroot/pywin32/pywin32/com/win32com/src/PythonCOM.cpp,v
retrieving revision 1.25
retrieving revision 1.26
diff -C2 -d -r1.25 -r1.26
*** PythonCOM.cpp 31 Oct 2003 04:34:36 -0000 1.25
--- PythonCOM.cpp 8 Nov 2003 02:01:55 -0000 1.26
***************
*** 285,289 ****
if (obAuthSvc==NULL)
! cAuthSvc = -1;
else if (PySequence_Check(obAuthSvc)) {
cAuthSvc = 0;
--- 285,289 ----
if (obAuthSvc==NULL)
! cAuthSvc = (DWORD)-1;
else if (PySequence_Check(obAuthSvc)) {
cAuthSvc = 0;
|
|
From: <mha...@us...> - 2003-11-08 00:56:40
|
Update of /cvsroot/pywin32/pywin32/win32/src
In directory sc8-pr-cvs1:/tmp/cvs-serv27873
Modified Files:
PythonService.cpp
Log Message:
Autoduck corrections for the servicemanager module.
Index: PythonService.cpp
===================================================================
RCS file: /cvsroot/pywin32/pywin32/win32/src/PythonService.cpp,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** PythonService.cpp 25 Oct 2003 05:53:01 -0000 1.9
--- PythonService.cpp 8 Nov 2003 00:56:36 -0000 1.10
***************
*** 421,426 ****
}
! // @module servicemanager|A module built in to PythonService.exe (and therefore only available to Python service programs).
! // <nl>The module <o win32service> provides other service facilities.
static struct PyMethodDef servicemanager_functions[] = {
{"CoInitializeEx", PyCoInitializeEx, 1}, // @pymeth CoInitializeEx|
--- 421,430 ----
}
! // @module servicemanager|A module that interfaces with the Windows Service Control Manager. While this
! // module can be imported by regular Python programs, it is only useful when used by a Python program
! // hosting a service - and even then is generally used automatically by the Python Service framework.
! // See the pipeTestService sample for an example of using this module.
! // <nl>The module <o win32service> and <o win32serviceutil> provide other facilities for controlling
! // and managing services.
static struct PyMethodDef servicemanager_functions[] = {
{"CoInitializeEx", PyCoInitializeEx, 1}, // @pymeth CoInitializeEx|
|
|
From: <mha...@us...> - 2003-11-08 00:43:51
|
Update of /cvsroot/pywin32/pywin32/com/win32comext/axscript/client
In directory sc8-pr-cvs1:/tmp/cvs-serv26125
Modified Files:
framework.py
Log Message:
If the axdebug module doesn't exist, gracefully continue to work without
debugging support.
Index: framework.py
===================================================================
RCS file: /cvsroot/pywin32/pywin32/com/win32comext/axscript/client/framework.py,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -d -r1.18 -r1.19
*** framework.py 19 Mar 2003 02:06:26 -0000 1.18
--- framework.py 8 Nov 2003 00:43:46 -0000 1.19
***************
*** 554,557 ****
--- 554,558 ----
import traceback
try:
+ import win32com.axdebug.axdebug # see if the core exists.
import debug
self.debugManager = debug.DebugManager(self)
***************
*** 560,563 ****
--- 561,567 ----
# seen on the target system
trace("Debugging interfaces not available - debugging is disabled..")
+ self.debugManager = None
+ except ImportError:
+ trace("Debugging extensions (axdebug) module does not exist - debugging is disabled..")
self.debugManager = None
except:
|
|
From: <mha...@us...> - 2003-11-08 00:42:45
|
Update of /cvsroot/pywin32/pywin32/com/win32com/server
In directory sc8-pr-cvs1:/tmp/cvs-serv25928
Modified Files:
policy.py
Log Message:
Add a bit of a hacky helper for when your COM object does not specify
the correct number of arguments - previously, the TypeError exception
wasn't that useful about telling you exactly what function it was trying
to call and with what - now we print the repr() of the function and
args before re-raising the type error.
Index: policy.py
===================================================================
RCS file: /cvsroot/pywin32/pywin32/com/win32com/server/policy.py,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** policy.py 1 Jun 2003 12:51:51 -0000 1.14
--- policy.py 8 Nov 2003 00:42:41 -0000 1.15
***************
*** 539,543 ****
raise COMException(scode=winerror.DISP_E_MEMBERNOTFOUND)
# Should check callable here
! return func(*args)
if wFlags & DISPATCH_PROPERTYGET:
--- 539,550 ----
raise COMException(scode=winerror.DISP_E_MEMBERNOTFOUND)
# Should check callable here
! try:
! return func(*args)
! except TypeError, v:
! # Particularly nasty is "wrong number of args" type error
! # This helps you see what 'func' and 'args' actually is
! if str(v).index("arguments")>=0:
! print "** TypeError calling function %r(%r)" % (func, args)
! raise
if wFlags & DISPATCH_PROPERTYGET:
|