On Thu, 2016-12-08 at 21:49 +0000, Shubha Ramani via pypy-dev wrote: > import py > > import binary_trees > > import os > > from rpython.rlib.rjitlog import rjitlog > > > > def test_binary_trees(): > > file = ('./jit.log') > > fileno = os.open(file, os.O_WRONLY | os.O_CREAT) > > enable_jitlog = lambda: rjitlog.enable_jitlog(fileno) > > os.system("./binary_trees.py 100 100") > > > >
> running it as /opt/pypy/pytest.py test_shubha.py > > The log gets created but it is empty Firstly, are you actually calling test_binary_trees? If not, you're just importing some modules, and defining a function, then exiting. Secondly: os.system will run the binary_trees.py in a separate process, invoking it via whatever is in the shebang line. That won't inherit any of the jitlog settings you've done in this process (and if it's #!/usr/bin/python, it could be CPython you're invoking). Hope this is helpful Dave _______________________________________________ pypy-dev mailing list pypy-dev@python.org https://mail.python.org/mailman/listinfo/pypy-dev