When i used a global variable in my supplement file and imported it in a top-level file i got AttributeError.Why?

eg:

file1.py

global i
i =10

file2.py
import file1

print 'i in file1 %d' %file1.i

Aso,i was not able to use file1.i when i used from
ie; from file1 import *

I need a solution for this also.

Works fine for me. What is your total error message?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.