Tag Archives: Python

Defining custom vars for Pyramid scaffold

This is a quickie. I was working on creating custom Pyramid scaffold for easing development of multiple REST based microservices that share a common base. Instead of trying to copy, paste, change, I decided to ease my work by creating … Continue reading

Posted in Programming, Pyramid, Python | Tagged , , , , | Leave a comment

Python GUI in Linux frame buffer

I was recently wondering about how can I display some graphics in Linux frame buffer with Python. It seems that if your text terminal is initialized in frame buffer mode (most of modern distributions do this), what you need is … Continue reading

Posted in Game Programming, Linux, Programming, Python | Tagged , , , , , , , , | 21 Comments

Paster server encoding problems

If you have stumbled upon strange unicode encoding errors within Paste server like this one: File “/usr/lib/python2.6/site-packages/paste/httpserver.py”, line 437, in handle_one_request self.wsgi_execute() File “/usr/lib/python2.6/site-packages/paste/httpserver.py”, line 290, in wsgi_execute self.wsgi_write_chunk(chunk) File “/usr/lib/python2.6/site-packages/paste/httpserver.py”, line 150, in wsgi_write_chunk self.wfile.write(chunk) File “/usr/lib64/python2.6/socket.py”, line 292, … Continue reading

Posted in Coding, Programming, Pylons, Python | Tagged , , , , , , | 2 Comments

Pylons, ContextObj attribute error, strict_c and fix

I’ve recently upgraded my Pylons to version 1.0 for the CMS project I’m working on and few things broke as a result. There were some changes in dependency packages as well, most notably changing of url_for to url which had … Continue reading

Posted in Coding, Programming, Pylons, Python | Tagged , , , , , | Leave a comment

How to get class method name in Python?

There are two ways to do this. You can either do: def whoami(): “””Returns name of the method.””” import sys return sys._getframe(1).f_code.co_name def callersname(): “””Returns name of the caller.””” import sys return sys._getframe(2).f_code.co_name Or you can simply do: import inspect … Continue reading

Posted in Coding, Programming, Python | Tagged , , | Leave a comment

PocketSpinx voice recognition with GStreamer and Mandriva

I’ve recently bumped upon an open source speech recognition software for Linux based on the CMU Sphinx project called PocketSphinx. Unfortunately standard Mandriva repositories doesn’t have this PocketSphinx library in the 64 bit arch version. So I’ve downloaded SphinxBase and … Continue reading

Posted in Mandriva, Python | Tagged , , , , | 1 Comment

Streaming YouTube music videos as MP3 with Python

I’ve been talking with my friend about the idea of standalone YouTube music player in Linux, since we are using YouTube to listen to music very often. There is great wealth of good quality tunes published there and easy access … Continue reading

Posted in Coding, Linux, Programming, Python | Tagged , , , , | 5 Comments

SQLAlchemy QueuePool exhaustion problem

Welcome back. Today I wanted to share with you some thoughts about the problem with SQLAlchemy used in conjunction with Pylons framework based application that has been getting on my nerves for some time. However, before I’ll talk about it … Continue reading

Posted in Pylons, Python | Tagged , , , , , , , , , , | 3 Comments

Python RSVG not found under Mandriva

Just another quick comment with solution to problems with rendering SVG vector images under Python in Mandriva 2010.1. I was testing Python Cairo (PyCairo) and Python wrapper around RSVG library, trying to render SVG image using PyGame surface. It seemed … Continue reading

Posted in Linux, Mandriva, Programming, Python | Tagged , , , , , , | 1 Comment

Rabbyt and GTK GLExt example

To clarify my previous post a little I have made a simple example on how to use Rabbyt library with GTK GL Extension. Hope this helps. Cheers all… # /usr/bin/env python # # Rabbyt GTK GLext test # __author__ = … Continue reading

Posted in Coding, Game Programming, Python | Tagged , , , , | Leave a comment