Thanks @JonB ; it's more the latter, it ceases up the second you press full stop (and doesn't even show the "." following the instantiated object).
And yes I'm referring to @mikael 's pythonista-webview.
It's not a biggie in any case, was just wondering if the same happened to others.
Hi all & @mikael
Substituting WKWebView for ui.WebView in one of my scraping routines worked like a charm - thanks and excellent work!
While testing my way around the wkwebview library, I found it impossible to work with an instance of the WKWebView class. If I stored an object into variable "w" for instance, the instant I press full stop (which brings Pythonista auto complete up), Pythonista simply ceases/freezes, and I have to force quit the app (I've waited for minutes to see if it would uncease).
Like I said, it works fine in scripts, just can't work with it dynamically in REPL as I could with ui.WebView. I've done a clean Pythonista install, behaviour is the same.
Is this expected behaviour?
This worked for my http calls using the requests library
However, I have an asynchronous program making requests with the aiohttp library. These still throw the SSL Certificate errors...
Cannot connect to host ****** ssl:default [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:749)]
I'm not sure it has to do with iOS 15... my phone isn't upgraded yet and it's throwing the same errors. Most likely to do with this: https://letsencrypt.org/docs/dst-root-ca-x3-expiration-september-2021/
>>> aiohttp.__version__ '3.7.4.post0' >>> requests.__version__ '2.26.0' >>> certifi.__version__ '2021.05.30'
@ccc use the alpine package manager
apk add python3
Other useful packages
apk add py3-virtualenv
apk add py3-pip
apk add vim
Don't forget to run apk update before any installs.
I've just started exploring iSH and I'm super impressed with the project.
What you gain is extreme flexibility. What you lose out on - that you had with Pythonista - was a supreme UI experience.
I love everything about Pythonista on my iPad - it's where I'm most productive; so much so that I dread having to spin up the PC to run or test a piece of code where the dependencies won't work with Pythonista.
Using an SSH app (blink) and a virtual private server to an Ubuntu instance (digital Ocean) is turning out to be a decent halfway house, using the Vim text editor, and tmux to keep long programs running on the cloud.
Not sure if anyone else does this.
And if so, curious if anyone has ventured as far as to customise their vimrc file to resemble the Pythonista environment (key bindings, auto complete, file browser, etc?).
Slight adjustment to above script so that all files in project directory are found. Note: requires hard-coding the directory that holds project directories. Standard Pythonista projects sit in the Documents directory. Working Copy projects sit in a directory called Repositories. Etc. Etc.
import console import editor import os import pathlib import ui # "parent" directories that contain project roots ROOTS = ['Documents', 'Repositories'] def get_project_root(path): '''Determines the root of the project, returns PosixPath() ''' if path.parent.name in ROOTS: return path else: return get_project_root(path.parent) def find_files(path): '''Recurses through project tree, returns PosixPath() list of all files ''' file_paths =  for item in os.listdir(path): item_path = pathlib.Path(os.path.join(path, item)) if item_path.is_file(): file_paths.append(item_path) elif item_path.is_dir() and '.git' not in item_path.name: file_paths.extend(find_files(item_path)) return file_paths def main(): t = console.input_alert('text to search',hide_cancel_button=True) if t == '': return t = t.lower() path = pathlib.Path(editor.get_path()) project_root = get_project_root(path) files_list = find_files(project_root) for file in files_list: if os.path.splitext(file)[-1].lower() in (".py", ".txt"): with open(os.path.join(path, file), mode='rt', encoding='utf-8') as fil: content = fil.read().lower() lines = content.split('\n') first = True for i, line in enumerate(lines, 1): if line.find(t) >= 0: if first: first = False print( '\n%%%Found in ' + file.as_posix().split( project_root.parent.as_posix() + '/' )[-1] +':' ) print('l.'+str(i)+':',line.strip()) if __name__ == '__main__': main()