Is it possible to display the script that was retrieved with getscript?

So I was reading through the libreoffice article on executing python macros from basic. (Basic to Python) and understand how to invoke a macro with this code:

    Option Explicit

Public Function GetPythonScript(macro As String, _
        Optional location As String) As com.sun.star.script.provider.Xscript
    If IsMissing(location) Then location = "user"
    Dim mspf As Object ' com.sun.star.script.provider.MasterScriptProviderFactory'
    Dim sp As Object ' com.sun.star.script.provider.XScriptProvider compatible'
    Dim uri As String
    If location="document" Then
        sp = ThisComponent.getScriptProvider()
    Else
        mspf = CreateUNOService("com.sun.star.script.provider.MasterScriptProviderFactory")
        sp = mspf.createScriptProvider("")
    End If
    uri = "vnd.sun.star.script:"& macro &"?language=Python&location="& location
    GetPythonScript = sp.getScript(uri)
End Function ' GetPythonScript

Private scr As Object ' com.sun.star.script.provider.XScript

Private Property Get ComputerName As String
    '''Workstation name'''
    scr = GetPythonScript("Platform.py$computer_name", "document")
    ComputerName = scr.invoke(Array(), Array(), Array())
End Property ' ComputerName

And that all makes sense. My question is, is there some way to display the retrieved script? Something like scr.script or something? Is there any documentation that has the available properties and functions of the script object?

You can get documentation for com.sun.star.script.provider.XScript objects from LibreOffice API site that details all UNO services. Information from this site is short, and understanding how UNO objects interact remains hard to understand.

You can equally use LibreOffice Basic IDE to watch for variables content description. However I recommend you resort to XRay or MRI extensions to grab a clearer understanding of UNO objects at runtime.

You can try another way.

Sub ShowPythonScript
  Dim s As String 
  ' Returns text of script embedded in the document. 
  s=GetDocScriptText(ThisComponent, "python/Capitalise.py")
  Msgbox s 
End Sub

' Returns text of document script.
' - oDoc   Office document
' - script Path (internal) to script. Сase sensitive! Example: python/Capitalise.py
Function GetDocScriptText(ByVal oDoc, ByVal script As String) As String
   GetDocScriptText=FileToStr("vnd.sun.star.tdoc:/" & oDoc.RuntimeUID & "/Scripts/" & script)
End Function

' --- Utils --- 

' Read file to String.
' - fileURI  Full path to file (URI Format)
' - encoding Text encoding of file. If is missed or empty then "UTF-8".
Function FileToStr(Byval fileURI, Optional ByVal encoding As String) as String
  Dim oStream
  oStream=createUnoService("com.sun.star.ucb.SimpleFileAccess").openFileRead(fileURI)
  FileToStr=StreamToStr(oStream, encoding)
  oStream.closeInput
End Function

' Converts XInputStream (with text) to String.
' - oStream  Object that supports XInputStream interface.
' - encoding Text encoding. If is missed or empty then "UTF-8".
Function StreamToStr(Byval oStream, Optional ByVal encoding As String) As String
   Dim oTextStream
   If IsMissing(encoding) Then encoding=""
   oTextStream=CreateUnoService("com.sun.star.io.TextInputStream")
   With oTextStream
     .setInputStream oStream   
     .encoding=encoding
     StreamToStr=.readString(Array(), false)
   End With  
End Function