This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
os.environ['QT_API'] = 'pyside' | |
from matplotlib.figure import Figure | |
from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg, \ | |
NavigationToolbar2QTAgg | |
class Plot_Area(FigureCanvasQTAgg): | |
def __init__(self, parent=None): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import os | |
import sys | |
from subprocess import Popen, PIPE | |
if len(sys.argv) > 1: | |
path = os.path.abspath(sys.argv[1]) | |
else: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class _BaseProperty(object): | |
def __set__(self, instance, value): | |
self._implicid_validation(value) | |
self.__validate(value) | |
# this way you dont look every time for attr_name | |
if not hasattr(self, 'attr_name'): | |
for attr_name, attr_value in instance.__class__.__dict__.items(): | |
if attr_value == self: | |
self.attr_name = '_attributename_'+attr_name |