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
# FontInstaller (by @olemoritz) | |
# This script installs a custom TTF font on iOS (system-wide). | |
# It can be used in one of two ways: | |
# 1. Simply run it in Pythonista, you'll be prompted for the URL of the font | |
# you'd like to install (if there's a URL in the clipboard, it'll be used by default) | |
# 2. Use it as an 'Open in...' handler, i.e. select this file in Pythonista's 'Open in... | |
# menu' setting. This way, you can simply download a ttf file in Safari and open it in |
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 scene import * | |
from PIL import Image | |
import sound | |
import random | |
GAME_READY = 0 | |
GAME_PLAY = 1 | |
GAME_DYING = 2 | |
GAME_DEAD = 3 |
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 | |
''' | |
recent_entries() will print out info on all posts to the Pythonista forum in the past 24 hours. | |
watch_feed() will print out info on the last post to the Pythonista forum. | |
Sleeps for 15 minutes then check to see if there is a newer post. | |
If so, prints out info on it and opens its URL in the webbrowser. Repeat. | |
''' |
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
# -*- coding: utf-8 -*- | |
""" ios clipboard to google TTS (in Spanish) | |
This was written for ios pythonista, a python 2.x language. It takes whatever is in the clipboard | |
and reads it out using google text-to-speech. The present form takes Spanish and reads it aloud as my | |
interest is in learning to understand spoken Spanish. I take text from the immersion part of | |
Duolingo and listen. It should be quite easy to modify for different purposes. | |
On a jail-broken device one can even: copy to clipboard, use activator to launch the pythonista script, and | |
have it start speaking! I simple gathered some python from the web, fit it together, debugged a bit, and I | |
had a new tool. Pythonista blew my mind. |
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 Find and Replace | |
=========================== | |
Notices | |
------- | |
Copyright 2013 Harry Jubb. | |
This program is free software: you can redistribute it and/or modify |
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
# A very simple first experiment in GUI creation using Pythonista | |
# on an iPad2. Creates two square buttons which change colour and | |
# make a noise when touched. It's modelled on what I vaguely remember | |
# of the innards of MS Windows | |
from scene import * | |
from random import random | |
import sound | |
# Base class for controls |
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 canvas | |
canvas.set_size(512, 512) | |
from_point = (10, 10) | |
cp1 = (40, 200) #control point 1 | |
cp2 = (350, 50) #control point 2 | |
to_point = (300, 300) | |
# Draw the actual curve: |
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
# -*- coding: utf-8 -*- | |
import os, sys, editor, shutil | |
from glob import glob | |
from scene import * | |
from time import time | |
from copy import deepcopy | |
from PIL import Image, ImageDraw, ImageFont | |
# https://gists.github.com/4034526 |
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
# -*- coding: utf-8 -*- | |
from scene import * | |
from time import time | |
from copy import deepcopy | |
from PIL import Image, ImageDraw, ImageFont | |
global EventQ | |
def p_click(): |
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
# -*- coding: utf-8 -*- | |
from scene import * | |
from PIL import Image, ImageDraw, ImageFont | |
row_rects = [] | |
row_keys = [] | |
n_row_rects = [] | |
n_row_keys = [] |
NewerOlder