Passing variables in python when using from a import *

Posted by Null on Stack Overflow See other posts from Stack Overflow or by Null
Published on 2010-04-30T16:08:40Z Indexed on 2010/04/30 16:17 UTC
Read the original article Hit count: 197

Filed under:
|
|
|

How can I make this print "baz" when I run b.py?

a.py

    def foo():
        global bar
        print bar

b.py

    from a import *
    bar = "baz"
    foo()

© Stack Overflow or respective owner

Related posts about python

Related posts about global