[mod_python] global

Paul Hide paul.hide at gmail.com
Tue Oct 4 13:31:02 EDT 2005


file test1.py contains:
def sub1():
global G1
print 'sub1'
G1 = 43

If I enter the following code in Idle I (naively) expect G1 to have a value:
from test1 import *
global G1
sub1()
print G1

but it does not.
Could someone clarify?

Many thanks for an interesting mailing list.

Paul Hide
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mm_cfg_has_not_been_edited_to_set_host_domains/pipermail/mod_python/attachments/20051004/59e20d14/attachment.html


More information about the Mod_python mailing list