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
# File Transfer for Pythonista | |
# ============================ | |
# This script allows you to transfer Python files from | |
# and to Pythonista via local Wifi. | |
# It starts a basic HTTP server that you can access | |
# as a web page from your browser. | |
# When you upload a file that already exists, it is | |
# renamed automatically. | |
# From Pythonista's settings, you can add this script | |
# to the actions menu of the editor for quick access. |
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
# Created by: Mr. Coxall | |
# Created on: Sep 2018 | |
# Created for: ICS3U | |
# This program calculates the area and perimter of a rectangle | |
import ui | |
def answer_touch_up_inside(sender): | |
# displays the answer for area and perimeter | |
view['area_answer_label'].text = 'Area = ' + str(3*5) + ' cm^2' |
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
# Created by: Mr. Coxall | |
# Created on: Aug 2018 | |
# Created for: ICS3U | |
# This program displays the school name and their mascot | |
import ui | |
def mother_teresa_touch_up_inside(sender): | |
# displays the school and mascot for MT | |
view['school_name_label'].text = 'Mother Teresa HS' |
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
# Created by: Mr. Coxall | |
# Created on: Aug 2016 | |
# Created for: ICS3U | |
# This program shows images | |
import ui | |
# first get a reference to the image you saved in your Python folder | |
my_pic = ui.Image.named('sprites/MT_crest.jpg') |
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
# Created by: Mr. Coxall | |
# Created on: Aug 2018 | |
# Created for: ICS3U | |
# This program displays area and perimeter of a rectangle, | |
# but this time the user can enter different lengths and widths | |
import ui | |
def calculate_button_touch_up_inside(sender): | |
# calculate area and perimeter |
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
# Created by: Mr. Coxall | |
# Created on: Sep 2016 | |
# Created for: ICS3U | |
# This program shows the difference between local and global variables | |
import ui | |
variableX = 25 | |
def local_button_touch_up_inside(sender): |
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
# for use with https://github.com/omz/PythonistaAppTemplate | |
from scene import * | |
import ui | |
from menu_scene import * | |
class CardBackScene(Scene): | |
def __init__(self, card_back_color='blue'): | |
Scene.__init__(self) |
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
# Created by: jsbain | |
# Created on: Aug 2014 | |
# URL : https://github.com/jsbain/GitHubGet/blob/master/GitHubGet.py | |
# download an entire github repo. | |
# either copy the url to clipboard, and run script, or run following bookmarklet. | |
# will unzip to repo-branch (so be careful if downloading same branch name from multiple users) | |
# | |
## javascript:(function()%7Bif(document.location.href.indexOf('http')===0)document.location.href='pythonista://GitHubGet?action=run&argv='+document.location.href;%7D)(); |
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
# Created by: Mr. Coxall | |
# Created on: Aug 2018 | |
# Created for: ICS3U | |
# This program shows images | |
import ui | |
# first get a reference to the image you saved in your Python folder | |
my_pic = ui.Image.named('./sprites/MT_crest.jpg') |