show 315 results

Blog entries

  • Command-line graphical user interfaces

    2008/09/01 by Nicolas Chauvat
    http://azarask.in/gfx/ubiquity_side.png

    Graphical user interfaces help command discovery, while command-line interfaces help command efficiency. This article tries to explain why. I reached it when reading the list of references from the introduction to Ubiquity, which is the best extension to firefox I have seen so far. I expect to start writing Ubiquity commands soon, since I have already been using extensively the 'keyword shorcut' functionnality of firefox's bookmarks and we have already done work in the area of 'language interaction', as they call it at Mozilla Labs, when working with Narval. Our Logilab Simple Desktop project, aka simpled, also goes in the same direction since it tries to unify different applications into a coherent work environment by defining basic commands and shorcuts that can be applied everywhere and accessing the rest of the functionnalities via a command-line interface.


  • Is the Openmoko freerunner a computer or a phone ?

    2008/08/27 by Nicolas Chauvat
    http://wiki.openmoko.org/images/thumb/b/b9/Freerunner02.gif/150px-Freerunner02.gif

    The Openmoko Freerunner is a computer with embedded GSM, accelerometer and GPS. I got mine last week after waiting for a month for the batch to get from Taiwan to the french company I bought it from. The first thing I had to admit was that some time will pass before it gets confortable to use it as a phone. The current version of the system has many weird things in its user interface and the phone works, but the other end of the call suffers a very unpleasant echo.

    I will try to install Debian, Qtopia and Om2008.8 to compare them. I also want to quickly get Python scripts to run on it and get back to Narval hacking. I had an agent running on a bulky Palm+GPS+radionetwork back in 1999 and I look forward to run on this device the same kind of funny things I was doing in AI research ten years ago.


  • simpled - Simple Desktop project started !

    2008/08/11 by Nicolas Chauvat

    I bought last week a new laptop computer that can drive a 24" LCD monitor, which means I do not need my desktop computer any more. In the process of setting up that new laptop, I did what I have been wanting to do for years without finding the time: spending time on my ion3 config to make it more generic and create a small python setup utility that can regenerate it from a template file and a keyboard layout.

    The simpled project was born!

    If you take a look at the list of pending tickets, you will guess that I am using a limited number of pieces of software during my work day and tried to configure them so that they share common action/shortcuts. This is what simpled is about: given a keyboard layout generate the config files for the common tools so that action/shortcuts are always on the same key.

    I use ion3, xterm+bash, emacs, mutt, firefox, gajim. Common actions are: open, save, close, move up/down/left/right, new frame or tab, close frame or tab, move to previous or next tab, etc.

    I will give news in this blog from time to time and announce it on mailing lists when version 0.1 will be out. If you want to give it a try, get the code from the mercurial repository.


  • Simile-Widgets

    2008/08/07 by Nicolas Chauvat
    http://simile.mit.edu/images/logo.png

    While working on knowledge management and semantic web technologies, I came across the Simile project at MIT a few years back. I even had a demo of the Exhibit widget fetching then displaying data from our semantic web application framework back in 2006 at the Web2 track of Solutions Linux in Paris.

    Now that we are using these widgets when implementing web apps for clients, I was happy to see that the projects got a life of their own outside of MIT and became full-fledged free-software projects hosted on Google Code. See Simile-Widgets for more details and expect us to provide a debian package soon unless someone does it first.

    Speaking of Debian, here is a nice demo a the Timeline widget presenting the Debian history.

    http://beta.thumbalizr.com/app/thumbs/?src=/thumbs/onl/source/d2/d280583f143793f040bdacf44a39b0d5.png&w=320&q=0&enc=

  • SciPy and TimeSeries

    2008/08/04 by Nicolas Chauvat
    http://www.enthought.com/img/scipy-sm.png

    We have been using many different tools for doing statistical analysis with Python, including R, SciPy, specific C++ code, etc. It looks like the growing audience of SciPy is now in movement to have dedicated modules in SciPy (lets call them SciKits). See this thread in SciPy-user mailing-list.


  • Google Custom Search Engine, for Python

    2008/07/31

    A Google custom search engine for Python has been made available by Gerard Flanagan, indexing:

    http://www.logilab.fr/images/python-logo.png

    Using refinements

    To refine the search to any of the individual sites, you can specify a refinement using the following labels: stdlib, wiki, pypi, thehazeltree

    So, to just search the python wiki, you would enter:

    somesearchterm more:wiki

    and similarly:

    somesearchterm more:stdlib somesearchterm more:pypi somesearchterm more:thehazeltree

    About http://thehazeltree.org

    The Hazel Tree is a collection of popular Python texts that I have converted to reStructuredText and put together using Sphinx. It's in a publishable state, but not as polished as I'd like, and since I'll be mostly offline for the next month it will have to remain as it is for the present. However, the search engine is ready now and the clock is ticking on its subscription (one year, renewal depending on success of site), so if it's useful to anyone, it's all yours (and if you use it on your own site a link back to http://thehazeltree.org would be appreciated).


  • Python for applied Mathematics

    2008/07/29 by Nicolas Chauvat
    http://www.ams.org/images/siam2008-brain.jpg

    The presentation of Python as a tool for applied mathematics got highlighted at the 2008 annual meeting of the american Society for Industrial and Applied Mathematics (SIAM). For more information, read this blogpost and the slides.


  • Windows, fichiers ouverts et tests unitaires

    2008/07/22

    Un problème rencontré hier : un test unitaire plante sous Windows, après avoir créé un objet qui garde des fichiers ouverts. le tearDown du test est appelé, mais il plante car Windows refuse de supprimer des fichiers ouverts, et le framework de test garde une référence sur la fonction de test pour qu'on puisse examiner la pile d'appels. Sous Linux, pas de problème (on a le droit du supprimer du disque un fichier ouvert, et donc pas de soucis dans le teardown).

    Quelques pistes pour contourner le problème:

    1. mettre le test dans un try...finally avec un del sur l'objet qui garde les fichiers ouverts dans le finally. Inconvénient : quand le test ne passe pas, pdb ne permet plus de voir grand chose
    2. au lieu de nettoyer dans le tearDown, nettoyer plus tard dans un atexit par exemple. Il faut voir comment ça se passe si plusieurs tests veulent écrire dans les mêmes fichiers (je pense qu'il faudrait un répertoire temporaire par test, si on veut pouvoir avoir plusieurs tests qui foirent et examiner leurs données, mais il faut tester pour être sûr)
    3. coller un try...except dans le tearDown autour de la suppression de chaque fichier, et mettre les fichiers qui posent problème dans une liste qui sera traitée à la sortie du programme (avec atexit par exemple).

    Ça ressemble à du bricolage, mais on a un comportement de windows sur lequel on n'a pas de contrôle (même avec des privilèges Administrateur ou System, on ne peut pas contourner cette impossibilité de supprimer un fichier ouvert, à ma connaissance).

    Une autre approche, nettement plus lourde, serait de virtualiser la création de fichiers pour travailler en mémoire (au minimum surcharger os.mkdir et le builtin open, voire dans le cas qui nous intéresse les modules qui travaillent avec des fichiers zip). Il y a peut-être des choses comme ça en circulation. Poser la question sur la liste TIP apportera peut-être des réponses (une rapide recherche dans les archives n'a rien donné).

    Voir aussi ces enfilades de mars 2004 et novembre 2004 sur comp.lang.python.


  • ion, dock and screen configuration

    2008/07/04 by David Douard

    I have a laptop I use at work (with a docking station), in the train and at home (with an external display), on which my environment is ion3.

    As I use suspend-to-RAM all the time, I have added some keybindings to automatically reconfigure my screen when I plug/unplug an external display (on the dock as well as direct VGA connection).

    The lua code to paste in your .ion3/cfg_ion.lua for the bindings looks like:

    function autoscreen_on()
            local f = io.popen('/home/david/bin/autoscreen -c', 'r')
          if not f then
              return
          end
          local s = f:read('*a')
          f:close()
        ioncore.restart()
    end
    
    function autoscreen_off()
            local f = io.popen('/home/david/bin/autoscreen -d', 'r')
          if not f then
              return
          end
          local s = f:read('*a')
          f:close()
        ioncore.restart()
    end
    
    defbindings("WMPlex.toplevel", {
        bdoc("Turn on any external display and tell ion to reconfigure itself"),
        kpress(META.."F10",
               "autoscreen_on()"),
    })
    
    defbindings("WMPlex.toplevel", {
        bdoc("Turn off any external display and tell ion to reconfigure itself"),
        kpress(META.."F11",
               "autoscreen_off()"),
    })
    

    It makes use of the following python script (named /home/david/bin/autoscreen in the lua code above):

    #!/usr/bin/env python
    
    import sys
    import os
    import re
    from subprocess import Popen, PIPE
    import optparse
    parser = optparse.OptionParser("A simple automatic screen configurator (using xrandr)")
    parser.add_option('-c', '--connect', action="store_true",
                      dest='connect',
                      default=False,
                      help="configure every connected screens")
    parser.add_option('-d', '--disconnect', action="store_true",
                      dest='disconnect',
                      default=False,
                      help="unconfigure every connected screens other than LVDS (laptop screen)")
    parser.add_option('', '--main-display',
                      dest='maindisplay',
                      default="LVDS",
                      help="main display identifier (typically, the laptop LCD screen; defaults to LVDS)")
    
    options, args = parser.parse_args()
    
    if int(options.connect) + int(options.disconnect) > 1:
        print "ERROR: only one option -c or -d at a time"
        parser.print_help()
        sys.exit(1)
    
    
    xrandr = Popen("xrandr", shell=True, bufsize=0, stdout=PIPE).stdout.read()
    
    connected = re.findall(r'([a-zA-Z0-9-]*) connected', xrandr)
    connected = [c for c in connected if c != options.maindisplay]
    
    cmd = "xrandr --output %s %s"
    
    if options.connect or options.disconnect:
        for c in connected:
            if options.connect:
                action = "--auto"
            elif options.disconnect:
                action = "--off"
    
            p = Popen(cmd % (c, action), shell=True)
            sts = os.waitpid(p.pid, 0)
    

  • We're going to Europython'08

    2008/07/02 by Arthur Lutz
    http://europython.org/euro/img/europython.png

    Hey,

    We've decided to go to Europython this year. We're obviously going to give a talk about the exciting things we're doing with LAX and GoogleAppEngine. We're on wednesday at midday in the alfa room, check out the schedule here. Since we think it's important that these events take place, we're also chipping in and sponsoring the event.

    We hope to see you there. Drop us a note if you want to meet up.


show 315 results