"compile()" portability

Vio vmilitaru at sympatico.ca
Sat Nov 22 02:37:31 EST 2003


I would like to know if executing:

   c = compile('a=5\nprint a','<string>','exec')


on a Linux box, then pickling+beaming the result on a Windows box, will give me the expecting result:

>>> exec(c)
5

In other words, does 'compile()' generate platform-dependent code?

Regards, 
Vio








More information about the Python-list mailing list