Skip to content

Instantly share code, notes, and snippets.

@altendky
altendky / tk.py
Created September 16, 2016 18:26
import tkinter
root = tkinter.Tk()
def clicked(event):
x, y = root.winfo_pointerxy()
print('clicked at x:{}, y:{}'.format(x, y))
root.bind('<Button-1>', clicked)
root.attributes('-fullscreen', 1)
@altendky
altendky / tk.py
Created September 16, 2016 18:32
import tkinter
root = tkinter.Tk()
def clicked(event):
x, y = root.winfo_pointerxy()
print('clicked at x:{}, y:{}'.format(x, y))
root.bind('<Button-1>', clicked)
root.attributes('-fullscreen', 1)
@altendky
altendky / notes
Created September 20, 2016 15:09
PyModule_AddIntConstant() does not seem to handle large integer constants
correctly beyond the size of the target system's `long` type.
altendky@tp:~$ uname -a
Linux tp 4.4.0-31-generic #50-Ubuntu SMP Wed Jul 13 00:07:12 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
altendky@tp:~$ python3 --version
Python 3.5.2
altendky@tp:~$ python3 -c 'import socket; print(socket.CAN_EFF_FLAG)'
2147483648
@altendky
altendky / -
Created September 22, 2016 16:20
diff --git a/epyq/qscale.py b/epyq/qscale.py
index 57b3a66..8029cef 100644
--- a/epyq/qscale.py
+++ b/epyq/qscale.py
@@ -50,24 +50,94 @@ class QScale(QtWidgets.QWidget):
self.breakpoints = []
self.colors = []
+ # @QtCore.pyqtProperty('QSize')
+ # def sizeHint(self):
[(5, 16), (7, 17)] - b'top: failed tty get\n'
[(5, 16), (7, 17)] - b''
[(5, 16), (7, 16)] - b''
[(5, 16), (7, 16)] - b''
[(5, 16), (7, 16)] - b''
[(5, 16), (7, 16)] - b''
[(5, 16), (7, 16)] - b''
[(5, 16), (7, 16)] - b''
[(5, 16), (7, 16)] - b''
[(5, 16), (7, 16)] - b''
diff --git a/epyq/__main__.py b/epyq/__main__.py
index c7c59b3..9453c7e 100755
--- a/epyq/__main__.py
+++ b/epyq/__main__.py
@@ -1,964 +1,987 @@
#!/usr/bin/env python3
# TODO: get some docstrings in here!
# TODO: CAMPid 98852142341263132467998754961432
#!/usr/bin/env python3
#TODO: """DocString if there is one"""
import string
import functools
import random
import sys
from PyQt5.QtCore import (Qt, QAbstractItemModel, QVariant,
#!/usr/bin/env python3
#TODO: """DocString if there is one"""
import string
import functools
import random
import sys
from PyQt5.QtCore import (Qt, QAbstractItemModel, QVariant,
#!/usr/bin/env python3
#TODO: """DocString if there is one"""
import string
import functools
import random
import sys
from PyQt5.QtCore import (Qt, QAbstractItemModel, QVariant,
#!/usr/bin/env python3
#TODO: """DocString if there is one"""
import string
import functools
import random
import sys
from PyQt5.QtCore import (Qt, QAbstractItemModel, QVariant,