ModularM
Modular3y ago
3 replies
taalhaataahir01022001

Access Command Line arguments

How Can I access Command line arguments in mojo like we do in python using sys:
import sys
print(sys.argv[1])


Trying the same in mojo:
import sys

fn main() raises:
    print(sys.argv[1])


Yeilds the following error:
error: 'argv' expects 0 input parameters, but 1 was specified
print(sys.argv[1])
Was this page helpful?