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
# Pythonista Forum - @Phuket2 | |
import ui, editor | |
''' | |
a_path = os.path.expanduser('~/Documents/MyProjects/MyViews') | |
sys.path.append(a_path) | |
import class_walker as cw | |
''' | |
# https://gist.github.com/42924cb9a311ae47084e7f0d05f362f4 |
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
# Pythonista Forum - @Phuket2 | |
import ui, editor | |
''' | |
a_path = os.path.expanduser('~/Documents/MyProjects/MyViews') | |
sys.path.append(a_path) | |
import class_walker as cw | |
''' | |
def add_labels_to_sv(parent): |
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
# Pythonista Forum - @Phuket2 | |
import ui, editor | |
def add_labels_to_sv(parent): | |
# just for debuging. add a label to each subview with the views name | |
for v in parent.subviews: | |
lb = ui.Label() | |
lb.text = v.name | |
lb.size_to_fit() | |
lb.center = v.bounds.center() |
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
''' | |
Pythonista Forum - @Phuket2 | |
''' | |
import ui | |
_css_colors=['rosybrown', 'antiquewhite', 'lightsteelblue', 'white', 'darkblue', 'darkviolet', 'plum', 'darkcyan', 'blanchedalmond', 'chocolate', 'sienna', 'tomato', 'peachpuff', 'lightyellow', 'bisque', 'aqua', 'oldlace', 'maroon', 'palegreen', 'chartreuse', 'darkturquoise', 'linen', 'magenta', 'lemonchiffon', 'powderblue', 'papayawhip', 'gold', 'khaki', 'lightseagreen', 'darkred', 'floralwhite', 'turquoise', 'mediumspringgreen', 'indianred', 'lightgreen', 'crimson', 'mintcream', 'lavender', 'purple', 'orchid', 'darkslateblue', 'whitesmoke', 'moccasin', 'beige', 'mistyrose', 'dodgerblue', 'hotpink', 'lightcoral', 'goldenrod', 'coral', 'cadetblue', 'black', 'mediumseagreen', 'gainsboro', 'paleturquoise', 'darkgreen', 'darkkhaki', 'mediumblue', 'dimgray', 'darkorchid', 'deeppink', 'mediumvioletred', 'lightgray', 'darkgrey', 'lightsalmon', 'lightblue', 'lightslategrey', 'slategray', 'slateblue', 'greenyellow', 'darkgray', 'lawngreen', 'cornflowerblue', 'midnightbl |
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
''' | |
Pythonista Forum - @Phuket2 | |
CSS Color Lookup - wrench item | |
A very basic utility to look up a css name in a list with a filter | |
function and a copy to clipbord the color, quoted. | |
Only works for Python 3.xx, i think only because of the use of | |
super().__init__ in the classes | |
Very basic, but can be handy. Personally, i like using css colors |
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
''' | |
Pythonista Forum - @Phuket2 | |
CSS Color Lookup - wrench item | |
A very basic utility to look up a css name in a list with a filter | |
function and a copy to clipbord the color, quoted. | |
Only works for Python 3.xx, i think only because of the use of | |
super().__init__ in the classes | |
Very basic, but can be handy. Personally, i like using css colors |
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 editor | |
import math | |
import ui | |
import circular_slider as CS | |
def css_clr_to_rgba(css_name, a): | |
c = ui.parse_color(css_name) | |
return (c[0], c[1], c[2], a) | |
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 editor | |
import math | |
import ui | |
import circular_slider as CS | |
def css_clr_to_rgba(css_name, a): | |
c = ui.parse_color(css_name) | |
return (c[0], c[1], c[2], a) | |
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 ui, editor, clipboard | |
import base64, bz2, json, textwrap | |
_pyui_str = \ | |
''' | |
QlpoOTFBWSZTWZism/sAAR7fgFUQUOd/0D/AFY6/r9/KMAF5qwwSiTTQp7Qnok09QaAbU9 | |
R6QeoMaj0g0Co8piANMg0ADQAAAEiiaCnppHqb1Q9QaHqAAAA02pISuSGAc+YNeVsQiyii | |
ARtlFRalIpEJFIAb6AkKoBQXb4wKWSUP3cy89WpMI2EGmUIw6n+lY6hsxid+BnkQjkkCJK | |
Skaqimig1ViFXva0dCqXpfnYnCEGlwivUhQZideAUAwYLSOZnTFfMwhEKJgFoykQWBXRik | |
HXLEAKGJ1aIKFD54dSXBdBanX1TzzvhLKTXyAJfUj446sEp09NktmFO1PdwGg69VeWzZty |
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 ui, editor | |
import calendar | |
from datetime import datetime, timedelta | |
import time | |
from datetime import date as Date | |
c = calendar.Calendar() | |
# seems like a good idea, mostly. But feels it should have a stronger |