I'm remaking a game in python and the menu file and the game file are separate. The menu imports the game file as a module and calls it when requested. However I want variables that determine the sound and difficulty to be passed through from the menu file to the game file, as these options are chosen by the user in the menu.
I'm not sure how to do this at all, so here is how i import and call the python game file:
import SpaceInvaders
SpaceInvaders.SpaceInvaders().mainLoop()
and I want to pass the arguments 'sound' and 'difficulty' through, whose values are strings.
also i call the main loop function but the variables need to be usable in the SpaceInvaders class so i can assign them to self.sound and self.difficulty, they aren't used in the main loop.