News

Another bugfix for grun

Here comes the 0.12 release ! Now, grun.popup should work as expected on microsoft's platforms too.

I've uploaded new grun tests too, now they are up-to-date for 0.11/0.12 releases ! And updated the grun's doc a little bit ;-)

Edit : the 0.13 is out

Grun 0.11

A new version which contains some fix (changelog on pypi), and some improvements :

  • a clipboard manager : to have access to the textual content of the clipboard.
  • popup can now have submenus. And can handle selectable values.
  • new/clean syntax grun.popup() / grun.form(), to remove the named arguments.
  • and for tk widgets : text widgets have scrollbars, combobox is a lot better (the tk real one), and popup menu should work like expected (no more close item)

The grun's doc is up-to-date, but miss some big parts yet !

Grun, first public release

Grun stands for "Gui Run'ner". It's a python module which is able to turn methods into GUI forms, with a simple decorator. It brings some nifty things to make your script "bling-bling" too (messagebox, prompt, progressbar, popup menu, icon app, config backend ...).

In fact, it's a swiss-knife for making simple frontends for python scripts. It works on all platforms using tkinter, and can use pygtk when available.

It's the first public release, so it should contain bugs. I will try to make it "rock solid", and will release a python3 version too.

Talking to my site

In the past, I made a sandy-like robot which worked only by email (thanks to smtp2web service), using google calendar as backend.

In the past few days, I updated the code to let it works with XMPP too (thanks to new xmpp service on GAE). And for the fun, I'd added a http frontend too ;-). Since that, I've made some enhancements to add more commands (WakeOnLan, todo backends, ...), and let it looks like a real good robot.

And now : I can talk to my website (this one), by Email, by XMPP and by HTTP, using this same robot ;-)

In the future, always for the fun, I think I will add a twitter and a google wave backend. It's really interesting ;-)

Minor release of py2deb

Here is a new release of py2deb. It's a minor release, here is the changelog :

  • now the package install py2deb in the right place for python2.6
  • py2deb accepts pre/post install/remove scripts

Now, I really need to update and release the frontend ... I've got pressure ;-)

jQuery on serverside with taconite

In my quest to find the better ajax method ;-). I'd found a way to send back multiple actions easily, using the jQuery Taconite plugin (thanks to rupert.lloyd's recipe, which gave me this idea)

Taken from taconite's website :

The jQuery Taconite Plugin allows you to easily make multiple DOM updates using the results of a single AJAX call. It processes an XML command document that contain instructions for updating the DOM.

On serverside, I had just created a simple class helper to build out the taconite xml format.

class jQuery(object):
    def __init__(self): self._x=[]

    def __getattr__(self,cmd):
        def _d(*args,**kargs):
            _p=lambda a: a.replace("&","&amp;").replace('"',"&quot;").replace('>',"&gt;").replace('<',"&lt;")
            assert len(args)>0
            if kargs: assert "content" in kargs

            if "content" in kargs: # element commands
                self._x.append(u"""<%s select="%s">%s</%s>""" % (cmd,_p(args[0]),kargs["content"],cmd))
            else:
                if cmd=="eval": #eval commands
                    self._x.append(u"<eval>\n<![CDATA[\n%s\n]]>\n</eval>" % args[0])
                else:   # non-element commands
                    a=[u'''%s="%s"'''%(k,_p(v)) for k,v in zip(["select","arg1","arg2","arg3","arg4"],args)]
                    self._x.append(u"""<%s %s/>""" % (cmd,u" ".join(a)))
        return _d

    def __repr__(self):
        return u"<taconite>\n%s\n</taconite>" % "\n".join(self._x)

Now, imagine a simple html page like this :

<html>
    <head>
        <script type="text/javascript" src="/static/jquery.js"></script>
        <script type="text/javascript" src="/static/jquery.taconite.js"></script>
    </head>
    <body>
        <div id="content"></div>
        <button onclick="$.get('ajax');">test</button>
    </body>
</html>

And this python handler on the serverside :

class AjaxHandler:
    def GET(self):
        self.header("Content-type","text/xml")
        j=jQuery()
        j.append("#content",content="hello.")
        j.attr("#content","style","border:2px dotted red")
        j.eval("alert();")
        return j

The html button test, will call the ajax url, which will answer by appending some content in the flow of div#content, by setting a border to div#content, and by evaluating the javascript code "alert()", on the clientside. (according to taconite commands like described here).

Nifty ;-)

New website for jbrout

jBrout has now a new official website. Currently it just contains the content of the old website (french & english content). But it will be easier to maintain, because it now uses GoogleAppEngine using the python language (as Jbrout) (TigerWiki is not supported anymore).

For now, it uses the jbrout news from my main website. So news are only available in "english". But, in the near future, french's news will be available too. You can subscribe to jbrout rss (french rss in the future), to stay tuned.

I'm back, and jbrout can now share pictures with upnp/dlna

I'm back from holidays and I had just added a new plugin to jBrout, to be able to share pictures thru upnp/dlna devices (upnp av). It works only on *nix platforms, because it uses the marvellous ushare, which is available on all good platforms ;-). So I can watch my recent pictures on the TV in my sofa, thru the wonderful freebox mediaplayer which is a UPNP AV compliant device ;-). Sweet.

Playing with the (Google)Wave

I like this thing. I had changed the purpose of my robot maison@appspot.com. Now, when added to a wave as a participant, it will post all blips on http://maison.appspot.com ;-) So blips are now really public ... and can be seen by the rest of the world ;-).

Perhaps you will fall in love on what's happening in GoogleWave. A lot of interesting discussions ;-).

It's just a kind of concept, for fun purpose only !

Surfing the (google)wave

Amazing ... Today I had received my google wave account, and started to play with wavelets, blips and all these newer things ;-). Really amazing. I really think that it could be the next big thing in the social/communication side of the web.

It takes me one hour to developp a robot (maison@appspot.com) which replace the word 'fuck' by 'f**k' in all the blips of a wave ... amazing. (Edit : my robot has generated a lot of blips in a wave (wavesandbox.com!w+UyA_PnlT%A) yesterday night ... really funny)

Now, I can't really think all things that could be available in a such system. But as always: APIs from google are just perfects ... they fit my brain. Every thing can be done using python and GAE : just perfect.

EDIT : A really good introduction to present what google wave is (in french)

RSS Python Powered Get Ubuntu
©opyleft 2008-2026 - manatlan — contact