Skip to content

Instantly share code, notes, and snippets.

Avatar
🤖

Adrian Labbé ColdGrub1384

🤖
View GitHub Profile
@ColdGrub1384
ColdGrub1384 / fix_extensions.py
Created Jun 17, 2020
Fixes C extensions when ODR fail to load and scripts are in site-packages
View fix_extensions.py
from extensionsimporter import DownloadableImporter, update_mods, c
from pyto import __Class__
import sys
import threading
try:
__Class__("PyCore").startupScript = threading.current_thread().script_path
except AttributeError:
pass # Running from startup
@ColdGrub1384
ColdGrub1384 / README.md
Last active Jun 3, 2020
UIKit views on PytoUI
View README.md

objc_view

This is a small module for building pyto_ui views with UIKit. Here is an example with UIDatePicker.

import objc_view as ov
from UIKit import UIDatePicker
from datetime import datetime
from typing import Callable
import pyto_ui as ui
@ColdGrub1384
ColdGrub1384 / test_pyto.py
Created Jun 2, 2020
Pyto Basic Unit Tests
View test_pyto.py
"""
Tests for Pyto before submitting to the App Store.
"""
import unittest
import runpy
import sys
from apps import Shortcuts
shortcuts = Shortcuts()
@ColdGrub1384
ColdGrub1384 / install_ipython.py
Last active Jun 2, 2020
Install IPython on Pyto (11.1.12+)
View install_ipython.py
"""
Installs IPython on Pyto.
Usage: Usage: import requests as r; exec(r.get('https://bit.ly/35iSbM1').content.decode())
"""
from pip import main as pip
import os.path
docs = os.path.expanduser("~/Documents")
@ColdGrub1384
ColdGrub1384 / Theme.py
Last active Jun 28, 2020
Import and export Pyto themes
View Theme.py
"""
A script for importing and exporting Pyto themes.
"""
from rubicon.objc import ObjCClass, at
from console import clear
import sys
import base64
import sharing
You can’t perform that action at this time.