split_ireq(ireq,
abort=False)
|
|
Split item request string into distinct elements.
The item request is a string of the form
[lang:][proj%]path[/item][~args] (or
[proj%][lang:]... ), which this function parses into
(path, lang, proj, item, args) tuple. If language, project,
item or argument strings are not not stated, their value in the tuple
will be None . The language should be a proper language code,
the project an identifier-like string, the path a sequence of
identifier-like strings connected by dots (though hyphens are accepted an
taken as synonymous to underscores), item an identifier-like string, and
arguments can be an arbitrary string.
If the item request cannot be parsed, either the execution is aborted
with an error message, or an exception is raised, depending on value of
abort .
- Parameters:
ireq (string) - item request
abort (bool) - whether to abort execution or if the request cannot be parsed
- Returns: (string, string or
None , string or None ,
string or None , string or None )
- parsed request elements
|