I am currently profiling some python code like so:
import cProfile
cProfile.runctx('self._Foo ()', globals(), locals(), 'c:/restats.txt')
def Foo(self):
stuff
The code runs successfuly, outputs no exception. However my restats.txt looks like this:
SomeFunc( i i gÇZ3a/?gÇZ3a/?0( s; C:\SomeFolder\bar.pyiL t
Basically it is 150 lines of garbage characters with random paths and function names mixed in.
What could be the issue? Am I using this correctly? The python file is being loaded in through Maya if that makes a differance.