Python

pip

Freeze dependencies:
1
$ pip freeze --local [-r requirements.txt] > requirements.txt
Copied!

Linting

flake8

1
$ python3 -m flake8 --ignore=W191,E501,E722 somefile.py
Copied!

pylint

1
$ python3 -m pylint --disable=W0311,C0301,R0912,R0915,C0103,C0114,R0903 --msg-template='{msg_id}:{line:3d},{column:2d}:{obj}:{msg}' somefile.py
Copied!

PyPI

twine

1
$ python setup.py sdist bdist_wheel [--bdist-dir ~/temp/bdistwheel]
2
$ twine check dist/*
3
$ twine upload --repository-url https://test.pypi.org/legacy/ dist/*
4
$ twine upload dist/*
Copied!

Misc

Fix Python 2.7 Registry

1
Windows Registry Editor Version 5.00
2
​
3
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Python\PythonCore\2.7]
4
​
5
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Python\PythonCore\2.7\Help]
6
​
7
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Python\PythonCore\2.7\Help\MainPythonDocumentation]
8
@="C:\\Python27\\Doc\\python26.chm"
9
​
10
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Python\PythonCore\2.7\InstallPath]
11
@="C:\\Python27\\"
12
​
13
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Python\PythonCore\2.7\InstallPath\InstallGroup]
14
@="Python 2.7"
15
​
16
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Python\PythonCore\2.7\Modules]
17
​
18
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Python\PythonCore\2.7\PythonPath]
19
@="C:\\Python27\\Lib;C:\\Python27\\DLLs;C:\\Python27\\Lib\\lib-tk"
Copied!