Closed neroist closed 2 years ago
Hello @nonimportant, thanks for submitting this!
If you add the the {.exportpy.}
to the function signature, it will be properly exported during the Nim compilation step:
import browsers
proc youtube* {.exportpy.} =
openDefaultBrowser("https://www.youtube.com/")
Nimporter builds upon Nimpy to expose Nim to the Python interpreter. There's a lot of useful unit tests that show the full capabilities of Nimpy!
I'll close this for now but please let me know if you encounter any other issues! 🙂
I'm trying to make a simple program using Python and Nim where the Python file calls a procedure that opens YouTube from the Nim file. And I get this error when importing the Nim file:
commands.nim:
main.py:
And I get this error when importing the Nim file:
Error Message:
Python Version:
Nim Version:
CC Version:
Installed CCs:
Also, if I just call something simple like an echo, or anything else, it throws the same error! In addition, this might not be important but I installed pipwin before running this code and nimporter used to work before so i wonder if those two are connected.