This file contains 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 sys | |
from PyQt4.QtCore import * | |
from PyQt4.QtGui import * | |
class Window(QMainWindow): | |
'This time I try to put the table populating code in main ui' | |
def __init__(self, parent=None): |
This file contains 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 sys | |
from PyQt4.QtCore import * | |
from PyQt4.QtGui import * | |
data = ['row1', 'row2', 'row3'] | |
class MyList(QListView): | |
def __init__(self, data, parent=None): |
This file contains 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
from PyQt4.QtCore import * | |
from PyQt4.QtGui import * | |
import sys | |
my_array = [['00', '01', '02'], | |
['10', '11', '12'], | |
['20', '21', '22']] | |
def main(): |
This file contains 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
<?xml version="1.0" encoding="UTF-8"?> | |
<ui version="4.0"> | |
<class>Dialog</class> | |
<widget class="QDialog" name="Dialog"> | |
<property name="geometry"> | |
<rect> | |
<x>0</x> | |
<y>0</y> | |
<width>264</width> | |
<height>117</height> |
This file contains 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 | |
import sys | |
from PyQt4 import QtGui, QtCore, uic | |
import sip | |
uiFile = os.path.join(os.path.dirname(__file__), 'promote.ui') | |
# Load the ui file, and create my class | |
form_class, base_class = uic.loadUiType(uiFile) |
This file contains 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
# You can put this inside your userSetup.py | |
# import maya.utils as mu | |
# import script_editor_font as SE | |
# mu.executeDeferred(SE.launchFromCmdWndIcon) | |
from PyQt4 import QtGui, QtCore | |
from maya import cmds, mel | |
import maya.OpenMayaUI as apiUI | |
import sip |
This file contains 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 sys | |
import base64 | |
with open(sys.argv[1], "rb") as imageFile: | |
img_str = base64.b64encode(imageFile.read()) | |
print img_str |
This file contains 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 | |
try: | |
# for python newer than 2.7 | |
from collections import OrderedDict | |
except ImportError: | |
# use backport from pypi | |
from ordereddict import OrderedDict | |
import yaml |
This file contains 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/python | |
# | |
# This is a small stub that is intended to be built into an executable with a | |
# setup.py file using "python setup.py py2exe". This results in an executable | |
# called py.exe. This can be used to run an arbitrary python script on Windows | |
# (XP and later) via py.exe (name of script). | |
# | |
# Changes: | |
# 2.7.4.1: | |
# * initial release |