You need to include a 'global' statement at the top of the function where used (not where declared)
like:
like:
def myfunc(): global sun_Datetime
changing variable outside of a function
|
|
Messages In This Thread |
changing variable outside of a function - by tkj80 - Jan-04-2017, 11:32 PM
RE: changing variable outside of a function - by Larz60+ - Jan-04-2017, 11:45 PM
RE: changing variable outside of a function - by Mekire - Jan-05-2017, 12:25 AM
RE: changing variable outside of a function - by metulburr - Jan-05-2017, 12:35 AM
RE: changing variable outside of a function - by Larz60+ - Jan-05-2017, 03:09 AM
RE: changing variable outside of a function - by metulburr - Jan-05-2017, 03:11 AM
RE: changing variable outside of a function - by Mekire - Jan-05-2017, 03:29 AM
RE: changing variable outside of a function - by Larz60+ - Jan-05-2017, 03:30 AM
RE: changing variable outside of a function - by tkj80 - Jan-05-2017, 03:52 AM
|