Created
June 5, 2022 04:02
-
-
Save Magnus167/0675c857f833be14db3a1c452f8aee06 to your computer and use it in GitHub Desktop.
Import Python Module directly from URL
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import urllib.request | |
| a = urllib.request.urlopen(url) | |
| eval(a.read()) | |
| # https://stackoverflow.com/a/47341399/4417821 - Xantium, StackOverflow | |
| # ensure that depending url does't import any that may not exist on a system. use this only for simple scripts. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment