Disclaimer
Keep in mind, my usage of python is limited to a basic functionality (simple scripts/small programs) helpful in DevOps daily workflow. If you are 100% Python Developer, invest some money in good quality IDE - saved time would surely return cost a few fold.
Why PyCharm?
It is possible to use almost anything for the development: Notepad++, Vim, Eclipse, Idle, VS Code etc. but by far the easiest (in regards of out of the box experience) is PyCharm. Community Edition became de facto standard for new (and experienced) users with all of IDE’s sluggishness and sprinkles of the top.
What about WSL?
Python (and in my opinion except C#) all other languages development is painful experience on Windows. If you can’t use natively Linux, WSL is interesting (and more powerful than cygwin/msys2) alternative.
JetBrains PyCharm (and probably other family members) allow to write code ’normally’ in Windows IDE but execute them in WSL environment. Setup is straightforward and well documented but the issue is licensing. Also from me perspective filesystem/project navigation become messy and unintuitive.
As a remedy for that, we can try to run GUI application from WSL using display server hosted on Windows machine (using internal network).
Steps:
- Install VcXsrv
- Setup:
- display 0
- disable access control
- Download and setup manually PyCharm inside WSL
- Set variable:
export DISPLAY=<IP>:0
- Open work directory and run PyCharm from CLI
Wait a few seconds (first run can take longer) and new IDE windows should open.
Make changes permanent: VcXsrc autostart, DISPLAY variable.
Marek Pawlak