The variables all say "cannot resolve variable" after I import psyco. This is before I actually tell psyco to compile anything. I execute this in the debugger:
b=100
import psyco
print b
with breakpoints before & after the import. Any ideas how to get around this? I want psyco in my released code but am tired of commenting out each psyco import to debug.
Thanks
Kim
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Well, I've taken a look at that, and the problem seems to be that psyco 'drops' the frames from a thread and creates a new set of frames -- just by importing it (and the debugger is still attached to the old set of frames). Please report that as a bug.
Now, you can have a little better structure instead of commenting out your code -- something like having a module that imports psyco:
file: mypsyco.py
if RELEASE:
from psyco import *
else:
... do your own wrappers for the functions that you use from psyco an no-ops.
This way you could just pass a parameter to set that RELEASE flag...
Cheers,
Fabio
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The variables all say "cannot resolve variable" after I import psyco. This is before I actually tell psyco to compile anything. I execute this in the debugger:
b=100
import psyco
print b
with breakpoints before & after the import. Any ideas how to get around this? I want psyco in my released code but am tired of commenting out each psyco import to debug.
Thanks
Kim
Well, I've taken a look at that, and the problem seems to be that psyco 'drops' the frames from a thread and creates a new set of frames -- just by importing it (and the debugger is still attached to the old set of frames). Please report that as a bug.
Now, you can have a little better structure instead of commenting out your code -- something like having a module that imports psyco:
file: mypsyco.py
if RELEASE:
from psyco import *
else:
... do your own wrappers for the functions that you use from psyco an no-ops.
This way you could just pass a parameter to set that RELEASE flag...
Cheers,
Fabio