Skip to content

os module

Ccode-lang edited this page Dec 23, 2021 · 5 revisions

os module

Usage

import os

Imported commands

shell()

It runs the command given. Using commands with stdout output won't print at all. (Intended)
How to use:

shell(<string>)

argv()

It returns the command line arguments.
How to use:

argv()

Example:

import os
set args = argv()
print("first argument: " + args[0])

When the above is run with python3 ~/Ccode/Ccode.py file.cc wow hi it outputs:

first argument: wow

Welcome to the Ccode language wiki!

Clone this wiki locally