thartbm / PyVMEC

A Python-based GUI to create and run visuo-motor experiments.
GNU General Public License v3.0
1 stars 3 forks source link

No globals #2

Closed thartbm closed 6 years ago

thartbm commented 6 years ago

Import your functions in a namespace so it doesn't mess with other functions that might happen to have the same name. This (not using namespaces and overriding existing functions) can results in inexplicable errors and it is easily solved.

In PyVMEC.py, there should be some lines like:

import GUI as GUI import Config as Config and so on.

Then you call GUI.start() to actually start.

Edit: you need to instantiate the wx object for the main GUI. This is now called 'MyApp' but it should have a more informative name. GUI.start() sounds like a function (because its a verb) so it should be a noun instead, but something like that should work, and be called from PyVMEC.py.

juliusjgm12 commented 6 years ago

Globals have been removed. GUI now runs from PyVMEC.py. Although i'm not yet sure what else will be running from PyVMEC.py I guess i'll find out eventually though :grin: