how can I modify an imported variable ?

Discussion in 'Python' started by yomgui, Dec 27, 2006.

  1. yomgui

    yomgui Guest

    I've tried this:

    import MyPackage
    if MyPackage.aVariable is None:
    MyPackage.aVariable = True

    but when I tried to access MyPackage.aVariable from another file
    (ie through an other import) the value is still None.

    how can I do this


    yomgui, Dec 27, 2006
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.