Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View Mr-Coxall's full-sized avatar

Patrick Coxall Mr-Coxall

  • St. Mother Teresa HS
  • Ottawa
View GitHub Profile
@Mr-Coxall
Mr-Coxall / kalven.py
Created August 17, 2016 12:38
kalven.py
# coding: utf-8
import ui
v = ui.load_view()
v.present('sheet')
@Mr-Coxall
Mr-Coxall / scene_test.py
Created August 21, 2016 11:42
scene_test.py
# for use with https://github.com/omz/PythonistaAppTemplate
from scene import *
import ui
class FirstScene (Scene):
def setup(self):
self.background_color = 'midnightblue'
self.ship = SpriteNode('spc:PlayerShip1Orange')
self.ship.position = self.size / 2
@Mr-Coxall
Mr-Coxall / FileTransfer.py
Created August 31, 2016 01:07 — forked from omz/FileTransfer.py
File Transfer script for Pythonista (iOS)
# 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.
@Mr-Coxall
Mr-Coxall / address.py
Last active September 3, 2016 02:10
address.py
print('Mr. Coxall')
print('Ottawa')
print('Ontario')
@Mr-Coxall
Mr-Coxall / hello_world.py
Last active September 3, 2016 02:11
hello_world.py
print('Hello, World!')
@Mr-Coxall
Mr-Coxall / images.py
Created September 3, 2016 02:29
sprites
# 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')
@Mr-Coxall
Mr-Coxall / download_Gist_to_Pythonista.py
Last active September 4, 2016 01:59 — forked from jsbain/savefile.py
savefile.py
#coding: utf-8
# Created By: jsbain -> https://gist.github.com/jsbain
# Created For: Pythonista
# Created On: Aug-2016
# Altered on: Aug 2016
# Altered by: Mr. Coxall
# What Changed: added comments, changed name of file, changed the output the user sees
@Mr-Coxall
Mr-Coxall / global_variables.py
Created September 4, 2016 02:42
global_variables.py
# 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):
@Mr-Coxall
Mr-Coxall / card_scene.py
Created September 10, 2016 13:13
card_scene.py
# 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)
@Mr-Coxall
Mr-Coxall / hello_world_with_button.py
Created September 14, 2016 17:57
hello_world_with_button.py
# Created by: Mr. Coxall
# Created on: Aug 2016
# Created for: ICS3U
# This program is the Hello, World! program, but with a button
import ui
def hello_world_touch_up_inside(sender):
#print ('Hello, World!')
view['hello_world_label'].text = ("Hello, World!")