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
@alex I think the Nokia is one you can usurp the TR-069 for too and point it at your own server, make changes via API style communication. Though that sounds more work than your plan of faking UI presses!
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
@alex That's what I'm thinking too. I haven't seen "modern" code like that, The closest code I can think of was from the 2.x era.
The documentation says fromlist "gives the names of objects or submodules that should be imported from the module given by name," but I think you already figured that part out.
Hypothetically, if you were redoing a small kitchen would it make sense to not fit a hob into the worktop and use plugin induction hob(s) instead? E.g. https://www.ikea.com/gb/en/p/tillreda-portable-induction-hob-2-zones-white-90497166/ You'd gain some worktop and flexibilty, but I'm not sure if I'm missing a big downside. Probably only an option in countries with 220 volt sockets.
Out of curiosity, what are these? I found them in the bottom of a small wall mount network cabinet, that was fitted in a house, by an electrician. The snipped wires look like CAT-5 solid core.
Printed some wooden-train bridge supports for one of my regulars https://www.thingiverse.com/make:1142793 Tried a different infill pattern (adaptive cubic) to shave 30 minutes of the print time, and save some filament. #3DPrinting
If cars are going to be smart, should the connectivity be user replaceable? My car can phone home, somewhere under the bonnet is SIM and a modem. I don't know if it's 3G or 4G ( probably not 2G). 3G is being phased out in the UK https://www.bbc.co.uk/news/technology-59583783
Instead, imagine a USB WiFi and/or cellular modem that plugs in behind the rear view mirror. It's standardised and easy to swap out.
@sldrant we're also relying on our manufacturer to keep their cloud services running. I think I'll need to pay a subscription for that soon. Ditto for some home chargers with an internal SIM.
@alex my home charger is pretty dumb (and WiFi, not sim) the car OTOH has a bit more smarts and is def 2g/3g and suspect I'll need to pay for the modem upgrade
I'm curious if there are other web tools for generating customised 3D models by filling just a few parameters. E.g. a bolt of thread T, length L, head H; a globe diamater d, land height H.
I know parametric CAD models exist, it's a streamlined UI I'm wondering about.
@alex Thingiverse customizer does that. However, my personal experience is that customizer is a bit slow and it's more pleasant to just install OpenSCAD and download the .scad files from thingiverse
@sldrant the wood bit didn't make much difference, apart from leaving a more ragged edge. A hollow bit (hole saw) might work, but those aren't easily available at 10mm diameter.
#Python/stdio gotcha: sys.stdout.write('something\r') might look like it didn't run. It did run, then '\r' returned the cursor to column zero and the output on that line was overwritten, perhaps by your command prompt. This toot inspired by performing unholy acts to sudo with the pty module https://gist.github.com/moreati/281db7b3e01cb63231e710e2178912c3
@orsinium@alex if I'm not mistaken, it's not Python's behavior, it's OS's. stdout/stderr are buffered by default and are flushed either when hitting a bufsize (4096 on Linux), or at the new line. You can always sys.stdout.flush() if you don't want a new line.
Background investigation: do any smart watches have the whole watch face as a real clicky button? It's for use while wearing kote (padded mittens for #kendo), so I don't think a touch screen or small side buttons will work.
@sldrant do you mean buttons around the edge? Those are typically too small to operate with kote on. I'm after something you can poke with 4 fingers at once.
@alex yeah, the 4 round the edge. I'd wager you could still work the larger watches with that on, but you'd want to try one before buying as that is some big mit.
Voice control? Or a BLE big button and a phone app?