Package zeroinstall :: Module alias
[frames] | no frames]

Module alias

source code

Support code for 0alias scripts.


Since: 0.28

Classes
  NotAnAliasScript
  ScriptInfo
Functions
ScriptInfo
parse_script_header(stream)
Parse a 0alias script, if possible.
source code
ScriptInfo
parse_script(pathname)
Extract the URI and main values from a 0alias script.
source code
 
write_script(stream, interface_uri, main=None, command=None)
Write a shell script to stream that will launch the given program.
source code
Function Details

parse_script_header(stream)

source code 

Parse a 0alias script, if possible. This does the same as parse_script, except with an existing stream. The stream position at exit is undefined.

Parameters:
  • stream (file)
Returns: ScriptInfo

Since: 1.12

parse_script(pathname)

source code 

Extract the URI and main values from a 0alias script.

Parameters:
  • pathname (str) - the script to be examined
Returns: ScriptInfo
information about the alias script
Raises:

write_script(stream, interface_uri, main=None, command=None)

source code 

Write a shell script to stream that will launch the given program.

Parameters:
  • stream (file) - the stream to write to
  • interface_uri (str) - the program to launch
  • main (str | None) - the --main argument to pass to 0launch, if any
  • command (str | None) - the --command argument to pass to 0launch, if any