Artikel mit Tag ‘Snippet’

Audiosignalverabeitung mit Python

Veröffentlicht in Kategorie Coding, Computer, Musik, Python, Verschiedenes am 28. Februar 2011 von Chris – Ersten Kommentar schreiben

Wie man an einzelnen Beiträgen in diesem Blog sehen kann, beschäftige ich mich seit einiger Zeit verstärkt mit Soundsynthese und Audioprocessing. Als bekennender Fan von Python habe ich mich mal nach Tools für die mathematische Analyse und Verarbeitung von Audiosignalen in Python umgesehen und möchte hier mal meine Recherche-Ergebnisse vorstellen.

Weiter lesen »

How to create a new ticket in Trac from a script

Veröffentlicht in Kategorie Coding, Python am 26. Februar 2010 von Chris – Ersten Kommentar schreiben

This is just a note to myself and to spare someone, who faces the same task, going through the Trac sources to find out how to do this:

from trac.env import open_environment
from trac.ticket.model import Ticket

# A list of email addresses or trac user names
NOTIFICATION_LIST = ['randomhacker', 'boss']

ticket = Ticket(open_environment('/path/to/trac/env'))
ticket.populate(dict(
    component = u'My component',
    type = u'task',
    status = u'new',
    summary = u'Make the world a better place',
    reporter = u'me',
    # Set owner to default for given component
    owner = None,
    # You can use Trac wiki syntax here
    description = u"Don't ask '''me''' how to do it...",
    cc = ",".join(NOTIFICATION_LIST))
)
ticket_id = ticket.insert()

That’s all!

Update 2010-03-01: Naturally, after I figured this all out by myself by looking through the Trac source, I found this similar explanation on the trac wiki.