I am learning some python with my dynamo, and this might be a generic question, but:
What is the difference between
import os
import sys
import system
I originally thought they are the same but I am starting think they are not?
Thanks
I am learning some python with my dynamo, and this might be a generic question, but:
What is the difference between
import os
import sys
import system
I originally thought they are the same but I am starting think they are not?
Thanks
Hi @cadman6735
It means your importing OS module in Python which provides a way of using operating system dependent functionality. Functions that the OS module provides allows you to interface with the
underlying operating system that Python is running on (Windows,Linux,Mac).
Python comes with around 100 modules available to import, and sys
is one of them. The sys
module is a set of functions which provide crucial information about how your Python script is interacting with the host system.
The sys
modules has information about :
Here are some examples that can use the functionality and data in it by using terms such as :
sys.argv
: A list of strings which is the command line used to execute the script separated by spaces.sys.exit()
: Exit Python cleanlysys.version
: The Python version stringSystem module has information about:
System.Date
System.Windows.Forms
System.Web
System.Version
System.Media
Hi Kulkul, thanks for the reply
So sys is, more inclusive to python system only and not windows system, they are separate things?
OS is a python door to the window operating system, while SYSTEM is a .NET door accessed by clr?
and OS is limited to python modules while the SYSTEM is full access to .NET?
as a wild guess of what I think I understand from your reply??
Thanks