Tagarchief: python

nexec, distributed terminal commands

Update: since there’s been a change in pylib’s netexec that breaks nexec.py I’ve updated the script. Click here to download the newest version! I Developed this commandline tool to make it easier to maintain stuff on a groing amount of … Lees verder

Geplaatst in All ENGLISH articles, Technical | Getagged , , | 1 reactie

Setting up your own custom python userlib

Never were able, when in need of a simple script, to do a quick finish. Always end up copying code from your other scripts for such a simple thing as sending an email? Then this might be something for you. Lees verder

Geplaatst in All ENGLISH articles, Technical | Getagged , , | Een reactie plaatsen

Django: get distinct field selection

A function for Django that is a simple and safe solution to get a distinct (group by) field selection from a model. Lees verder

Geplaatst in All ENGLISH articles, Technical | Getagged , | Een reactie plaatsen

Django: QueryScreener, a record level ownership development auditor

QueryScreener is a middleware development tool that helps to avoid unwanted data disclosure once you go into production. It monitors queries to the models and warns you when queries are executed that lack a ownership clause. Lees verder

Geplaatst in All ENGLISH articles, Technical | Getagged , , | Een reactie plaatsen

“Walk-around” for pre lighttpd-1.4.23 feature “fix-root-scriptname”

Walk-around should ofcourse be workaround but it feels more like a walk around … Today I ‘moved’ the first version of my application from the Django development setup (run via “./manage runserver”) to a lighttpd/fcgi production setup. Been cleaning up … Lees verder

Geplaatst in All ENGLISH articles, Technical | Getagged , , | Een reactie plaatsen

Solved python regex raising exception “unmatched group”

If your a regex guru, and you know why you came here, you can go straight to the brief explanation. If not just keep reading. I found a workaround for python bug 1519638. It most definitely will not solve all … Lees verder

Geplaatst in All ENGLISH articles, Technical | Getagged , , , , | 10 Reacties

A python function to capture an IP address or range

I recently needed a function that validates an IP address or network range. Since my python application will pass it as a parameter to iptables it needs to be correct and not ‘close to’. So I dug in … Validating … Lees verder

Geplaatst in All ENGLISH articles, Technical | Getagged , , , , , | Een reactie plaatsen

Watch command does not support ‘utf-8′ characters

This issue was found on Ubuntu 8.04 (Hardy Heron) Desktop. If your coding in python and trying to write utf-8 encoded files, save yourself some time. The ‘watch’ command on Ubuntu Hardy does not display utf-8 characters when watching the … Lees verder

Geplaatst in All ENGLISH articles, Technical | Getagged , , | Een reactie plaatsen

My First Python: chkdir.py

First of all I would like to thank my -fun to work with- colleague JW for his elaborate teachings on how to properly code in python. Thanks a lot! The script: chkdir.py Description The script emails differences on a directory’s … Lees verder

Geplaatst in All ENGLISH articles, Technical | Getagged , , | Een reactie plaatsen