Skip to content

Instantly share code, notes, and snippets.

@stevennathaniel
Created September 1, 2011 03:43
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stevennathaniel/1185404 to your computer and use it in GitHub Desktop.
Save stevennathaniel/1185404 to your computer and use it in GitHub Desktop.
Python Module
#
# GUI Common Class Definitions
#
from Common71 import *
class GUICommon:
def turnon(self):
self.status = STATUS_ON
if not self.blink: self.update()
def turnoff(self):
self.status = STATUS_OFF
if not self.blink: self.update()
def alarm(self):
self.status = STATUS_ALARM
if not self.blink: self.update()
def warn(self):
self.status = STATUS_WARN
if not self.blink: self.update()
def set(self, color):
self.status = STATUS_SET
self.specialColor = color
self.update()
def blinkon(self):
if not self.blink:
self.blink = 1
self.onState = self.status
self.update()
def blinkoff(self):
if self.blink:
self.blink = 0
self.status = self.onState
self.onState = None
self.on = 0
self.update()
def blinkstate(self, blinkstate):
if blinkstate:
self.blinkon()
else:
self.blinkoff()
#The following define drawing vertices for various
#graphical element
ARROW_HEAD_VERTICES = [
['x-d', 'y-d', 'x', 'y+d', 'x+d', 'y-d', 'x-d', 'y-d'],
['x', 'y-d', 'x-d', 'y+d', 'x+d', 'y+d', 'x', 'y-d'],
['x-d', 'y-d', 'x+d', 'y', 'x-d', 'y+d', 'x-d', 'y-d'],
['x-d', 'y', 'x+d', 'y+d', 'x+d', 'y-d', 'x-d', 'y']]
@kadhumali
Copy link

C:\Users\Dell\PycharmProjects\pythonProject1\venv\Scripts\python.exe C:/Users/Dell/PycharmProjects/pythonProject1/GUI2.py
Traceback (most recent call last):
File "C:/Users/Dell/PycharmProjects/pythonProject1/GUI2.py", line 5, in
from Common71 import *
(((ModuleNotFoundError: No module named 'Common71')))

Process finished with exit code 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment