public marks

PUBLIC MARKS from pvergain with tag python

November 2007

CodeInvestigator - Python

There is a Python version of CodeInvestigator to debug your Python scripts with. The user interface is through a web browser. For this you need: * Python. Version 2.5 and over. * A Firefox browser

Programming Language Popularity

by 1 other (via)
We have attempted to collect a variety of data about the relative popularity of programming languages, mostly out of curiousity. To some degree popularity does matter - however it is clearly not the only thing to take into account when choosing a programming language. Most experienced programmers should be able to learn the basics of a new language in a week, and be productive with it in a few more weeks, although it will likely take much longer to truly master it.

October 2007

Veusz: a scientific plotting package written in Python.

Veusz is a scientific plotting package written in Python. It uses PyQt (Wiki) and Numpy. Veusz is designed to produce publication-ready Postscript output.

Mastering Oracle Python, Part 3: Data Parsing

There are countless reasons for parsing data, as well as tools and techniques to do it. But even the "right" tool may be insufficient when you need to do something new with the data. The same concerns exist for the integration of heterogeneous data sources. Sooner or later, the right tool for the right job happens to be a programming language. Oracle offers some very powerful utilities for loading, processing, and unloading data. SQL*Loader, Data Pump, external tables, Oracle Text, regular expressions—it's all there. Yet there is often a need to do things outside the database (or, trivially, perhaps you just weren't granted the necessary database privileges). Python delivers possibilities for efficient data parsing at a high level. The extensive standard library and many modules available for free on the Internet make it possible to work with data logic rather than dissecting bytes by hand.

Mastering Oracle Python, Part 2: Working with Times and Dates

Starting with the Python 2.4 release, cx_Oracle handles DATE and TIMESTAMP datatypes natively, mapping values of such columns to Python datetime objects from the datetime module. This offers certain advantages as datetime objects support arithmetic operations in-place. Built-in time zone support and several dedicated modules make Python a real time machine. The transition between Python and Oracle date/time datatypes is completely transparent to developers thanks to cx_Oracle's mapping mechanisms. Python developers might find Oracle's date arithmetic a bit odd at first, but only with a few tips it becomes completely clear and very reasonable. This part of the series will give you an in-depth understanding of date arithmetic from both Oracle and Python's point of view. Each of them offers rich support for handling date/time datatypes, so it is the programmer's choice which one to rely on. If you tend to put application logic inside the database or whether you prefer to encapsulate date/time operations in the application itself, the seamless integration of Oracle with Python offers you maximum flexibility with limited programming effort.

Mastering Oracle Python, Part 1: Querying Best Practices

Among the core principles of Python's way of doing things there is a rule about having high-level interfaces to APIs. The Database API (in this case the Oracle API) is one example. Using the cx_Oracle Python module from Computronix, you can take command over the Oracle query model while maintaining compatibility with Python Database API Specification v2.0. The model of querying databases using DB API 2.0 remains consistent for all client libraries conforming to the specification. On top of this, Anthony Tuininga, the principal developer of cx_Oracle, has added a wide set of properties and methods that expose Oracle-specific features to developers. It is absolutely possible to use only the standard methods and forget about the "extra" ones, but in this installment you won't be doing that. The concept of universal database wrappers might work in some cases but at the same time, you lose all the optimizations that the RDBMS offers.

August 2007

Geniusql python ORM

Geniusql is a public domain, low-level Object-Relational Mapper for Python applications. If you're familiar with Martin Fowler's work, you can think of Geniusql as providing a Data Source layer. It primarily uses a generic Table Data Gateway architecture (as opposed to the more tightly-coupled Active Record architecture recently popularized by Ruby On Rails and Django). If you want a more powerful solution, we recommend skipping Active Record and going straight to a Data Mapper like Dejavu. Dejavu uses Geniusql behind the scenes for RDBMS back ends, but allows you to mix and match them with RAM, filesystem, and other stores.

Python instead of Matlab for plotting?

A few years ago I «fell in love» with Python , which is a dynamically typed interactive, object oriented scripting language. With a few extensions I found it very suitable for efficient visualization and problem solving in Scientific computing. So can it replace Matlab? For me its pretty close! For you? It depends on your needs, but have a look! Why I use Python * Python is a small, high level scripting language that sits on top of a efficient C library. Because of this, Python code is compact, and the resulting code can run at a speed close to C if the computationally intensive parts are done via library calls. * Short learning curve - I was almost instantly productive. * Python can be used interactively (like matlab), and documentation for most functions can be accessed via a built in help facility. * It is free (also in this regard) * The syntax invites you to write clean code. No ;'s at the end of lines, the block structure is described by indentation instead of Begin-End or {..}. Through the Numeric/numarray modules one gets powerful array syntax - inspired by languages such as Fortran 90, Matlab, Octave, Yorick etc. Python itself has also borrowed features from e.g. Lisp, with its interactivity and built in support for list manipulation. * Python has many other useful modules built in, one may for instance write a web server in just a few lines of code or work transparently with gzipped files (handy for analyzing large ascii data files) * Linking in and reusing Fortran subroutines is very easy using e.g. f2py mentioned below, or the Pyfort module found on www.python.org. Integration with C is of course even tighter since the most popular python is written in C. (yes. there is a java python...) * It is possible to work in single precision, which is sufficient for most scientific purposes. This makes it easier to work with large datasets/arrays using only half the memory compared to e.g. matlab. As my basic setup I use Python with the following extensions: Numpy: a.k.a. Numeric python, contain the advanced array syntax, as well as powerful and commonly used functions that can be applied to the multi dimensional arrays. Pygist: Gist is a very fast graphics library for 2D and 3D plots written directly for X11, but also ported to Mac and Windows. Gist is a part of the Yorick language. Pygist contain the Python bindings, read about it here. A recent version of Pygist can be found here. Pygist is currently also a part of a distribution of Python packages called Scipy, that can be found here. f2py: Makes connecting Fortran subroutines a breeze! Also a part of Scipy. A complete example: wrap this subroutine in a Python function returning "dist": [avle@tindved test]$ cat r1.f90 subroutine r1(x,y,n,dist) real x(n),y(n) !f2py intent(out) dist xl=0.0 ; yl=0.0 ; vp=0.0 do i=1,n xl=xl + x(i)**2 ; yl=yl + y(i)**2 vp=vp + x(i)*y(i) end do if(vp>=0.0)then dist = acos(sqrt(vp/(xl*yl))) else dist = 4*atan(1.0)-acos(sqrt(-vp/(xl*yl))) end if end subroutine r1 [avle@tindved test]$ ls r1.f90 [avle@tindved test]$ f2py -c -m r1 --fcompiler=g95 r1.f90 ..lots of output... [avle@tindved test]$ ls r1.f90 r1.so* [avle@tindved test]$ python2 Python 2.2.3 (#1, Feb 15 2005, 02:41:06) [GCC 3.2.3 20030502 (Red Hat Linux 3.2.3-49)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import Numeric as nx, r1 >>> a=nx.array((2.3,2.2)) ; b=nx.array((3.2,2.1)) >>> r1.r1(a,b) 1.2827057838439941 >>>

pynetfilter_conntrack - INL software - Trac

by 1 other
pynetfilter_conntrack is a Python binding of libnetfilter_conntrack. The binding is the file pynetfilter_conntrack.py and you have also a clone of conntrack program: conntrack.py. See also pyctd project. What's this? ¶ This python library is based on libnetfilter_conntrack, which lets you manipulate conntrack objects. In other words, pynetfilter_conntrack lets you deal with Netfilter's stateful inspection objects from the Python world. Practically, for the administrator, this means you can now easily close connections of your choice on your Linux [2.6] firewall. You can also receive informations about all connections (how many packets have gone through, how many bytes, etc.). You will even be able to create new objects in the Connection Tracking (this means that complex protocols such as FTP, P2P, etc. can have Python dealing with them rather than complex kernel modules).

Scapy6 - Download

(via)
Scapy6 is an extension to Scapy that provides support for IPv6 (and much more).

Python Package Index : Home

by 2 others
The Python Packaging Index (the software formerly known as Cheeseshop) is now available at http://pypi.python.org/pypi The old addresses (www.python.org/pypi, and cheeseshop.python.org/pypi) will continue to work, either as aliases or using HTTP redirections. The software was renamed to its old name (PyPI - Python Package Index), as the Cheeseshop name was ever confusing people unfamiliar with British television comedy sketch (and puzzling even to people familiar with the sketch, as you *can* get packages from the package index). The Python Package Index is a repository of software for the Python programming language. There are currently 2609 packages here. You may:

July 2007

5-Minute Video Presentations About Python

5-Minute Presentations About Python Checking out Python but don't have the time to read the manuals? Relax and watch a video or two that demonstrate the power and flexiblity of Python. The following videos are placeholders until a complete set of 5-minute presentations can be developed or located. If you'd like to help, please send an email to advocate AT python DOT org along with some idea of your background in the topic you'd like to cover.

PARLEY

PARLEY is an API for writing Python programs that implement the Actor model of distributed systems, in which lightweight concurrent processes communicate through asynchronous message-passing. Actor systems typically are easier to write and debug than traditional concurrent programs that use locks and shared memory. PARLEY can run using either traditional native threads, greenlets (lightweight threads), or Stackless Python's tasklets. A program written using PARLEY can choose between these models by changing a single line of code. Usage Messages in PARLEY can be arbitrary objects, but the standard message format is a 4-tuple: (tag, sender, args, kwargs). A typical way to handle such a message is to look up a function based on the tag; pass args and kwargs as parameters to the function (args being position parameters, and kwargs being keyword parameters); and to send the return value of the function as a message to the original sender. You can check out the latest version from Subversion using the following command: svn co http://artdent.homelinux.net/parley/trunk

ARtyProg ( (HTA - Python : Gestionnaire de Tâches))

Les applications 'hta' sont de simples fichiers html ayant pout extension 'hta'. Leur intérêt, entre autre, est qu'il sont interprétes par Windows comme de véritables applications. Ils permettent ainsi l'utilisation de tous les composants 'html' dans les scripts écrits en vbscript ou tout autre langage supporté par wsh. HTA - Python : Gestionnaire de Tâches

What is Grok?

(via)
What is Grok? Now even cavemen can use Zope3 Grok is a web application framework for Python developers. It is aimed at both beginners and very experienced web developers. Grok has an emphasis on agile development. Grok is easy and powerful. You will likely have heard about many different web frameworks for Python as well as other languages. Why should you consider Grok? * Grok offers a lot of building blocks for your web application. * Grok is informed by a lot of hard-earned wisdom. Grok accomplishes this by being based on Zope 3, an advanced object-oriented web framework. While Grok is based on Zope 3, and benefits a lot from it, you do not need to know Zope at all in order to get productive with Grok.

Dabo Application Framework for Python in Launchpad

Dabo Application Framework for Python Dabo is a 3-tier, cross-platform application development framework, written in Python atop the wxPython GUI toolkit. And while Dabo is designed to create database-centric apps, that is not a requirement. Lots of people are using Dabo for the GUI tools to create apps that have no need to connect to a database at all. Desktop applications. That's what Dabo does. It's not YAWF (yet another web framework). There are plenty of excellent web frameworks out there, so if that's what you are looking for, Dabo isn't for you. But there are almost no desktop application frameworks out there, and if you want to create applications that run on Windows, OS X or Linux, Dabo is for you! We have taken what we've learned from 25 combined years of database application development, and built an easy-to-use runtime framework that runs on all three major platforms. Dabo consists of 3 logical tiers (UI; business logic; database access) plus an umbrella application object. More information can be found at http://dabodev.com/

Canonical Releases Storm as Open Source | Ubuntu

New Python-based database communication tool represents first open source component of Launchpad LONDON, July 9, 2007 – Canonical Ltd today announced the release of Storm, a generic open source object relational mapper (ORM) for Python. Storm is designed to support communication with multiple databases simultaneously. Canonical is best known for the popular Ubuntu operating system and Launchpad, a web-based collaboration platform for open source developers. "Storm is an ORM that simplifies the development of database-backed applications in Python, especially for projects that use very large databases or multiple databases with a seamless web front-end", said Gustavo Niemeyer, lead developer of Storm at Canonical. "Storm is particularly designed to feel very natural to Python programmers, and exposes multiple databases as /stores/ in a clean and easy to use fashion." The project has been in development for more than a year for use in Canonical projects such as Launchpad, and is now publicly available under the LGPL license. This will be the first complete Launchpad component to be released as open source software. "We're excited about using Storm for Launchpad, and that it is being released as open source. Storm's API is clear and well designed, making it a joy to work with, " said Steve Alexander, Launchpad Product Manager at Canonical. "The scalability advantages of Storm's architecture are important for us to ensure that Launchpad continues to perform well as the number of Launchpad users grows." Launchpad currently includes developers data for several thousand projects and is used by tens of thousands of developers, translators, and other free software contributors. The Storm project welcomes participation, and has a new website at http://storm.canonical.com. That site includes a tutorial, and links to allow developers to download, report bugs and join the mailing list.

FrontPage - Storm

Storm is an object-relational mapper (ORM) for Python developed at Canonical. The project has been in development for more than a year for use in Canonical projects such as [WWW] Launchpad, and has recently been released as an open-source product.

skipole-monitor - Google Code

by 2 others (via)
This program is a network monitor. It allows the user to input host IP addresses, it then pings these hosts every five minutes and displays their status via a built-in web server, on port 8000. It can optionally send email alerts and syslog messages if the hosts change status. So calling http://your_pc_address:8000 will display pages showing green, yellow or red host or group symbols. Each host is pinged four times every five minutes, and symbols are displayed as: green : if three or four pings are successfull yellow : if only one or two are successfull red : if all four fail As well as hosts, group symbols are displayed, and can be opened to show hosts, or sub-groups nested within. The operator can create groups, and sub-groups via the gui. It has been tested on Windows XP and Linux platforms. Windows users; to install, download and run skipolemonitor_0_4_py25_install.exe Linux users; a tar file of Python source code is available in the downloads section. To upgrade: export and save the network data somewhere safe, uninstall the old version, re-install the new version

django-rest-interface - Google Code

by 1 other (via)
The Django REST interface is a Summer of Code project that implements a general method offering a public and private API for existing Django models. New generic views will simplify data retrieval and modification via different web services in a resource-centric REST architecture, providing model data in formats such as XML, JSON and YAML with very little custom code. The REST interface consists of two major parts: 1. Easily configured Create/Read/Update/Delete (CRUD) method access patterns for models. 2. Resources that don't correspond 1:1 to models. More information: * Initial proposal * First mail to django-developers

Introducing templatemaker | Holovaty.com

I've just released templatemaker, which is something I've been hacking on and off (mostly off) the past couple of months. It's a Python library for extracting data from similarly formatted text strings. What the heck does that mean? Well, say you want to get the raw data from a bunch of Web pages that use the same template -- like restaurant reviews on Yelp.com, for instance. You can give templatemaker an arbitrary number of HTML files, and it will create the "template" that was used to create those files. ("Template," in this case, means a string with a number of "holes" in it, where the holes represent the parts of the page that change.) Once you've got the template, you can then give it any HTML file that uses that same template, and it will give you the raw data: "The value for hole 1 is 'July 6, 2007', the value for hole 2 is 'blue'," etc.

journées francophone python - Google Video

Videoa des journées francophone python 2007

Audio/Video Resources for Python

Audio/Video Instructional Materials for Python There is a growing body of podcasts, screencasts and video presentations for the Python community and here we have collected some of the best and provide a roadmap to the rest. And as we would like to encourage more materials, we also provide some pointers to how you can get started sharing your knowledge as well. For those seeking an introduction to Python and what it is capable of, we have ten 5-minute videos that give an overview of some usage domain of Python. And for those wanting to automate the retrieval of these materials, here is a Python script that parses XML/RSS feeds and downloads the items. Note: The difference between a screencast and a video is a semantic one, but generally a screencast is a video lecture that focuses on looking at actual source code or other such text on the presenter's desktop. A video, as the term is used here, is usually shot with a standalone camera of a presenter talking, sometimes and sometimes not with a readable view of his slides. Or put another way, a screencast is a movie of software and requires higher quality video than a talking head lecture.

MainPage - Labix

by 1 other
My name is Gustavo Niemeyer, and this is my personal laboratory. Here you'll find projects I have worked on and more. If you see something interesting here, please bear in mind that I was part of the Conectiva team up to August of 2005, and I'm part of the Canonical team since September of 2005, so these projects are directly or indirectly funded by one of these companies, or even both of them in succession. Occasionally I post something in my blog as well. I hope you have a nice time here, and let me know if you need something. ;)