I followed your recommendation and now I get this, 'module' object has no attribute 'setprofile'
sys.setprofile(self.dispatcher) I used the profile module from an IronPython 2.6 installation. I also found this in the web, In other words, another Python implementation like IronPython is within its own right not to implement these functions. As a matter of fact: IronPython 1.1 (1.1) on .NET 2.0.50727.42 Copyright (c) Microsoft Corporation. All rights reserved. >>> sys.settrace(f) Traceback (most recent call last): NotImplementedError: sys.settrace is not yet supported by IronPython >>> sys.setprofile(f) Traceback (most recent call last): AttributeError: 'module' object has no attribute 'setprofile' is that implemented / going to be implemented in another IronPython version or should I use another profiler with IronPython? If so, could you recommend me one? Greetings From: di...@microsoft.com To: users@lists.ironpython.com Date: Thu, 12 Aug 2010 21:05:00 +0000 Subject: Re: [IronPython] profiling in IronPython error In ASP.NET I’m guessing we don’t ever make a module called __main__. From the command line when you do “ipy foo.py” foo.py is actually called __main__ and there’s no foo module. But if you import foo from an interactive session then it’s named foo. You could do something like: import sys sys.modules[‘__main__’] = foo where foo is whatever the “main” module is. Or if this is your code you could change it to not try to import __main__ or make it try main and then try something else. From: users-boun...@lists.ironpython.com [mailto:users-boun...@lists.ironpython.com] On Behalf Of Pablo Dalmazzo Sent: Thursday, August 12, 2010 7:58 AM To: IronPython Mailing list Subject: [IronPython] profiling in IronPython error Hi guys, Im trying to run this test I had in cPython in IronPython 2.6 in asp.net. from profile import * class Prueba(object): @staticmethod def probarvelocidad(): lista = ['a','b','c'] for x in lista: pass run("Prueba.probarvelocidad()","C:\melia") It doesnt work, i get this Mensaje de error del analizador: No module named __main__ Error de código fuente: (Line 454, import __main__ ) Línea 452: Línea 453: def run(self, cmd): Línea 454: import __main__ Any ideas? can I give any more useful information to know which the problem is? _______________________________________________ Users mailing list Users@lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
_______________________________________________ Users mailing list Users@lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com