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

Module alias

source code

Support code for 0alias scripts.


Since: 0.28

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

parse_script(pathname)

source code 

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

Parameters:
  • pathname - the script to be examined
Returns: (str, str | None)
a tuple containing the URI and the main (or None if not set)
Raises:

write_script(stream, interface_uri, main=None)

source code 

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

Parameters:
  • stream - the stream to write to
  • interface_uri - the program to launch
  • main - the --main argument to pass to 0launch, if any