Open HLWeil opened 2 hours ago
I would like to just import the shutil module in python so I can use it in an emit statement somewhere in my code. The problem is I can't seem to get the example from the documentation to work.
import
shutil
emit
REPL
Best case would be if I could just write something like this
[<ImportAll("shutil")>] let shutil : unit -> unit = nativeOnly
and get
import shutil
but instead I don't get any import statement at all.
So I add a call to the import "function" (as seen in #3481).
[<ImportAll("shutil")>] let shutil : unit -> unit = nativeOnly shutil()
Now I get the import statement, but unfortunately also the call which fails, as you can't call a module:
import shutil shutil()
Also found
importAll "shutil"
which returns
import shutil shutil
Also looks a bit weird, but it doesn't fail so I'll go with it now.
Description
I would like to just
import
theshutil
module in python so I can use it in anemit
statement somewhere in my code. The problem is I can't seem to get the example from the documentation to work.Repro code`
REPL
Best case would be if I could just write something like this
and get
but instead I don't get any import statement at all.
So I add a call to the import "function" (as seen in #3481).
Now I get the import statement, but unfortunately also the call which fails, as you can't call a module:
Related information