BiggieStylin Evil Genius. Love it/Hate it.

1Dec/110

SimpleIRC

So I know its been a while since I've said anything or worked on anything related to SimpleIRC, but I think its time. I've been wanting to dig back into Python again and learn more, so what better way to pick up Python3 by writing my old IRC bot code back up again. Hopefully I'll be able to make some progress and get it going again... miniE will live again! If you want to help or keep track of my progress, go on over to my SimpleIRC github page and have a look. Keep checking back for updates, hopefully I'll have a running bot again soon.

18Nov/071

wxWidgets and Python

So recently I've been playing with wxWidgets and Python. I've enjoyed it so far, but I've found one problem that I haven't really found a good solution for. When creating a window in Windows, the default background seems to be a rather dark gray. My theme for Windows is the windows classic, which shows all windows as a light grey color. The menu bar and the status bar of the application are the light grey desired, but the background of the application itself and any text label widgets I create are all dark gray. It makes no sense to me.

The solution I've found so far is to set the main window background to the color of the menubar background. This seems to make everything conform to the default light gray. Here's the code from my custom wx.Frame class:

self.SetBackgroundColour(wx.SystemSettings.GetColour(wx.SYS_COLOUR_MENUBAR))
self.SetBackgroundStyle(wx.BG_STYLE_COLOUR)

This sets the frame's background to the correct expected color. I'm not sure if this is the way I should be going about things since I'm new to wxWidgets, so if anyone has any suggestions for me, please let me know! I'll post an update later this week when I get further along with my client. Right now I've taken a break from the SimpleIRC bot part of things and am creating a GUI interface for a client. Until next time!

6Nov/070

SimpleIRC Updates

Well, it's been a little while since I've written about SimpleIRC, so it's time for an update. I've been getting a lot of work done on it during my spare time (which isn't much). I've fixed quite a few bugs in the main Core module and the Client code. I've also added some functionality pretty much everywhere, including some new modules. I still don't know when I'll have an offical release ready, but it's looking promising that it will be soon!

First major change I've made is moving all of the modules off the MySQLdb module and into using SQLAlchemy, which offers a vast variety of methods to interact with the database, as well as support for multiple database backends. The main feature I like about it is the fact that it enables you to create an object for each table and row in the database. It makes dealing with things a lot easier. I also redesigned the database to better support changes made and to add better functionality.

So far, I've got the following modules completely built and working;

  • Eval
  • Factoids
  • Lart
  • Seen
  • Weather

The Core module is build, but not all the features are there yet. I'm also still working on how the handler methods work for commands, because I'd like to find a way to allow command access levels to be changed on the fly using the database, but still be specified if there is no record in the database. I'm also planning on adding functionality for users to enter their e-mail address for validation and password retreval purposes. I still have to work on the other modules annouced, but it's coming along very nicely so far.

I still have some bugs left to squash, and plenty of functionality in the client itself to implement, so if anyone would like to help as a tester or developer, please let me know. I'll update again soon as I get more accomplished and have more to talk about!