Skip to main content

Home/ Mac Attack/ Group items tagged package

Rss Feed Group items tagged

Benjamin Bandt-Horn

The Architecture of Open Source Applications: Python Packaging - 0 views

  • There are two schools of thought when it comes to installing applications
  • each application is its own standalone "appliance", and installing and removing them should not disturb the rest of the OS. If the application needs an uncommon library, that library is included in the application's distribution
  • a collection of small self-contained units called packages
  • ...8 more annotations...
  • Libraries are bundled into packages
  • Self-contained applications also make the developer's life easier when she needs to support several operating systems. Some projects go so far as to release portable applications that remove any interaction with the hosting system by working in a self-contained directory, even for log files.
  • Fellowship of the Packaging
  • In Python a package is a directory containing Python files. Python files are called modules. That definition makes the usage of the word "package" a bit vague since it is also used by many systems to refer to a release of a project.
  • use the term "Python packages" when we talk about a directory containing Python modules
  • The term "release" is used to define one version of a project
  • "distribution" defines a source or a binary distribution of a release as something like a tarball or zip file
  • advanced tools like Setuptools, which add features on the top of it, or Distribute, a fork of Setuptools. There's also Pip, a more advanced installer, that relies on Setuptools
  •  
    There are two schools of thought when it comes to installing applications
Benjamin Bandt-Horn

Python Package Structure with Unit Testing, Injection and Mocking - Dev Notes - 0 views

  • This describes setting up a professional Python project with a real package structure, injection and tests.
  • Since you are intended to run .py files directly, Python projects should not have source (src) or binary (bin) folders
  • For the same reason, the test folder should not be separate.  It should be a package in the main project
  • ...3 more annotations...
  • Example
  • You should specify exactly one class per file.  It makes your code easier to find and read.
  • Injection is essential for unit tests
  •  
    This describes setting up a professional Python project with a real package structure, injection and tests.
Benjamin Bandt-Horn

PyX - Python graphics package - 0 views

  • PyX is a Python package for the creation of PostScript and PDF files. It combines an abstraction of the PostScript drawing model with a TeX/LaTeX interface. Complex tasks like 2d and 3d plots in publication-ready quality are built out of these primitives.
  •  
    PyX is a Python package for the creation of PostScript and PDF files. It combines an abstraction of the PostScript drawing model with a TeX/LaTeX interface. Complex tasks like 2d and 3d plots in publication-ready quality are built out of these primitives.
Benjamin Bandt-Horn

The Python Computer Graphics Kit - 0 views

  • The Python Computer Graphics Kit is an Open Source software package containing a collection of Python modules, plugins and utilities that are meant to be useful for any domain where you have to deal with 3D data of any kind, be it for visualization, creating photorealistic images, Virtual Reality or even games.
  • Provides access to specialized input hardware such as SpaceMouse/SpaceBall, data glove or tablet via wrappers around the 3DxWare SDK by 3Dconnexion, the Wintab Developer Kit by LCS/Telegraphics and the Data Glove SDK by Fifth Dimension Technologies.
  •  
    The Python Computer Graphics Kit is an Open Source software package containing a collection of Python modules, plugins and utilities that are meant to be useful for any domain where you have to deal with 3D data of any kind, be it for visualization, creating photorealistic images, Virtual Reality or even games.
Benjamin Bandt-Horn

Python 3D Software - 0 views

  •  
    A small collection (94 packages) of pointers to Python software for working in three dimensions
Benjamin Bandt-Horn

25.2. doctest - Test interactive Python examples - Python v2.7.6 documentation - 0 views

  • common ways to use doctest: To check that a module’s docstrings are up-to-date by verifying that all interactive examples still work as documented. To perform regression testing by verifying that interactive examples from a test file or a test object work as expected. To write tutorial documentation for a package, liberally illustrated with input-output examples. Depending on whether the examples or the expository text are emphasized, this has the flavor of “literate testing” or “executable documentation”.
  • Running the module as a script causes the examples in the docstrings to get executed and verified
  • The file content is treated as if it were a single giant docstring; the file doesn’t need to contain a Python program! For example, perhaps example.txt contains this
  • ...8 more annotations...
  • You can instruct the Python interpreter to run the doctest module directly from the standard library and pass the file name(s) on the command line:
  • if M.__test__ exists and “is true”, it must be a dict, and each entry maps a (string) name to a function object, class object, or string
  • Which Docstrings Are Examined?
  • Any expected output must immediately follow the final '>>> ' or '... ' line containing the code, and the expected output (if any) extends to the next '>>> ' or all-whitespace line.
  • Execution Context?
  • Directives
  • Whitespace is not allowed between the + or - and the directive option name. The directive option name can be any of the option flag names explained above
  • Unittest
  •  
    Freaking Amazing.
Benjamin Bandt-Horn

PyQT Tutorial - 0 views

  • a much better way to write GUI apps in Python is to use Trolltech's QT Designer to WYSIWYG-ly create a nice-looking interface, and then automatically generate the necessary code for it with pyuic (which is a UI compiler for QT that comes with the PyQT package.)
1 - 7 of 7
Showing 20 items per page