Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Changing a Global var in a seperate file

Status
Not open for further replies.

bam720

Technical User
Sep 29, 2005
289
US
I created a class:

-----boas.py------
def Verb():
global Verbosity
Verbosity = 0

class boas:
print Verbosity

-----goal.py ----
import boas

boas.Verb.Verbosity = 5

This changes it fine, but then I can't seem to call it from back in the main class... any ideas?
 
we just moved the class definition to a different file and it works now...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top