Posts about programming (old posts, page 1)

2003-09-29 22:15

Almost a useful app

Lacks lots of stuff, but the UI is pretty much done.

Stuff needed before publishing:

  • Updating posts (PyDS and advogato)
  • Deleting posts (PyDS and advogato)
  • Posting new (advogato)

Stuff done:

  • Account creation
  • Account edition
  • Post edition
  • Posting new (PyDS)
Sadly, I have lots of work for the next two or three days, so progress will slow.

And.... evil plugin code! (I will redo it someday, maybe):

#Here acctype is one of "pyds" or "advogato"
#Both are modules that define a class called Editor, 
#which inherits a QWidget

exec ("import "+acctype+" as blog")
self.Editor=blog.Properties(parent=self.Frame,name=str(account))

Of course, if an evil guy could redefine the list of plugins and insert an evil module into your PYTHONPATH, this would REALLY suck ;-)

2003-09-28 19:22

Now, that was easy!

I always dread the moment when a package has to be shared, and something distributable has to be made. You know, don't forget any files, and such.

Not to mention the ancillary nightmare of make/automake/autoconf/aclocal/etc. I simply trusted the kindness of strangers for that.

And I never managed to make RPMs or anything like it. But distutils makes installing, distributing, really simple.

Here's an example:
#!/usr/bin/env python

from distutils.core import setup

setup (name="klog",
       version="0.0.1",
       description="klog: a PyQt blog tool",
       author="Roberto Alsina",
       author_email="[email protected]",
       url="//ralsina.me",
       packages=["klogmodules"],
       scripts=["klog.py"],
       long_description="""Long description here """

)

That is enough to build, install, create RPMs, Debian packages, include the file in PyPI, and who knows what else.

Have another file in the project? Just toss it in the klogmodules directory, and it's done!

Of course this is only for python apps, but I don't see me coding in other languages soon. The only reason I got into C++ was because there was no decent interpreted language with a decent toolkit!

2003-09-22 20:13

py2html trial

In the python listing at the end of the article, I applied py2html so it would get syntax highlighting.

In mozilla it looks ok, in Konqueror it flows over the box.

I wonder if that's how it's supposed to work and it only looks well in Mozilla by accident.

2003-09-21 17:28

Why python is nice

Nice post at mechanicalcat.net, about why python makes good programming easier, or at least not harder.

2003-03-30 21:39

Progress...

My Internet connection is very flaky right now (damn you, Velocom!), so working in KRsN is just no fun.

Therefore, I diverted some of the programming energy towards an old project, called Uqbar.

You can see a couple of screenshots here

2003-03-26 21:52

Moving to SQLite

The python shelve module is too limiting for the database needs of KRsN, so I'm moving it to SQLite and PySQLite.

While this adds another dependency, it's a small one, and the coding becomes way simpler. So, I'm doing it, because fighting against the tools is foolish, and shelve was not doing it without a fight :-)

2003-03-22 11:37

Some programming

I just committed changes that make KFTE work on KDE 3.1

For anyone who likes FTE, a traditional programmer's editor from OS/2 (and DOS, and Mac, and X, and linux console, and pretty much everywhere :-), this version provides a pure Qt and a KDE version.

While KFTE will probably never become a full KDE application (it doesn't support standard shortcuts, for example), it is a cool editor, and one you can use everywhere.

Right now, the way to get it is through KDE's CVS, module kfte, instructions for KDE's current sources here

2003-03-08 23:29

What I am writing

Well, if you are one of the 6 who actually checked the link in the previous entry, you will know I am writing a news aggregator ;-)

It is progressing quickly. Now it is almost a real application, and only 3 or 4 important features are still missing.

The only thing I wish is that there was a KDE 3.1 python binding, since I would need it to use KHTML :-(

Qt's QTextBrowser is nice, but it is not a HTML rendering engine, and it would give it a nice integrated feel. Ok, eventually PyKDE 3.1 will come out, I suppose :-)

PS: if you follow the Pictures link on the left side, you can see a new screenshot!

2001-03-26 14:15

Advogato post for 2001-03-26 14:15:58

Well, 6 months without posting an entry.

I must confess I was pretty pissed at some people around here at the time (note to self: maybe putting my real email address here is not such a good idea. Some people are really scary).

I have been a nullity when it comes to coding, I have declared KRN dead (and since support for KDE 1.x is waning, that's a good thing :-P)

However, I have had some recent events that make me think I may still have an app inside me trying to get out. More news on that tomorrow, hopefully.

I certified Taj (didn't knew you had a diary here, friend!) as master, because, of course, he is one.

After reading his diary, I chuckle remembering how I introduced him to python ;-)

Contents © 2000-2018 Roberto Alsina