Unpacking Software Livestream

Join our monthly Unpacking Software livestream to hear about the latest news, chat and opinion on packaging, software deployment and lifecycle management!

Learn More

Chocolatey Product Spotlight

Join the Chocolatey Team on our regular monthly stream where we put a spotlight on the most recent Chocolatey product releases. You'll have a chance to have your questions answered in a live Ask Me Anything format.

Learn More

Chocolatey Coding Livestream

Join us for the Chocolatey Coding Livestream, where members of our team dive into the heart of open source development by coding live on various Chocolatey projects. Tune in to witness real-time coding, ask questions, and gain insights into the world of package management. Don't miss this opportunity to engage with our team and contribute to the future of Chocolatey!

Learn More

Calling All Chocolatiers! Whipping Up Windows Automation with Chocolatey Central Management

Webinar from
Wednesday, 17 January 2024

We are delighted to announce the release of Chocolatey Central Management v0.12.0, featuring seamless Deployment Plan creation, time-saving duplications, insightful Group Details, an upgraded Dashboard, bug fixes, user interface polishing, and refined documentation. As an added bonus we'll have members of our Solutions Engineering team on-hand to dive into some interesting ways you can leverage the new features available!

Watch On-Demand
Chocolatey Community Coffee Break

Join the Chocolatey Team as we discuss all things Community, what we do, how you can get involved and answer your Chocolatey questions.

Watch The Replays
Chocolatey and Intune Overview

Webinar Replay from
Wednesday, 30 March 2022

At Chocolatey Software we strive for simple, and teaching others. Let us teach you just how simple it could be to keep your 3rd party applications updated across your devices, all with Intune!

Watch On-Demand
Chocolatey For Business. In Azure. In One Click.

Livestream from
Thursday, 9 June 2022

Join James and Josh to show you how you can get the Chocolatey For Business recommended infrastructure and workflow, created, in Azure, in around 20 minutes.

Watch On-Demand
The Future of Chocolatey CLI

Livestream from
Thursday, 04 August 2022

Join Paul and Gary to hear more about the plans for the Chocolatey CLI in the not so distant future. We'll talk about some cool new features, long term asks from Customers and Community and how you can get involved!

Watch On-Demand
Hacktoberfest Tuesdays 2022

Livestreams from
October 2022

For Hacktoberfest, Chocolatey ran a livestream every Tuesday! Re-watch Cory, James, Gary, and Rain as they share knowledge on how to contribute to open-source projects such as Chocolatey CLI.

Watch On-Demand

Downloads:

19,578

Downloads of v 219.0:

17,936

Last Update:

24 Aug 2014

Package Maintainer(s):

Software Author(s):

  • Mark Hammond

Tags:

python windows extensions

Python for Windows Extensions

  • 1
  • 2
  • 3

219.0 | Updated: 24 Aug 2014

Downloads:

19,578

Downloads of v 219.0:

17,936

Maintainer(s):

Software Author(s):

  • Mark Hammond

Python for Windows Extensions 219.0

Legal Disclaimer: Neither this package nor Chocolatey Software, Inc. are affiliated with or endorsed by Mark Hammond. The inclusion of Mark Hammond trademark(s), if any, upon this webpage is solely to identify Mark Hammond goods or services and not for commercial purposes.

  • 1
  • 2
  • 3

Some Checks Have Failed or Are Not Yet Complete

Not All Tests Have Passed


Validation Testing Unknown


Verification Testing Failed

Details

Scan Testing Successful:

No detections found in any package files

Details
Learn More

Deployment Method: Individual Install, Upgrade, & Uninstall

To install Python for Windows Extensions, run the following command from the command line or from PowerShell:

>

To upgrade Python for Windows Extensions, run the following command from the command line or from PowerShell:

>

To uninstall Python for Windows Extensions, run the following command from the command line or from PowerShell:

>

Deployment Method:

NOTE

This applies to both open source and commercial editions of Chocolatey.

1. Enter Your Internal Repository Url

(this should look similar to https://community.chocolatey.org/api/v2/)


2. Setup Your Environment

1. Ensure you are set for organizational deployment

Please see the organizational deployment guide

2. Get the package into your environment

  • Open Source or Commercial:
    • Proxy Repository - Create a proxy nuget repository on Nexus, Artifactory Pro, or a proxy Chocolatey repository on ProGet. Point your upstream to https://community.chocolatey.org/api/v2/. Packages cache on first access automatically. Make sure your choco clients are using your proxy repository as a source and NOT the default community repository. See source command for more information.
    • You can also just download the package and push it to a repository Download

3. Copy Your Script

choco upgrade pywin32 -y --source="'INTERNAL REPO URL'" [other options]

See options you can pass to upgrade.

See best practices for scripting.

Add this to a PowerShell script or use a Batch script with tools and in places where you are calling directly to Chocolatey. If you are integrating, keep in mind enhanced exit codes.

If you do use a PowerShell script, use the following to ensure bad exit codes are shown as failures:


choco upgrade pywin32 -y --source="'INTERNAL REPO URL'" 
$exitCode = $LASTEXITCODE

Write-Verbose "Exit code was $exitCode"
$validExitCodes = @(0, 1605, 1614, 1641, 3010)
if ($validExitCodes -contains $exitCode) {
  Exit 0
}

Exit $exitCode

- name: Install pywin32
  win_chocolatey:
    name: pywin32
    version: '219.0'
    source: INTERNAL REPO URL
    state: present

See docs at https://docs.ansible.com/ansible/latest/modules/win_chocolatey_module.html.


chocolatey_package 'pywin32' do
  action    :install
  source   'INTERNAL REPO URL'
  version  '219.0'
end

See docs at https://docs.chef.io/resource_chocolatey_package.html.


cChocoPackageInstaller pywin32
{
    Name     = "pywin32"
    Version  = "219.0"
    Source   = "INTERNAL REPO URL"
}

Requires cChoco DSC Resource. See docs at https://github.com/chocolatey/cChoco.


package { 'pywin32':
  ensure   => '219.0',
  provider => 'chocolatey',
  source   => 'INTERNAL REPO URL',
}

Requires Puppet Chocolatey Provider module. See docs at https://forge.puppet.com/puppetlabs/chocolatey.


4. If applicable - Chocolatey configuration/installation

See infrastructure management matrix for Chocolatey configuration elements and examples.

WARNING

This package was submitted prior to moderation and has not been approved. While it is likely safe for you, there is more risk involved.

Description

Additional documentation can be found at ActiveState

http://docs.activestate.com/activepython/2.7/pywin32/PyWin32.HTML


tools\chocolateyInstall.ps1
$package = 'PyWin32'
$build = '219'

try {
  # python.exe should be in PATH based on
  #simulate the unix command for finding things in path
  #http://stackoverflow.com/questions/63805/equivalent-of-nix-which-command-in-powershell
  function Which([string]$cmd)
  {
    Get-Command -ErrorAction "SilentlyContinue" $cmd |
      Select -ExpandProperty Definition
  }


  # Use PYTHONHOME if it exists, or fallback to 'Where' to search PATH
  if ($Env:PYTHONHOME) { $localPython = Join-Path $Env:PYTHONHOME 'python.exe' }

  if (!$Env:PYTHONHOME -or !(Test-Path $localPython))
    { $localPython = Which python.exe }

  if (!(Test-Path $localPython))
  {
    Write-ChocolateyFailure 'PyWin32 requires a Python runtime to install'
    return
  }

  $pythonRoot = Split-Path $localPython

  $sitePackages = (Join-Path (Join-Path $pythonRoot 'Lib') 'site-packages')
  if (!(Test-Path $sitePackages))
  {
    Write-ChocolateyFailure 'Could not find Python site-packages directory'
    return
  }

  $7zip = Which 7z.exe
  # guess that a bad install didn't put it in PATH
  if (!$7zip)
  {
    $7zip = $Env:ProgramFiles, ${Env:ProgramFiles(x86)} |
      % { Join-Path (Join-Path $_ '7-zip') '7z.exe' } |
      ? { Test-Path $_ } |
      Select -First 1
  }
  if (!(Test-Path $7zip))
  {
    Write-ChocolateyFailure 'PyWin32 requires 7zip to silently install'
    return
  }

  $pythonVersion = &$localPython --version 2>&1

  $simpleVersion = $pythonVersion |
    Select-String -Pattern '^.*\s+(\d\.\d)(\.\d+){0,1}$' |
    % { $_.Matches.Groups[1].Value }

  # http://www.jordanrinke.com/2011/06/22/pywin32-silent-install/

  $destination = Join-Path $Env:Temp "pywin32-$build.$simpleVersion.exe"
  $params = @{
    packageName = $package;
    fileFullPath = $destination;
    url = "http://sourceforge.net/projects/pywin32/files/pywin32/Build%20$build/pywin32-$build.win32-py$simpleVersion.exe/download";
    url64bit = "http://sourceforge.net/projects/pywin32/files/pywin32/Build%20$build/pywin32-$build.win-amd64-py$simpleVersion.exe/download";
  }

  # no special 64-bit for these python versions
  if ('2.5', '2.4', '2.3' -contains $simpleVersion)
  {
    $params.url64bit = $params.url
  }

  Get-ChocolateyWebFile @params

  $pyWin32Temp = Join-Path $Env:Temp 'pywin32-temp'
  &$7zip x $destination "-o$pyWin32Temp"

  'PLATLIB', 'SCRIPTS' |
    % { Join-Path $pywin32Temp $_ } |
    Get-ChildItem |
    Move-Item -Destination $sitePackages

  # some files are copied to c:\windows\system32
  $installPyWin32Script = @"
  Push-Location '$sitePackages'
  &'$localPython' pywin32_postinstall.py `-install
  Remove-Item .\pywin32_postinstall.py
"@

  Start-ChocolateyProcessAsAdmin $installPyWin32Script

  $pyWin32Temp, $destination |
    Remove-Item -Recurse -ErrorAction SilentlyContinue

  Write-ChocolateySuccess $package
} catch {
  Write-ChocolateyFailure $package "$($_.Exception.Message)"
  throw
}

Log in or click on link to see number of positives.

In cases where actual malware is found, the packages are subject to removal. Software sometimes has false positives. Moderators do not necessarily validate the safety of the underlying software, only that a package retrieves software from the official distribution point and/or validate embedded software against official distribution point (where distribution rights allow redistribution).

Chocolatey Pro provides runtime protection from possible malware.

Add to Builder Version Downloads Last Updated Status
Python for Windows Extensions 218.0 1642 Sunday, November 4, 2012 Unknown

Since build 218:

  • win32com.mapi
    Addded outlook interface IConverterSession with methods MIMEToMAPI,
    MAPIToMIMEStm, and SetAdrBook.
    Added method OpenStreamOnFile (Nick Czeczulin)
    Ignore PT_MV_TSTRING along with PT_TSTRING (Nick Czeczulin)

  • Conversions from a Python object to a variant now does a better job
    at deciding what variant type to use, taking into account the
    size and sign of the value (Stefan Schukat via patch #127)

  • Add support for VT_I8 and VT_UI8 when converting a variant into a
    Python object (Stefan Schukat via patch #128)

  • win32com.mapi.exchange
    Added 64-bit support by excluding the 32-bit Ex2kSdk.lib functions
    from 64-bit builds. Unfortunately, this means that only
    IExchangeManageStore::CreateStoreEntryID is currently available in a
    64-bit build. (Nick Czeczulin)

  • adodbapi updated to version 2.6 -- new examples folder includes short
    programs for reading and writing .xls spreadsheets and reading ACCESS
    .mdb files using SQL. New functions .is64bit.Python() and
    is64bit.os() to help pick the correct drivers.
    New function .schema_table.names() returns a list of all tables in a
    database.
    Ability for a Windows computer to be a database proxy for a remote
    (Linux or Windows) unit.
    see adodbapi/README.txt for more information.

  • Fix issue implementing COM objects from within a virtualenv (Kevin
    Smyth via issue #3597965)

  • Fix some issues using decimal objects with Python 3.3 and later
    (rupole)

  • Add a counterpart to VB's Nothing, from patch 3609027 by Stefan
    Schukat

  • win32api
    Handle REG_QWORD (64-bit ints) (rupole)
    Add GetEnvironmentVariableW and SetEnvironmentVariableW (rupole)
    Fix function pointer check for win32api.GetNativeSystemInfo
    (bug#665)

  • win32com.shell
    Add interfaces IFileOperation and IFileOperationProgressSink
    Add SHParseDisplayName (feature req #3585998) (rupole)

  • win32com.propsys
    Add interfaces IPropertyChange, IPropertyChangeArray, and
    IObjectWithPropertyKey
    Add functions PSCreateSimplePropertyChange,
    PSCreatePropertyChangeArray, and SHSetDefaultProperties

  • win32crypt
    Add functions and objects for handling certificates and certificate
    stores

  • win32gui
    Add RegisterHotKey (rupole)

  • win32evtlog
    Add several more Evt* functions (Vista+ event log API)

  • win32prociess
    Add EnumProcessModulesEx (feature request 3608155) (rupole)

  • pythonwin
    Fix a hang using the tools menu

Since build 218:

  • win32com.shell
    Add interfaces IFileOperation and IFileOperationProgressSink

  • win32com.propsys
    Add interfaces IPropertyChange, IPropertyChangeArray, and IObjectWithPropertyKey
    Add functions PSCreateSimplePropertyChange, PSCreatePropertyChangeArray, and SHSetDefaultProperties

Since build 217:

  • mapiutil.py GetPropTagName has been modified to return the fully qualified
    PT_UNICODE and PT_STRING8 type name. Added optional argument to override
    rawType default in GetMapiTypeName. (Nick Czeczulin)

  • Fix the count of replaced terms in Pythonwin's search/replace (rupole).

  • Fix obscure issues in the Pythonwin code browser and other uses of the
    "hierlist" widget (rupole).

  • Fix a crash using a COM "record" that holds an array (rupole).

  • Fix error return in win32gui.GetClassName (rupole).

  • Some misc fixed to win32timezone (Jason R. Coombs).

  • Some fixes to win32com gencache for Python 3.x (Tim Golden)

  • Fix ActiveScript exception hresults.

  • RegQueryValueEx now return an empty list for blank REG_MULTI_SZ
    (rupole via bug #3531456)

  • Add win32pdh.AddEnglishCounter (rupole via feature request #3529527)

  • Fix post_install script use of the registry (rupole via bug #3536122)

  • Python 3.3 version is built with VS2010.

  • win32com.shell - added function SHCreateStreamOnFileEx and
    interfaces IShellItem2, IEnumShellItems, IApplicationDocumentLists,
    IApplicationDestinations, ITaskbarList, IEnumObjects,
    IKnownFolder, IKnownFolderManager, IObjectArray, IObjectCollection,
    ICustomDestinationList, and IShellLibrary; enhance SHAddToRecentDocs.

  • win32com.propsys - Many Property System interfaces and functions added

  • pythoncom - added StgCreateStorageEx

  • win32com.client -
    Fix iteration of objects that don't declare an enumerator in their typelib
    Validate syntax of constants written to makepy generated files

  • win32file - Add GetFileInformationByHandleEx, ReOpenFile and OpenFileById,
    SetFileInformationByHandle. SetFileTime() has an extra param to allow UTC
    time to be specified.

  • win32api - Allow UpdateResource to remove a resource

Since build 216:

  • ISAPI extension works with Python 3.x

  • Python service module will now have their directory added to the start
    of sys.path rather than the end to avoid cryptic error messages if a
    module of the same name is already on the path (rvolpe via #3194663)

  • Various Pythonwin autocomplete enhancements (kxroberto via #3468282 and
    Oliver Tengler via #3433953)

  • The Pythonwin editor now remembers previous searches made in this session.
    (patch #3468280 from kxroberto).

  • The LOGFONT struct implementation (win32util) was extended to support the
    full LOGFONT struct as published by Microsoft. This includes changes to
    win32util.LogFontToDict and win32util.DictToLogFont. (Feature request
    3433757 by Kris Hardy)

  • Remove some duplicated menu code from pythonwin which should avoid
    having py2exe pulling in most of the pythonwin framework in some cases
    (patch 3433527 from kxroberto.)

  • A new win32com.client.VARIANT object can be used for advanced control over
    the parameter types passed to some COM methods. See the documentation in
    win32com/HTML/variant.html (also included in the help file)

  • The win32com.adsi and win32com.mapi packages have been upgraded to work on
    Python 3.x and as a result, there is a slight risk that regressions to
    these packages have been introduced in the Python 2.x versions. Please
    file a bug if any problems are found.

  • Pythonwin now warns, but allows you to continue, when saving a file with
    an invalid encoding line (bug 3139486)

  • Fix win32com.client.WithEvents on py3k (bug 3199843)

  • When passing integers/unsigned integers to COM objects which did not fit
    into 32bits, OverflowErrors were silently discarded and -1 was silently
    passed. This has been fixed for signed integers (an OverflowError is now
    raised) and unsigned integers now allow for values with the high-bit set to
    be passed correctly.

  • Fix win32com.client.WithEvents() on py3k.

  • makepy may have generated syntax errors if 'helpstring' elements in typelibs
    had strange quoting or slashes (bug 3199631)

  • Fixed that in some cases win32file.GetOpenFileName and GetSaveFileName
    could have returned trailing garbage after an embedded NULL character.
    (bug 3277647)

  • Some functions which accepted a DWORD did not accept long integers which
    fit in 32bits with the most signficant bit set (eg, 0x80000000).

  • Source-code management moved from CVS to Mercurual.

  • win32com.shell - Added SHCreateShellItem and fixed some 64bit issues.

  • win32evtlog - Added some of the new event log functions introduced in
    Vista/Windows 7

  • win32service - Added EnumServicesStatusEx, and support startup type
    "delayed" for Python services

  • win32net - Fix a problem with NetFileEnum on 64-bit (bug #3376041)


Discussion for the Python for Windows Extensions Package

Ground Rules:

  • This discussion is only about Python for Windows Extensions and the Python for Windows Extensions package. If you have feedback for Chocolatey, please contact the Google Group.
  • This discussion will carry over multiple versions. If you have a comment about a particular version, please note that in your comments.
  • The maintainers of this Chocolatey Package will be notified about new comments that are posted to this Disqus thread, however, it is NOT a guarantee that you will get a response. If you do not hear back from the maintainers after posting a message below, please follow up by using the link on the left side of this page or follow this link to contact maintainers. If you still hear nothing back, please follow the package triage process.
  • Tell us what you love about the package or Python for Windows Extensions, or tell us what needs improvement.
  • Share your experiences with the package, or extra configuration or gotchas that you've found.
  • If you use a url, the comment will be flagged for moderation until you've been whitelisted. Disqus moderated comments are approved on a weekly schedule if not sooner. It could take between 1-5 days for your comment to show up.
comments powered by Disqus