Stoppt die Vorratsdatenspeicherung! Jetzt klicken &handeln! Willst du auch an der Aktion teilnehmen? Hier findest du alle relevanten Infos und Materialien:

Archived entries for python

Reduce and Optimize PNG Images

Dieses Python Skript von amix.dk durchsucht das aktuelle Verzeichnis nach PNGs und optimiert die Bilder mit OptiPNG.


import os, sys

def png_optimize(dir):

 findcmd = 'find %s -name "*.png" -print' % dir

 count = 0

 for f in os.popen(findcmd).readlines():

 count += 1

 file = str(f[:-1])

 os.popen('optipng %s' % file)

 print 'optimized %s' % file

 print "Optimized %d .png files" % count

if __name__ == "__main__":

 png_optimize(".")

PDFMiner

Datamining in PDFs mit PDFMiner.

PDFMiner is a suite of programs that aims to help analyzing text data from PDF documents. It includes a PDF parser, a PDF renderer (though only rendering text is supported for now), and a couple of nice tools to extract texts. Unlike other PDF-related tools, it allows to obtain the exact location of texts in a page, as well as other layout information such as font size or font name, which could be useful for analyzing the document.

Embedded JavaScript

John Resig stellt embeddable JavaScript Interpreter für Python, Perl, PHP, Ruby und Java vor. Ich habe zwar noch nie das Bedürfnis verspürt sowas zu tun, aber trotzdem interessant.

Python aus der Sicht eines PHP Progrmmierers

Kevin Yank hat einen Blick auf Python geworfen.

Unlike PHP, Python wasn’t originally designed as a language for Web development — it’s a general programming language that just happens to have some excellent libraries and frameworks for building web sites, like Django. This may sound like an argument against Python, but it turns out that when you start writing bigger web applications, most of your code has nothing to do with HTML, and PHP’s HTML-friendly features just seem to get in the way.

Drool -Drupal command line Tool

Drupal von der Kommandozeile: Drool.

Drool is a command-line tool for managing drupal websites on a server. Drool automates the mundane tasks of managing Drupal websites on a server and also offers a few more novel features, which include:

  • Creating new sites
  • Installing modules and themes directly from drupal.org
  • Hosting multiple Drupal versions
  • Cloning one drupal site to another - handy when you don’t want to start a site from scratch.
  • Packing up whole sites (e.g. configuration and data) into single file packages that can be shipped across and unpacked onto another server.
  • Rapid theme design by automated skinning of images (i.e. chopping/slicing them up for css scaling) onto a special drool theme. For example, you can draw an image for a block, skin it; draw an image for the page, skin it; draw an image for the header/footer, skin it. By definition, the applied skins will stretch to hold dynamic content (e.g. a wide/narrow, long/short side-bar block/page/header/footer/user-specified regions).


Copyright © 2004–2009. All rights reserved. – Impressum

RSS Feed. This blog is proudly powered by Wordpress and uses Modern Clix, a theme by Rodrigo Galindez.