I'm not sure about the scope rules of Python. If I'm using the Python console and define a variable, then import a module and call a function in that module, is there a way to refer to the variable within the function? For instance:

```
>> option = 2
>> import choosingModule
>> choosingModule.choosingFunction()

```

And then in choosingModule:

```
def choosingFunction():
    if option == 0:
        doThis()
    elif option == 1:
        doThat()
    elif option == 2:
        doTheOtherOne()
    else:
        doWhateverYouFeelLike()

```

Obviously that is a simple example. The reason why I want to do this is that I have four different versions of a function and I want to be able to choose from the console which one should be used. The function is called fairly deep in to the code, so I don't want to have to pass a parameter through every single function call, especially as I only need to compare them at the testing stage; when this reaches the production version, only one of will be used.

So, is there any way to refer to a Python console variable in a called function? Or is there perhaps some other way to do what I need?