On Fri 06 Jul 2012, Hongwen Qiu wrote: > >def count(filename, opening, closing): > > print opening, closing > > f = open(sys.argv[1], 'r') > Shouldn't this line be > f = open(filename, 'r') > otherwise the 'filename' parameter will not be used
Oops, you're quite correct. Of course it makes no difference at present, but one day some unlucky person will try to use the function elsewhere. The script was written in a hurry, as you may guess. Pont ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________