javascript to python

Joe Hrbek joe.hrbek at gmail.com
Thu Oct 2 19:54:07 CEST 2008


Could someone help me translate to something that would close to it in
python?  The anonymous functions are giving me problems.

    var dataListener = {
      data : "",
      onStartRequest: function(request, context){},
      onStopRequest: function(request, context, status){
        instream.close();
        outstream.close();
        listener.finished(this.data);
      },
      onDataAvailable: function(request, context, inputStream, offset,
count){
        this.data += instream.read(count);
      },
    };



More information about the Python-list mailing list