Created
December 11, 2017 10:01
-
-
Save ilkka/24b6554567e9fcee3f54a40fe03b7011 to your computer and use it in GitHub Desktop.
Script for creating/updating shim PowerShell scripts that transparently run your Python scripts.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Just drop this in the 'Scripts' directory in your virtualenv and run it. | |
$Dir = Split-Path ((Get-Variable MyInvocation).Value).MyCommand.Path | |
$Scripts = Get-ChildItem $Dir | Where-Object {($_.name -match '\.py$') -and ($_.name -notmatch '^activa | |
te')} | |
foreach ($Script in $Scripts) { | |
Write-Output "python $($Script.Fullname) @args" | Out-File ($Script.Fullname -replace '\.py$','.ps1') | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment