win32ctypes

https://ci.appveyor.com/api/projects/status/62xqtrro26gw3l4x/branch/master?svg=true https://codecov.io/github/enthought/pywin32-ctypes/coverage.svg?branch=master Documentation Status

A reimplementation of pywin32 that is pure python. The default behaviour will try to use cffi (>= 1.3.0), if available, and fall back to using ctypes. Please note that there is no need to have a compiler available on installation or at runtime.

Usage

Example:

# Equivalent to 'import win32api' from pywin32.
from win32ctypes.pywin32 import win32api

win32api.LoadLibraryEx(sys.executable, 0, win32api.LOAD_LIBRARY_AS_DATAFILE)

Note

Currently pywin32ctypes implements only a very small subset of pywin32, for internal needs at Enthought. We do welcome additional features and PRs, though.

Development setup

The following should be good enough:

pip install -r dev_requirements.txt
python install -e

Note

  • While pywin32-ctypes should regularly be tested on windows, you can also develop/test on unix by using wine

Change Log

Version 0.2.0

  • Fix syntax error when installing in python 3.7 (#81).
  • Support testing on python 3.7 (#82).
  • Support testing on python 3.3 and python 3.4 (#77).
  • Do not use 2to3 (#75).
  • Support lazy wrapping of win32 functions (#67).
  • Add CRED_PERSIST constants (#79 contributed by @tivnet).

Version 0.1.2

(bugfix release)

  • Fix implementation for the deprecated api (#64).

Version 0.1.1

(bugfix release)

  • Update Manifest.in entries (#63)
  • fix VERSION path in Manifest.in (#62 contributed by @MinchinWeb)

Version 0.1.0

  • Update tests and provide better compatibility with pywin32 for Resource functions
  • Fix: Python 3.5 and 3.6 support (#52).
  • API additions to allow pywin32-ctypes to work with pyinstaller (#46 and #57 contributed by @virtuald).
  • Fix: do not update the global copy of the windows dlls (#42)
  • Add documentation and setup automatic builds in ReadTheDocs (#3, #36).
  • Add cffi backend to be used when available (#31).
  • Fix: EnumResourceTypes and EnumResourceNames would only return ints (#21, #30).
  • Restructure package layout to split core wrapping modules from pywin32 emulation (#15, #17).

Version 0.0.1

7/04/2014

  • Python 2.6 support (#13)
  • Python 3 support (#12)
  • Basic maintenance work (#11, #7)
  • Fix error raising to be pywin32 compatible (#8)
  • Package rename mini_pywin32 -> pywin32-ctypes
  • Add travis-ci integration using wine! (#2)
  • Support basic library and resource loading (#1)
  • mini_pywin32 is born

LICENSE

This software is OSI Certified Open Source Software. OSI Certified is a certification mark of the Open Source Initiative.

Copyright (c) 2014, Enthought, Inc. All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  • Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  • Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
  • Neither the name of Enthought, Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Indices and tables