Chris Withers wrote:
Gary Poster wrote:

The same is true for -c, which we've had for awhile and has the same rough edge. (I changed that in a hacky way for my branch for -c, and now for -m. I'll be trying to change that to use optparse very soon, though someone may beat me to it.)

Do you have your patches for this to hand?

I want to profile some stuff but I hit the above problem with, for example:

bin/py -m cProfile -o test.profile bin/test

Okay, well, with the following entrypoint:

setup(
...
    entry_points = {
        'console_scripts': [
            'profile = cProfile:main',
        ],
        },
    )

You can now do:

bin/profile -o tests.profile bin/test

Hope this helps!

Chris

--
Simplistix - Content Management, Batch Processing & Python Consulting
           - http://www.simplistix.co.uk
_______________________________________________
Distutils-SIG maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/distutils-sig

Reply via email to