Entries Tagged 'python' ↓
December 20th, 2004 — python
Heyo. So it was a snowy evil day out. I stayed home and worked on various crap. Today I got monkey-mail working kinda. It’s something at least. You must have a working install of monkeypop . I include the needed version of libgmail. Just edit the monkey.py file at the top for your gmail account settings.
You can check monkey-mail out by:
svn co http://dev.ironturtle.org/monkey-mail/svn
Yeah, also important to note monkey-mail is a system tray icon to check your gmail and alert you to new mail with on screen displays thanks to monkeypop.
October 7th, 2004 — python
In python a function call always assigns values to all parameters mentioned in the parameter list, either from position arguments, from keyword arguments, or from default values. If the form “*identifier” is present, it is initialized to a tuple receiving any excess positional parameters, defaulting to the empty tuple. If the form “**identifier” is present, it is initialized to a new dictionary receiving any excess keyword arguments, defaulting to a new empty dictionary.
It’s amzing what you find in documentation. On another note, does anyone else have trouble with system time in linux? mine is never right. I’m thinking about scritping rdate or even setting up my own time server
September 28th, 2004 — python
I spent a little time working on my blog. I have a layout I really like although it still needs some fixing. I managed to put in some plugins like my now playing one, catagories, and I got a very hacked version of the booklist plugin working with amazon after dome discussion with jay huie. I’d love some feedback or suggestions of what else should be there.
September 17th, 2004 — python
I wanted to add a dynamic string to my webpage displaying what rhythmbox was currently playing. I asked a few people if they had seen a script that would do this, but the best anyone came up with was looking at the source for the rhythmbox-gaim plugin and going from there. After checking out the plugin I remembered how much I hate c I decieded to try it out in python.
Since my desktop sits behind a cablemodem and buzzco uses the ip to host buzzco.org I couldn’t query my machine whenever my page is loaded. So instead I look up the songinfo through bonobo write that to a file and scp it to my server. Here is the script to get the info and send it:
import pygtk
pygtk.require(’2.0′)
import bonobo
import os
bonobo.activate()
try:
rb = bonobo.get_object(’OAFIID:GNOME_Rhythmbox’, ‘GNOME/Rhythmbox’)
properties = rb.getPlayerProperties()
v = properties.getValue(’song’)
songinfo = v.value()
open(’/home/matt/tunes’, ‘w’).write(songinfo.artist + ‘ - ‘ + songinfo.title)
except:
open(’/home/matt/tunes’, ‘w’).write(”nothing, rhythmbox isn’t running”)
os.system(’/usr/bin/scp /home/matt/tunes root@unsure.org:/var/www/’)
In order to keep the info current I created a cron job to run the script every 2 minutes. Two important things to note about cron (besides cron sucks).
Whichever user is running rhythmbox is the user that needs to run the cron job.
Cron doesn’t know a flipping thing about any system or user info so you have to use absolute paths.
*/2 * * * * /usr/bin/python /home/matt/rhythmbox.py
I also wrote a small plugin to pyblosxom to display to info. It still needs a little work so I’ll post it in a day or two. For now check out unsure to see whay i’m listening to.
July 19th, 2004 — python
Debian packages pyblosxom 0.8.1 which is pretty old. I just upgraded to 1.0 for plugins, and to fix the redering of my files.Unfortunately as you can tell pyblosxom insisits on displaying the html found in the posts. If you know what this is happening let me know it’s freaking annoying.
In other news the rss feed is now working (thanks clarkbw). Tim’s new waste of time displays it well. eatmyfeed eats my feed well. Damn tim does a good job eating other peoples bits.
July 19th, 2004 — python
So this is a pretty hot article on developer works about using Eclipse as an IDE instead of a JAVA IDE. I have to say for java I still love IDEA, however eclipse is about $500 cheaper.
July 19th, 2004 — python
So I just set up pyblosxom (that sucks to spell) clarkbw has been a fan of this style blogging engine, the original blosxom is written in perl. That’s not my bag at all, I avoid perl if it can be helped … I blame horn. Anyway, pyblosxom is a reimplementation of blosxom in python, the greatest language ever. Frear not faithful readers, fromage goes on, however it will be used to run zetanu.net well, not right now, but after my thesis is done. I plan on using it to tie different webservices together for a community site for the alumni of my fraternity. So that’s where it stands I guess. Now back to work. Also this flavour needs tuning, but that’s work for another time.