[Autogenerated] the first topic is fall classification.
One important consideration is that you cannot trust aspects such
as file name extension or icon as this can be manipulated in order
to trick users into executing them.
The most reliable way is by analyzing the file headers,
essentially the first bite in the heather will reveal the foul type.
These are also known as magic numbers.
The goal is to detect a false are what they seem to be or not specific to.
Python will be using the python magic package,
which is an interface to the live magic library.
This functionality is available on UNIX systems via the file command,
which you may be familiar with to give you some examples.
A very popular one is M Z and this can be identified in Windows,
executable but not only that the L L libraries also have the same
magic number and so do the seas and scr falls.
Another popular one is PK or 54 b in hex.
This is typically identified in zip files, but even more interesting doc x.
And other popular office file formats will have the same magic number,
which can be identified in a jar and a P k files as well.
Apart from Python magic.
We also need to cover a couple of other important modules.
One of the core pitta modules that will be making use of is the Os module.
This enables us to interact with the file system.
We can check the existence of a path on disk by using os dot path dot exists.
This function will return through if the path exists and false otherwise.
To distinguish between false and directories for a specific path we can use to
functions is fall and ease the IR which will return true or false depending on
the path that is supplied as argument building,
flexible command line tools requires that we can make use of
arguments in order to specify parameters for this,
we will use the art parts module to get started.
An argument parcel object is created, then we can specify an argument.
This method has multiple options.
The first one defines the short argument name.
The second defines the long argument name.
Help specify the text that will be displayed when the user will
call our script using the dash h argument and action equals
store through means that we can use the argument as a flag
without any additional value.
And then finally,
in order to correlate the arguments with the right functionality in our script,
we can call the method parse arcs and this will return the
values that the user submitted as input.