Vous devez avoir un compte Developpez.com et être connecté pour pouvoir participer aux discussions.

Identifiez-vous
Identifiant
Mot de passe
Mot de passe oublié ?
Créer un compte

Vous n'avez pas encore de compte Developpez.com ? L'inscription est gratuite et ne vous prendra que quelques instants !

Je m'inscris !

Developpez.com

Python

Choisissez la catégorie, puis la rubrique :

25.10.1 Command Line Usage


25.10.1 Command Line Usage

The trace module can be invoked from the command line. It can be as simple as

python -m trace --count somefile.py ...

The above will generate annotated listings of all Python modules imported during the execution of somefile.py.

The following command-line arguments are supported:

--trace, -t
Display lines as they are executed.

--count, -c
Produce a set of annotated listing files upon program completion that shows how many times each statement was executed.

--report, -r
Produce an annotated list from an earlier program run that used the --count and --file arguments.

--no-report, -R
Do not generate annotated listings. This is useful if you intend to make several runs with --count then produce a single set of annotated listings at the end.

--listfuncs, -l
List the functions executed by running the program.

--trackcalls, -T
Generate calling relationships exposed by running the program.

--file, -f
Name a file containing (or to contain) counts.

--coverdir, -C
Name a directory in which to save annotated listing files.

--missing, -m
When generating annotated listings, mark lines which were not executed with `>>>>>>'.

--summary, -s
When using --count or --report, write a brief summary to stdout for each file processed.

--ignore-module
Ignore the named module and its submodules (if it is a package). May be given multiple times.

--ignore-dir
Ignore all modules and packages in the named directory and subdirectories. May be given multiple times.

See About this document... for information on suggesting changes.
Contacter le responsable de la rubrique Python

Partenaire : Hébergement Web