Separated space/__init__.py into a few modules

- `draw.py` contains all the drawing code
- `global_state.py` contains the `G` class introduced in the previous commit.
This commit is contained in:
2018-08-14 13:37:53 +02:00
parent 4ae3f418c6
commit d252f75acf
3 changed files with 235 additions and 227 deletions

View File

@@ -0,0 +1,31 @@
import threading
class G:
"""Global state of the Benchmark Client."""
result_platform = None
progress_status = None
result_stats = None
result_dict = None
background_image_path = ""
scene_status = {}
cancel = False
cached_system_info = None
cached_compute_devices = None
results_submitted = False
images = {}
current_progress = 0.0
progress_lock = threading.Lock()
@classmethod
def reset(cls):
"""Reset the global state."""
cls.result_platform = None
cls.progress_status = None
cls.result_stats = None
cls.result_dict = None
cls.background_image_path = ""
cls.scene_status = {}
cls.results_submitted = False