equivalent of phpinfo.php for python?

214 views
Skip to first unread message

paratracker

unread,
Dec 26, 2008, 4:54:44 PM12/26/08
to web2py Web Framework
It would be nice if there was a script (like phpinfo.php) that you
could drop on the server and could run to discover whether mod_wsgi,
mod_python, or mod_proxy were running, i.e. whether the hosting
company supports python frameworks. If anyone has or knows of such a
script, I hope you'll post it here.

Thanks...

mdipierro

unread,
Dec 27, 2008, 3:08:25 AM12/27/08
to web2py Web Framework
Good idea. we should look into it

mdipierro

unread,
Dec 27, 2008, 7:25:35 AM12/27/08
to web2py Web Framework
I looked into this.

This is not that different than embedding in a web2py view something
like

{{=BEAUTIFY(request)}}

The main difference is that "request" does not contain information
about installed apache modules. I am not sure what the best cross-
platform way to detect those is.

Massimo

mr.freeze

unread,
Dec 27, 2008, 11:15:21 AM12/27/08
to web2py Web Framework
This thread has some interesting information:
http://www.webhostingtalk.com/showthread.php?t=623741

On Dec 26, 3:54 pm, paratracker <mlandis...@comcast.net> wrote:

mdipierro

unread,
Dec 27, 2008, 12:12:11 PM12/27/08
to web2py Web Framework
{{=BEAUTIFY(request)}} covers everything described there but the list
of python packages. You can get that with

{{import pkgutil}}
{{=BEAUTIFY([item[1] for item in pkgutil.walk_packages(onerror=lambda
x:x) if item[2] and '.' not in item[1]])}}

Massimo

Wes James

unread,
Dec 27, 2008, 9:54:19 PM12/27/08
to web...@googlegroups.com
On Sat, Dec 27, 2008 at 10:12 AM, mdipierro <mdip...@cs.depaul.edu> wrote:
>
> {{=BEAUTIFY(request)}} covers everything described there but the list
> of python packages. You can get that with
>
> {{import pkgutil}}
> {{=BEAUTIFY([item[1] for item in pkgutil.walk_packages(onerror=lambda
> x:x) if item[2] and '.' not in item[1]])}}

or create a

{{=web2pyinfo()}}

that has the stuff above in web2py core ;)

-wj

mdipierro

unread,
Dec 28, 2008, 3:36:42 AM12/28/08
to web2py Web Framework
send me a patch. Let's agree and what else should go in there.

On Dec 27, 8:54 pm, "Wes James" <compte...@gmail.com> wrote:
Reply all
Reply to author
Forward
0 new messages