Python for the Windows users in us
through out the years python has grown up from an alternative to perl to a serioulsy powerful langugae. one that rivals all other langugages around, beacuse of its simplicity, ease to read, and downright extensible feautre set. because of this and just how dynamic the langauge is, its one of the languages i recommend to all sysdevs and devops personel to learn. one of the big reasons windows users stayed away form this was because of the non-native windows solutions. this no longer is an issue. python is just as first class on windows as it is on linux. To simplyfy alot of the setup i scrippted this out using chocolately (that reminds me. I think my script has gotten big enough that i really need to modularize it. More to come in the future)
for the direct link to the script
https://github.com/msanda/freshsystem/blob/master/chocolatelysetupscript.ps1
for those that want to know what i am doing stay tuned.
Set-ExecutionPolicy Unrestricted
Chocolatey
iwr https://chocolatey.org/install.ps1 -UseBasicParsing | iex
choco install github --force --force-dependencies -y
choco install git --force --force-dependencies -y
choco install poshgit --force --force-dependencies -y
choco install visualstudiocode --force --force-dependencies -ypython code editor. comment it out if you dont need it. i prefer vscode either way
choco install pycharm-professional --force --force-dependencies -y
to be installed if writing python specific code
choco install python --force --force-dependencies -y
choco install ctags --force --force-dependencies -y
python -m pip install --upgrade pip
pip install pylintMake SSH directory in you user space
mkdir $env:USERPROFILE.ssh
restart Computer after everything has been installed
shutdown /r /t 0 /d P:0:0
All that happens above is to setup your environment to get python binaries and install on your local machine. once this is done just start your editor and install plugins..
Since i use vscode there are 3 plugins i use for python development.
Python extension
Code Runner
dev skim
auto pep
if you are using virtual environments then you will need to edit your user settings with
// Place your settings in this file to overwrite default and user settings.
{
"python.pythonPath": "${workspaceRoot}/venv/bin/python",
"python.formatting.formatOnSave": true,
}
these tools are all awesome and should get you setup with code coverage as well as linting. be sure to also select file -> Auto save. this will allow automatic code linting as you progress