X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=lib%2Flyx2lyx%2Fprofiling.py;h=dd5cbeea0038737376be3062d29b235cc482150c;hb=aef6b1681125515418922ce05b269d7d9c4aa693;hp=01dcbc403d91d1dc30f392625e0144394abf7005;hpb=4ae87a3bb8503b5a672bb85448b11f08ebcfeffd;p=lyx.git diff --git a/lib/lyx2lyx/profiling.py b/lib/lyx2lyx/profiling.py index 01dcbc403d..dd5cbeea00 100755 --- a/lib/lyx2lyx/profiling.py +++ b/lib/lyx2lyx/profiling.py @@ -1,6 +1,6 @@ -#! /usr/bin/env python -tt -# -*- coding: iso-8859-1 -*- -# Copyright (C) 2004 José Matos +#! /usr/bin/env python +# -*- coding: utf-8 -*- +# Copyright (C) 2004 José Matos # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License @@ -14,7 +14,7 @@ # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # We need all this because lyx2lyx does not have the .py termination import imp @@ -29,17 +29,16 @@ import os """ This program profiles lyx2lyx. Usage: - ./profiling.py option_to_lyx2lyx + ./profiling.py option_to_lyx2lyx Example: - ./profiling.py -ou.lyx ../doc/UserGuide.lyx + ./profiling.py -ou.lyx ../doc/UserGuide.lyx """ -def main(argv): +def main(): # This will only work with python >= 2.2, the version where this module was added prof = hotshot.Profile("lyx2lyx.prof") # Use temporary file, here? - benchtime = prof.runcall( - lambda : lyx2lyx.main(argv)) + benchtime = prof.runcall(lyx2lyx.main) prof.close() # After the tests, show the profile analysis. @@ -52,4 +51,4 @@ def main(argv): if __name__ == "__main__": - main(sys.argv) + main()