On May 26, 8:20 am, MD <
matthewdeni...@gmail.com> wrote:
> Hi,
>
> I get an XmlRpcException when submitting local changes for a task to a
> repo running Trac with mod_wsgi. The exception says that sys.stdout is
> restricted by mod_wsgi while executing ticket.getAvailableCustomActions
> ().
>
> The mod_wsgi FAQ says this is by design. Should I be using mod_python
> instead for this to work with netbeans and cubeon?
The code which is using 'print' without sending it to 'sys.stderr'
should arguably be fixed. If you don't want to or can't do that, then
use the workaround or configure mod_wsgi appropriately so that the
restriction isn't applied. So, see the documentation that the FAQ
points at:
http://code.google.com/p/modwsgi/wiki/ApplicationIssues#Writing_To_Standard_Output
FWIW, this restriction is being removed in mod_wsgi 3.0 specifically
because people can't be bothered to read documentation and/or fix the
code which is arguably doing the wrong thing. See:
http://blog.dscpl.com.au/2009/04/wsgi-and-printing-to-standard-output.html
In other words, gave up trying to make people do the right thing and
instead will let people write non portable code as much as they like.
Graham