I'm writing an automated internet speed testing program and I've setup a secondary script, config.py, to make it simpler for the user to edit the configuration.  
The program can send tweets when the internet speed results falls below a certain point and I want to give the users the ability to edit the tweet. However the user wil likely want to include the results in the tweet which will be defined in the script within which config.py is called.  
How can I use the variables from the main script in config.py?
Edit: Should've mentioned the variables in the main script are also in functions.
You can do from main_script import variable if the variables are not encapsulated into functions.
Using variables defined in main python script in imported script