X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=lib%2Flyx2lyx%2Fprofiling.py;h=fbdb10a2c7775cdefd41936ffb563e9b553950e8;hb=6a1e63c96c26acef67556cd50aabbca8109919ff;hp=b83ec6fc85d6447d749e4547bba9d0f241677331;hpb=43c844920c5935c6e91209db8dfdbc6ecf61693b;p=lyx.git diff --git a/lib/lyx2lyx/profiling.py b/lib/lyx2lyx/profiling.py index b83ec6fc85..fbdb10a2c7 100755 --- a/lib/lyx2lyx/profiling.py +++ b/lib/lyx2lyx/profiling.py @@ -1,6 +1,6 @@ #! /usr/bin/env python -# -*- coding: iso-8859-1 -*- -# Copyright (C) 2004 José Matos +# -*- 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 @@ -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()