Mojo Auto-completion in vs-code

MOJO Auto-completion and suggestions not working in vs-code. Os: Kali Linux under WSL
8 Replies
Elaid Tebabkha
Elaid TebabkhaOP2y ago
How I can convert from object python for example int to Int in MOJO
Stole
Stole2y ago
You can use to_float64() (https://docs.modular.com/mojo/stdlib/python/object.html#pythonobject) and then to_int() to convert that SIMD value to an Int. Example:
let ob = Python.evaluate("5")
let i: Int = ob.to_float64().to_int()
let ob = Python.evaluate("5")
let i: Int = ob.to_float64().to_int()
PythonObject also has to_string(), which functions as you'd expect.
Elaid Tebabkha
Elaid TebabkhaOP2y ago
thanks a lot The value is expected from input in python and want to use in Mojo. Is there equivalent of input in mojo?
Jack Clayton
Jack Clayton2y ago
@Elaid Tebabkha try updating to 0.3.1 and autocomplete should work now
Elaid Tebabkha
Elaid TebabkhaOP2y ago
Thanks 🙏
ModularBot
ModularBot2y ago
Congrats @Elaid Tebabkha, you just advanced to level 1!
Elaid Tebabkha
Elaid TebabkhaOP2y ago
Not working.
Stole
Stole2y ago
What's the specific issue?

Did you find this page helpful?