Some Systems type Stuff
- Command Line Arguments.
- import sys
- sys.argv is an array of arguments.
- see argv.py
- The systems module (sys)
- Access to interpreter variables.
- Environment Variables
- import os
- os.environ is a dictionary of the environment variables.
- see env.py
- The os module in general
- Portable operating system dependant functions.
- Limited by os used.
- os.name
- getguid, geteuid, getpid, getppid, setuid, ...
- dup, chmod,
- An example from before:
- a bytes object is a sequence of bytes.
- These are used for low level io at least.
- string.encode() converts a string to a bytes object.
- string.decode() brings it back.
- Remeber the lseek example.
- seeker.py
- Homework 6