Appendices


PIP Installer


PIP  Pip Installs Packages

The PyPA recommended tool for installing Python packages

key commands into a TaskWindow and press return
  or
save commands as obey files and double click
  or
load obey file into StrongED and click Run icon

*python3 -m pip --help
    Usage:
      __main__/py  [options]
    Commands:
      install        Install packages.
      download       Download packages.
      uninstall      Uninstall packages.
      freeze         Output installed packages ....
      list           List installed packages
      .......

*python3 -m pip --version
    pip 20.0.2 from SCSI::SSD.$.!BOOT.Resources.!PythonSite.
    Python38.Site-Packages.pip (python 3.8)


python3 -m pip install riscos_toolbox
    Collecting riscos_toolbox
      Downloading riscos_toolbox-0.1.0-py3-none-any.whl (4.9 kB)
    Installing collected packages: riscos-toolbox
    Successfully installed riscos-toolbox-0-1-0


*python3 -m pip install --upgrade youtube-dl

*python3 -m pip list
    Package        Version
    -------------- -------------------
    riscos-toolbox 0-1-0
    setuptools     41.2.0.post20200303
    youtube-dl     2021-3-3

Path Variables

When the Python related apps have been seen the following path variables are set. Note; currently (11th of April, 2021) PythonUser$Path is not set.

Python3$Path :       SCSI::SSD.$.Apps.Development.!Python3.
PythonSite$Path :    SCSI::SSD.$.!BOOT.Resources.!PythonSite.
Run$Path :           SCSI::SSD.$.!BOOT.Library.,
                     ,%.
                     ,SCSI::SSD.$.!BOOT.Resources.!Internet.bin.
                     ,PythonUser:Scripts.
                     ,PythonSite:Scripts.
                     ,Python3:Bin.
                     ,Python3:Scripts.
                     ,SCSI::SSD.$.Apps.L1.!lua.bin.

Python Filetypes in RISC OS

There are two filetypes for Python script files.

Python27    AE5  scripts
Python3     A73  scripts
There are two other Python filetypes which are not version specific. The Python interpreter creates a "bytecode" file when a .py file is imported. There is also a file type for " Extensions".

PytnCode    A74
PytnExtn    A75

© 2021 JR