4 ms·
But at least I can just download a .py file (or a bunch of files) and just import them. Perhaps the biggest frustration/pain point in this article isn't npm as
by Carpetsmoker 6y ago
But at least I can just download a .py file (or a bunch of files) and just import them. Perhaps the biggest frustration/pain point in this article isn't npm as such, but that you can't "just" use some JS module.
- TechBro8615 6y agoYou definitely can. On the server side, you can literally do that. On the client side, you can "import" one with a script tag, and increasingly you can use modules in browsers too.
- dceddia 6y agoNothing would stop you from doing that (import thing from ‘./downloaded.js’) but it’s Just Not Done That Way and packages aren’t really built with that in mind, so it probably wouldn’t work very well in practice.
- yawaramin 6y ago> But at least I can just download a .py file (or a bunch of files) and just import them Unless you have a Python version locally that doesn't support some features used in said .py file...
- ggregoire 6y ago> But at least I can just download a .py file (or a bunch of files) and just import them. Just importing doesn't seem to work for millions of people: - https://stackoverflow.com/questions/4383571/importing-files-from-different-folder https://stackoverflow.com/questions/4383571/importing-files-... (1.5m views) - https://stackoverflow.com/questions/14132789/relative-imports-for-the-billionth-time https://stackoverflow.com/questions/14132789/relative-import... (215k views) - https://stackoverflow.com/questions/72852/how-to-do-relative-imports-in-python https://stackoverflow.com/questions/72852/how-to-do-relative... (325k views) - https://stackoverflow.com/questions/1918539/can-anyone-explain-pythons-relative-imports https://stackoverflow.com/questions/1918539/can-anyone-expla... (100k views) - https://stackoverflow.com/questions/1260792/import-a-file-from-a-subdirectory https://stackoverflow.com/questions/1260792/import-a-file-fr... (480k views) - https://stackoverflow.com/questions/7505988/importing-from-a-relative-path-in-python https://stackoverflow.com/questions/7505988/importing-from-a... (136k views) - https://stackoverflow.com/questions/9252543/importerror-cannot-import-name-x https://stackoverflow.com/questions/9252543/importerror-cann... (700k views) - https://stackoverflow.com/questions/2325923/how-to-fix-importerror-no-module-named-error-in-python https://stackoverflow.com/questions/2325923/how-to-fix-impor... (430k views) - https://stackoverflow.com/questions/15514593/importerror-no-module-named-when-trying-to-run-python-script https://stackoverflow.com/questions/15514593/importerror-no-... (250k views)