~hruske Hruške, jabuke, jablane, čežane. » 2007 » September
Home Contact Sitemap

Hruške, jabuke, jablane, čežane.

Ste se gdaj vprašali, zakaj Najboljšega soseda nikoli ni doma, ko pridete na obisk?

Forgot your Kopete password?

Posted on September 11th, 2007 in debian, linux, python |

I sure did, and I you didn’t use KWallet, just like me, then you are probably going to find this script a bit helpful when retrieving your forgotten password. Just save the code as a file, eg. getpass.py, and run python getpass.py userid@jabber.org. You will get your password in no time. Be sure to run it in your home dir.


from ConfigParser import ConfigParser
import sys
from kdecore import KStringHandler

config = ConfigParser()
config.read(".kde/share/config/kopeterc")
cryptedpass = config.get("Account_JabberProtocol_" + sys.argv[1], 'Password')
print KStringHandler().obscure(cryptedpass.decode("utf-8"))

Komentarji so izklopljeni

Django newforms

Posted on September 3rd, 2007 in django, python |

Some time ago, when me and Jure were hacking Prevoz a bit, there was a question of handling a complex form. One could split a form into smaller subforms and validate each separately, use a SuperForm or override a lengthy method, that spits out HTML.

We eventually figured that subclassing did just the thing we needed and did the “happy-djangoinan-dance”. ;)

Komentarji so izklopljeni