The pse.plugins.request module provides you with information about the current request being processed.
New in version 3.0.
If there is only one form element with the same name, and it only has one value submitted, then the value is a string. Actually, this is a subclass of str, called PSEstr, which can be used as a normal Python str object in every way. It has the additional properties str and list, which return the string value as an actual string and a singleton list, respectively.
If there are multiple elements with the same name or a single element with multiple values, then the value is a list. Actually, this is a subclass of list, called PSElist, which can be used as a normal list object in every way. It has the additional propertes str and list, which return the first element of the list as a string (or '' of the list length is 0) and a copy of the PSElist as an actual list, respectively.
If the form encoding was multipart/form-data, and the form element was a file, then an open file is returned. Actually, this is a file-like object, called PSEfile, which can be used as a normal file object in every way. It has additional properties as follows. The filename property that is the file name from the form, which is also returned by the str property. The list property returns an iterator for the file, which can be used like a list, but does not read the entire file into memory at once.
The form attribute differs from the normal cgi.FieldStorage object in that values are automatically extracted and collected from the different Field objects. Also, blank values are always preserved, which result in empty strings.
By default form will never raise a KeyError for
accessing an undefined key. Instead, it will return an empty string.
However, the has_key function will still work as expected,
returning False if the key was not defined in the form.
You can change this behavior by setting
True in the pse.conf file.
Changed in version 3.0.