logoalt Hacker News

IshKebabtoday at 8:15 AM2 repliesview on HN

This is one of Deno's killer use cases IMO. 100x better than shell scripting and like 5x better than Python scripting. Python should be good for this sort of thing, but it isn't.

Historically we had to use pip which was super janky. Uv solves most of pip's issues but you still do have to deal with venvs and one issue it doesn't solve is that you can't do imports by relative file path which is something you always end up wanting for ad-hoc scripting. You can use relative package paths but that's totally different.


Replies

PurpleRamentoday at 10:14 AM

> you can't do imports by relative file path

Just add the targeted path to sys.path, or write your own importhandler. importlib might help there. But true, out of the box, imports in python3 are a bit wacky for more flexible usage.

show 1 reply
wiseowisetoday at 8:56 AM

> 5x better than Python scripting

I’m not sure about that. All those ‘await’s, parentheses really kill my mojo. Why do you find it better than Python?

show 1 reply