During lunch a friend mentioned that you can just supply a HTTP URL to vim on the command line and it would use curl to download that resource and allow you to edit the content. I jokingly asked whether if you enter :w it would then issue a HTTP POST back to the origin which is of course ridiculous.
@conorhvim foo.txt.gz transparently decompresses the file, then recompresses on save. vim bar.tar.gz or vim baz.zip shows a list of the files in the archive, so you can choose which ones to edit tranparently.
I may write a client library to automate/replace clicking around the web UI of the router my ISP provided (Nokia HA-140W-B). I'll check for existing implementations first, or frameworks I can adapt #HyperOptic#Python
@tubetime also true of cylindrical cells. An 18650 cell is nominally 18 mm diameter by 65 mm long. AA cells are sometimes called 14500, nominal 14 mm dia. by 50 mm length.
I'm looking at this because in modern Python it causes sys.meta_path finders to be called with mpf.find_spec('somepkg.module.', ...), (note the trailing fullstop). Which I'm fairly certain is wrong.
import(..., fromlist=['']) isn't unique to Mitogen. It's also in imagepy, webpy, cherrypy, and others https://grep.app/search?q=. Most examples use the returned value. I think it's meant as a way to get the leaf module, rather than the top-level package, e.g.
>>> import('xml.dom.minidom')
<module 'xml' from '.../xml/init.py'>
>>> import('xml.dom.minidom', fromlist=[''])
<module 'xml.dom.minidom' from '.../xml/dom/minidom.py'>
import(..., fromlist['']) is handled by code that swallows the exception. A comment notes "Backwards-compatibility dictates we ignore failed imports triggered by fromlist for modules that don't exist." https://github.com/python/cpython/blob/v3.12.2/Lib/importlib/_bootstrap.py#L1414-L1422 So I think it's a trick that became widespread in early Python (pre 2.x?), enough to be a grudgingly accepted unofficial API. I should specifically handle it as a corner case in Mitogen's find_spec(). #Python#Mitogen