Please here after the typical list of addition packages I'm using.
Most of same are compliant with pip download installation mode:
pip install <package> or
<installation directory>\python.exe -m pip install <package>
As on Windows download pip lxml installation may failed, use the file pip installation mode:
C:\Apps\Python36>python.exe -m pip install <download path location>\lxml-3.7.1-cp36-cp36m-win_amd64.whl
Three install solutions are availble:
pypiwin32a pip compliant version of pywin32 but at time I'm writing this lines only the 2.19 is available where the official package is now available in version 2.20
= installation issue workaround = If the install package complains to not find any Python36 amd64 installation, try using the source package
= installation from source package =
SET PATH=<python.exe directory path>;%PATH%
C:\Apps\Python36\pywin32-220>python setup3.py -q install
> python setup3.pl install Converting... Executing... Building pywin32 18.104.22.168 Traceback (most recent call last): File "setup3.py", line 16, in <module> exec(str(got)) File "<string>", line 1944, in <module> File "<string>", line 594, in __init__ File "C:\Apps\Python36\lib\ntpath.py", line 75, in join path = os.fspath(path) TypeError: expected str, bytes or os.PathLike object, not NoneType
Setup.py is looking for Visual Studio SDK and is not able to find it (I got this with Visual Studio 15), to workaorinf this you have to manually set the MsSdk environment variable.
SET MSSdk=c:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\
-qto have detailled build) information
SET PYTHONDIR=C:\Apps\Python36 SET PATH=%PYTHONDIR%;%PATH% # CD %PYTHONDIR%\pywin32-220 # SET MSSdk=c:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\ # python setup3.py -q build # python setup3.py -q install
<note tip> If you don't understand why you should not modify a line, DON'T MODIFY IT! </note>
Don't modify a line just to make it nicer, better, what ever justification you want, until there is a declared issue or an enhancement or task assigned to you linked with the line.
<note warning> In any case, Keep it simple </note>
Do what I say, Don't do what I do.
A comment is there to explain the code not to rephrase it.
Comment shall not contradict the code, update the comment with the code.
Always use DocStrings for Files, Class and functions comment block.
DocString section is for user of the element not for developper/maintainer. It shall explain how to use the class/function, not how it has been developped.
Use standard comment immediatly of SocString section for developper/maintainer comments explaining design trick of a class/function.
Python 3.7 is the preferred Python version. If Python2 is required use Python 2.7.<latest>
Follow the Python development guidelines described in PEP008 with the following adaptations
Use Pylint to check to compliance of your code AND FIX ALL WARNINGS.
Justification is required when you disable a checker.
Configure your editor to replace TAB character by 4 spaces. If your editor is not enable to replace automatically, don't use TAB or better change your editor to another one.
Make sure your environment is configured to use only 'UTF-8'.
# -- coding:UTF-8 --
Make your Python2 code compliant with Python3 by inserting at least : (from Python pour la rentrée 2019 — partie 2)
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from builtins import * from future import standard_library standard_library.install_aliases()
Always use 4 spaces indentation except for function arguments indentation.(see PEP008)
str only for internal 7 bits characters string or
Python3: Use only
bytes for bytes storage.
QString only for Qt API functions and methods, convert results as soon as possible to
unicode to be compliant for Python functions.
For all other strings use
unicode only strings.
Python 2: Any class MUST inherit directly or indirectly from ``object``.
Use ``self`` to identify instance parameter and ``cls`` for class related parameter.