最近在開發 Auth Module 的時候有用到 Unix Timestamp 來做驗證,原先我的開發環境都是在 Container 下所以時區都是 UTC+0
不過自己寫的小工具是在 UTC+8 的環境開發,於是乎學習到了 Python 的 bug (feature)…
瀏覽標籤:
Python
[Python] 修改在 Visual Studio Code 中 autopep8 的單行長度設定
通常在寫 code 的時候都會使用 formater 去自動排版程式碼,在 Python 中我用了 autopep8 實現排版的動作,但個人覺得預設單行長度只有 80 太短了排出來很醜,那就來自己調整吧!
[Python] Windows 下安裝 pyopenssl 時出現錯誤
緊接著 [Python] Windows 下安裝 pycrypto 時出現錯誤 又遇到個問題是在安裝 pyopenssl 的時候噴了下面的錯誤
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.24.28314\bin\HostX86\x86\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\git\App\venv\include -IC:\Users\lex_xu\AppData\Local\Programs\Python\Python38-32\include -IC:\Users\lex_xu\AppData\Local\Programs\Python\Python38-32\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.24.28314\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.24.28314\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\cppwinrt" /Tcbuild\temp.win32-3.8\Release\_openssl.c /Fobuild\temp.win32-3.8\Release\build\temp.win32-3.8\Release\_openssl.obj _openssl.c build\temp.win32-3.8\Release\_openssl.c(546): fatal error C1083: Cannot open include file: 'openssl/opensslv.h': No such file or directory error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\VC\\Tools\\MSVC\\14.24.28314\\bin\\HostX86\\x86\\cl.exe' failed with exit status 2 ---------------------------------------- Running setup.py clean for cryptography Failed to build cryptography Failed building wheel for cryptography Could not build wheels for cryptography which use PEP 517 and cannot be installed directly