This file contains hidden or 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 appex, console | |
| import ui | |
| import os.path | |
| import os | |
| import clipboard | |
| import gc | |
| import shutil |
This file contains hidden or 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 inspect, platform | |
| for name, value in inspect.getmembers(platform): | |
| if name[0] != '_' and callable(value): | |
| try: | |
| value = value() | |
| except (IndexError, TypeError): | |
| continue | |
| if str(value).strip("( ,')"): | |
| print('{:>21}() = {}'.format(name, value)) |
This file contains hidden or 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 collections, dialogs | |
| # simplify the creation of simple form_dialogs | |
| def form_dialog_from_fields_dict(title, fields_dict): | |
| return dialogs.form_dialog(title, [{'title': k, 'type': v} | |
| for k, v in fields_dict.items()]) |
This file contains hidden or 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
| # Python file downloader for Pythonista by OMZ Software | |
| # By: EJM Software ---- http://ejm.cloudvent.net | |
| # Source: https://gist.github.com/89edf288a15fde45682a | |
| # ***************************************** | |
| # This simple script uses the requests module to download files | |
| # and the ui module to show a progress bar | |
| # You can use this bookmarklet to download files from Safari: | |
| # javascript:window.location='pythonista://filedownloader?action=run&argv='+encodeURIComponent(document.location.href); | |
| import ui, console, clipboard, sys, requests, zipfile |
This file contains hidden or 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 objc_util import * | |
| appWorkspace = ObjCClass('LSApplicationWorkspace') | |
| default = (appWorkspace.defaultWorkspace) | |
| list = appWorkspace.defaultWorkspace() | |
| apps = list.allInstalledApplications() | |
| for app in apps: | |
| print(app) |
This file contains hidden or 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 objc_util import * | |
| NSAKDeserializer = ObjCClass('NSAKDeserializer') | |
| NSAKDeserializerStream = ObjCClass('NSAKDeserializerStream') | |
| NSAKSerializer = ObjCClass('NSAKSerializer') | |
| NSAKSerializerStream = ObjCClass('NSAKSerializerStream') | |
| NSAbstractLayoutGuide = ObjCClass('NSAbstractLayoutGuide') | |
| NSAddressCheckingResult = ObjCClass('NSAddressCheckingResult') | |
| NSAffineTransform = ObjCClass('NSAffineTransform') |
This file contains hidden or 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 objc_util import * | |
| import console | |
| import urllib.request, urllib.parse, urllib.error | |
| import dialogs | |
| WKWebView = ObjCClass('WKWebView') | |
| UIViewController = ObjCClass('UIViewController') | |
| UIBarButtonItem = ObjCClass('UIBarButtonItem') | |
| NSURLRequest = ObjCClass('NSURLRequest') |
This file contains hidden or 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 objc_util import * | |
| import console | |
| import urllib.request, urllib.parse, urllib.error | |
| import dialogs | |
| WKWebView = ObjCClass('WKWebView') | |
| UIViewController = ObjCClass('UIViewController') | |
| UIBarButtonItem = ObjCClass('UIBarButtonItem') | |
| NSURLRequest = ObjCClass('NSURLRequest') |
This file contains hidden or 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 objc_util import * | |
| import console | |
| import urllib | |
| import dialogs | |
| WKWebView = ObjCClass('WKWebView') | |
| UIViewController = ObjCClass('UIViewController') | |
| UIBarButtonItem = ObjCClass('UIBarButtonItem') | |
| NSURLRequest = ObjCClass('NSURLRequest') |
This file contains hidden or 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 objc_util import * | |
| import console | |
| import urllib.request, urllib.parse, urllib.error | |
| import dialogs | |
| WKWebView = ObjCClass('WKWebView') | |
| UIViewController = ObjCClass('UIViewController') | |
| UIBarButtonItem = ObjCClass('UIBarButtonItem') |
NewerOlder