Skip to main content

Home/ Mac Attack/ Group items tagged library

Rss Feed Group items tagged

Benjamin Bandt-Horn

gevent: A coroutine-based network library for Python - 0 views

  • gevent is a coroutine-based Python networking library that uses greenlet to provide a high-level synchronous API on top of the libev event loop. Features include: Fast event loop based on libev (epoll on Linux, kqueue on FreeBSD). Lightweight execution units based on greenlet. API that re-uses concepts from the Python standard library (for example there are Events and Queues). Cooperative sockets with SSL support » DNS queries performed through threadpool or c-ares. Monkey patching utility to get 3rd party modules to become cooperative »
  •  
    gevent is a coroutine-based Python networking library that uses greenlet to provide a high-level synchronous API on top of the libev event loop. Features include: Fast event loop based on libev (epoll on Linux, kqueue on FreeBSD). Lightweight execution units based on greenlet. API that re-uses concepts from the Python standard library (for example there are Events and Queues). Cooperative sockets with SSL support » DNS queries performed through threadpool or c-ares. Monkey patching utility to get 3rd party modules to become cooperative »
Benjamin Bandt-Horn

Chapter 1. python 2.0 - 1.55.0 - 0 views

  • The Boost Python Library is a framework for interfacing Python and C++. It allows you to quickly and seamlessly expose C++ classes functions and objects to Python, and vice-versa, using no special tools -- just your C++ compiler. It is designed to wrap C++ interfaces non-intrusively, so that you should not have to change the C++ code at all in order to wrap it, making Boost.Python ideal for exposing 3rd-party libraries to Python. The library's use of advanced metaprogramming techniques simplifies its syntax for users, so that wrapping code takes on the look of a kind of declarative interface definition language (IDL).
  •  
    The Boost Python Library is a framework for interfacing Python and C++. It allows you to quickly and seamlessly expose C++ classes functions and objects to Python, and vice-versa, using no special tools -- just your C++ compiler. It is designed to wrap C++ interfaces non-intrusively, so that you should not have to change the C++ code at all in order to wrap it, making Boost.Python ideal for exposing 3rd-party libraries to Python. The library's use of advanced metaprogramming techniques simplifies its syntax for users, so that wrapping code takes on the look of a kind of declarative interface definition language (IDL).
Benjamin Bandt-Horn

Gosu (library) - Wikipedia, the free encyclopedia - 0 views

  •  
    Gosu is an open source 2D game development library for the Ruby and C++ programming languages, available for Mac OS X, Windows and Linux. The C++ version is also available for iPhone and iPad.
Benjamin Bandt-Horn

Binary Search Tree library in Python | Laurent Luce's Blog - 0 views

  • This article is about a Python library I created to manage binary search trees. I will go over the following: Node class Insert method Lookup method Delete method Print method Comparing 2 trees Generator returning the tree elements one by one
  • https://laurentluce@github.com/laurentluce/python-algorithms.git
  • binary search tree
  • ...5 more annotations...
  • Delete method
  • There are 3 possibilities to handle: 1- The node to remove has no child. 2- The node to remove has 1 child. 3- The node to remove has 2 children.
  • look for its successor by going right then left until we reach a leaf
  • if node is None:
  • ‘A’ < ‘B’ is True in Python.
  •  
    This article is about a Python library I created to manage binary search trees. I will go over the following: Node class Insert method Lookup method Delete method Print method Comparing 2 trees Generator returning the tree elements one by one
Benjamin Bandt-Horn

Fox toolkit - Wikipedia, the free encyclopedia - 0 views

  • The FOX toolkit is an open source, cross-platform widget toolkit, that is, a library of basic elements for building a graphical user interface (GUI). FOX stands for Free Objects for X.
  • FOX differentiates itself in the following way from other cross-platform toolkits: Tk is a cross-platform toolkit but does not have all of the widgets that FOX considers desirable. Qt had a different licensing model, which might have required a commercial license in some cases where FOX would not. (This is no longer the case starting with Qt 4.5.) wxWidgets promotes the use of native widgets on each supported platform. FLTK is a fast, low-footprint library that supports rapid application development, and requires less code to use, but lacks advanced widgets. All of these toolkits have some support for programming natively on Mac OS and/or Mac OS X platforms, which FOX currently does not support[
  •  
    The FOX toolkit is an open source, cross-platform widget toolkit, that is, a library of basic elements for building a graphical user interface (GUI). FOX stands for Free Objects for X.
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

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.)
Benjamin Bandt-Horn

Rapid GUI Programming with Python and Qt - 0 views

  • From PyQt4.6, PyQt has two APIs, API#1 (the original), and API#2 (new). API#2 is more Pythonic and eliminates QString and QVariant, and is a bit nicer to use. API#1 remains best for those using PyQt to prototype C++/Qt applications. API#1 is the default for PyQt4.x with Python 2.x, and for PyQt4.0-4.5 with Python 3.x. API#2 is the default for PyQt4.6+ with Python 3.x, and for PySide.
  • most of the changes affect uses of QDataStream, QSettings, and QTextStream, and of course any use of QString methods (since in API#2, QString is gone, so we use str).
  • To convert any particular example to PySide the steps are as follows: Replace python3 in the first line with python. Add the following statements before the first import: from __future__ import division from __future__ import print_function from future_builtins import * Replace PyQt4 with PySide throughout (e.g., in the imports) If using Python 2.6 replace {} in format strings with {0}, {1}, etc., as appropriate. Add [0] at the end of every QFileDialog.*() function call. (In PyQt these return a—possibly empty—filename; in PySide they return a filename–filter 2-tuple, but all the examples only need the filename.) Replace QT_VERSION_STR with qVersion(). Replace PYQT_VERSION_STR with PySide.__version__; you will also need to add import PySide in the imports after the future imports. Replace @pyqtSignature with @Slot. Replace def isAlive(qobj): ... with def isAlive(qobj): return True. (There is currently no PySide equivalent.) Replace chr with unichr.
Benjamin Bandt-Horn

Tornado (web server) - Wikipedia, the free encyclopedia - 0 views

  • Tornado is a scalable, non-blocking web server and web application framework written in Python.
  •  
    Tornado is a scalable, non-blocking web server and web application framework written in Python.
Benjamin Bandt-Horn

gameobjects - Algorithms for games and realtime applications - Google Project Hosting - 0 views

  •  
    Game Objects is a collection of 2D and 3D maths classes, and algorithms for helping in the creation of games with Python. Suitable for PyGame, but independent of it.
Benjamin Bandt-Horn

Invent With Python ~ Chapter 1 - 0 views

  • Pygame only supports Python 2 and not Python 3. However, the programs in this book work with both Python 2 and 3.
  •  
    Installing Python and PyGame
Benjamin Bandt-Horn

http://inventwithpython.com/pygame/chapter2.html - 0 views

  • Setting Up a Pygame Program
  •  
    Setting Up a Pygame Program
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

IntegratingPythonWithOtherLanguages - Python Wiki - 0 views

  • ActiveState research Python for .NET is a near-seamless integration of the CPython runtime with the .NET Common Language Runtime (CLR). IronPython is an implementation of Python for .net, which allows you to import .net class libraries seamlessly in Python.
Benjamin Bandt-Horn

3. Data model - Python v2.6.6 documentation - 0 views

  • it is advised to somehow mix together (e.g. using exclusive or) the hash values for the components of the object that also play a part in comparison of objects.
  • If a class does not define a __cmp__() or __eq__() method it should not define a __hash__() operation either
  • Called when an attribute lookup has not found the attribute in the usual places (i.e. it is not an instance attribute nor is it found in the class tree for self). name is the attribute name. This method should return the (computed) attribute value or raise an AttributeError exception.
  • ...2 more annotations...
  • new-style classes
  • By default, instances of both old and new-style classes have a dictionary for attribute storage
  •  
    special method names
1 - 16 of 16
Showing 20 items per page