comparison bindings/python/pyadbmodule.c @ 628:356d7b319ae8

tightened the inline docs in pyadbmodule.c a first pass at a query implementation in pyadb.py that allows for query parameters to be defined via a class attribute dict, configQuery and an accompanying dict specifying the expected keywords and types. Barely tested, be gentle.
author map01bf
date Wed, 23 Sep 2009 14:38:02 +0000
parents afa05407ce41
children 50761b56e8be
comparison
equal deleted inserted replaced
627:a6fc780678a8 628:356d7b319ae8
405 }else{ 405 }else{
406 PyErr_SetString(PyExc_ValueError, 406 PyErr_SetString(PyExc_ValueError,
407 "Poorly specified result mode. Result must be either \'dist\' or \'list\'.\n"); 407 "Poorly specified result mode. Result must be either \'dist\' or \'list\'.\n");
408 return NULL; 408 return NULL;
409 } 409 }
410 if (!audiodb_query_free_results(current_db, spec, result)){ 410 if (audiodb_query_free_results(current_db, spec, result)){
411 printf("bit of trouble freeing the result and spec...\ncheck for leaks."); 411 printf("bit of trouble freeing the result and spec...\ncheck for leaks.");
412 } 412 }
413 413
414 return outgoing; 414 return outgoing;
415 415
469 excludeKeys = list of strings to exclude (none by default),\n\ 469 excludeKeys = list of strings to exclude (none by default),\n\
470 radius = double of nnRadius (1.0 default, overrides npoints if specified),\n\ 470 radius = double of nnRadius (1.0 default, overrides npoints if specified),\n\
471 absThres = double absolute power threshold (db must have power),\n\ 471 absThres = double absolute power threshold (db must have power),\n\
472 relThres = double relative power threshold (db must have power),\n\ 472 relThres = double relative power threshold (db must have power),\n\
473 durRatio = double time expansion/compresion ratio,\n\ 473 durRatio = double time expansion/compresion ratio,\n\
474 hopSize = int hopsize (1 by default)])->resultDict\n"}, 474 hopSize = int hopsize (1 by default)])->resultDict\n\
475 resFmt = [\"list\"|\"dict\"](\"dict\" by default)"},
475 {NULL,NULL, 0, NULL} 476 {NULL,NULL, 0, NULL}
476 }; 477 };
477 478
478 void init_pyadb() 479 void init_pyadb()
479 { 480 {