Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I don't think running something like

   /usr/local/bin/notpython ~/Downloads/legit.file
will load libraries or execute code in ~/Downloads

That seems something specific to python/jupyter



But maybe it's more analogous to ask about running ~/Downloads/legit_program (or maybe ...\Downloads\legit_installer.exe). As I said in my sibling comment, this is safe on Linux (if legit_program really is safe) but they're right that on Windows it's dangerous because the program will pick up zlib.dll etc. in the downloads directory. Maybe this is part of the reason for .msi installers: they end up running the MSI installer executable, which is located in some system directory instead.


Sure, running executables in random places may be risky. But with python it’s not just the location of the binary program that matters and running scripts or notebooks stored in random places may also be risky.


Comments up thread note that lua will do the exact same thing, Perl used to do it as well (now changed).

Ruby apparently does not though (the internet shows many asking how to do it). Good for them.


Well, I didn't literally expect it to be unique to python :-)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: