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

From the first part: "If you're looking for import foo, it will eventually find either a file foo.py or foo.so (or foo.dll on Windows)" Does anybody have a link how to import a dll with the 'import' statement?



He's not referring to arbitrary shared libraries but rather to modules implemented in another language, usually C.

https://stackoverflow.com/questions/32078764/how-are-python-...

https://docs.python.org/3/reference/import.html


Thanks. Yes, I misread the statement.



It is possible to load arbitrary dll using ctypes module: https://docs.python.org/3/library/ctypes.html




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

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

Search: