Skip to content

Commit ac75467

Browse files
committed
Fix script docs
1 parent 37b3985 commit ac75467

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

docs/examples/python.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,17 @@ Creating a script
2626
Lets create a `test_installer` - installer as an example. This is assuming that the folder `./archinstall` is a git-clone of the main repo.
2727
We begin by creating "`scripts`_:code:`/test_installer.py`". The placement here is important later.
2828

29-
This script can now already be called using :code:`python -m archinstall test_installer` after a successful installation of the library itself.
29+
This script can now already be called using :code:`python -m archinstall --script test_installer` after a successful installation of the library itself.
3030
But the script won't do much. So we'll do something simple like list all the hard drives as an example.
3131

3232
To do this, we'll begin by importing :code:`archinstall` in our "`scripts`_:code:`/test_installer.py`" and call a function whtin ``archinstall``.
3333

3434
.. code-block:: python
3535
36-
import archinstall
36+
from archinstall.lib.disk.device_handler import device_handler
37+
from pprint import pprint
3738
38-
print(archinstall.disk.device_handler.devices)
39+
pprint(device_handler.devices)
3940
4041
Now, go ahead and reference the :ref:`installing.python.manual` installation method.
4142
After running ``python -m archinstall test_installer`` it should print something that looks like:

0 commit comments

Comments
 (0)