On Mon, 28 Mar 2005 20:46:32 +0300, Christos "TZOTZIOY" Georgiou
<[EMAIL PROTECTED]> wrote:
>On Mon, 28 Mar 2005 17:19:42 GMT, rumours say that Ron_Adam
><[EMAIL PROTECTED]> might have written:
>
>>Is there a way to tell the imported function printx to use mymain's
>>globals instead of it's own co
On Mon, 28 Mar 2005 17:19:42 GMT, rumours say that Ron_Adam
<[EMAIL PROTECTED]> might have written:
>Is there a way to tell the imported function printx to use mymain's
>globals instead of it's own copy without passing it as an argument?
No, but if you insist on working with globals for some reas
Using this example:
[in mymodule]
def whatisx():
try:
print 'x is',x
except:
print 'There is no x'
[in mymain]
from mymodule import printx
x = 10
whatisx()
prints -> There is no x
Is there a way to tell the imported function printx to use mymain's
globals instead of