I want to run both cProfiler (For time measurement, mainly) and also a memory profiler that I found here. However, both require the -m command line argument to be given, which doesn’t exactly play nicely.
Is there a way to have both running? All I’ve managed to do so far is get the interpreter yelling at me.
If you need any more information, let me know and I’ll do my best to provide it. Thanks in advance!
It is not possible to start two modules using two
-marguments. This is because the command line arguments after-mare all given to the named module assys.argv. This is not described explicitly in the documentation but you can try it out experimentally.Create two python files
a.pyandb.py.Contents of
a.py:Contents of
b.py:Now try to run both using two
-marguments:Output:
As you can see module b is never started because the second
-mis not handled by python. It is given to module a to handle.