TGTGInsighttelegram intelligenceLIVE / telegram public index
← Python Заметки

TGINSIGHT SIMILAR POSTS

Најди сличен содржај

Изворен канал @pythonotes · Post #345 · 9 окт.

Функция dir() - удобна для получения списка атрибутов у любого объекта. Ранее я писал про функцию __dir__() в модуле (не путайте её с переменной __all__(), которая указывает список объектов для импорта если встречается конструкция from module import *). Скорее всего вы уже знаете как использовать функцию dir(). Любой объект может реализовать метод __dir__() чтобы указать список имеющийхся и динамических атрибутов. И функция dir() поможет получить список этих атрибутов. >>> dir(str) ['__add__', '__class__', '__contains__', ...] У этой функции есть еще один способ применения. Её можно вызвать без аргумента, и в таком случае она вернёт список имён в текущем неймспейсе. >>> dir() ['__builtins__', '__doc__', '__file__', ...] >>> def test(): >>> x = 1 >>> print(dir()) >>> test() ['x'] #basic#tricks

Резултати

Пронајдени 3 слични објави

Пребарај: #packages

当前筛选 #packages清除筛选
djangoproject

@djangoproject · Post #131 · 01.09.2016 г., 03:27

http://www.lfd.uci.edu/~gohlke/pythonlibs/ This page provides 32- and 64-bit Windows binaries of many scientific open-source extension #packages for the official #CPython distribution of the #Python programming language. The files are unofficial (meaning: informal, unrecognized, personal, unsupported, no warranty, no liability, provided "as is") and made available for testing and evaluation purposes.

djangoproject

@djangoproject · Post #225 · 15.01.2017 г., 07:15

http://www.pyinstaller.org/ #PyInstaller is a program that #freezes (#packages) Python programs into #stand_alone#executables, under Windows, Linux, Mac OS X, FreeBSD, Solaris and AIX. Its main advantages over similar tools are that PyInstaller works with Python 2.7 and 3.3—3.5, it builds smaller executables thanks to transparent compression, it is fully multi-platform, and use the OS support to load the dynamic libraries, thus ensuring full compatibility.

djangoproject

@djangoproject · Post #535 · 28.12.2017 г., 10:12

https://docs.pipenv.org/ #Pipenv — the officially recommended #Python#packaging tool from Python.org, free (as in freedom). Pipenv is a tool that aims to bring the best of all packaging worlds (#bundler, #composer, #npm, #cargo, #yarn, etc.) to the Python world. #Windows is a first–class citizen, in our world. It automatically creates and manages a #virtualenv for your projects, as well as adds/removes #packages from your #Pipfile as you install/uninstall packages. It also generates the ever–important Pipfile.lock, which is used to produce deterministic builds.