FAQ
Hello, I've been playing around with mod_python these days (using
Publisher and PSP), and it has been working smoothly under Windows XP
(using Apache 2.2). But when I installed PSE and went to use it with
mod_python, it didn't work. The error I get whenever I try to load a
PSE page is:

Traceback (most recent call last):

File "C:\Python25\lib\site-packages\mod_python\importer.py", line
1537, in HandlerDispatch
default=default_handler, arg=req, silent=hlist.silent)

File "C:\Python25\lib\site-packages\mod_python\importer.py", line
1229, in _process_target
result = _execute_target(config, req, object, arg)

File "C:\Python25\lib\site-packages\mod_python\importer.py", line
1128, in _execute_target
result = object(arg)

TypeError: 'module' object is not callable


I thought it could be some incompatibility issue between PSE and
mod_python, but I tried both installing the PSE binary and building
the sources, and it didn't make a difference. Has anyone out there had
success using PSE under Windows?

(Just for the record, I did install matching versions, at least for
Apache (2.2.3), Python (2.5) and mod_python (3.3.1). PSE doesn't seem
to have a strict version requirement.)


From http Sat Jun 23 17:16:38 2007
From: http (Paul Rubin)
Date: 23 Jun 2007 08:16:38 -0700
Subject: Python's "only one way to do it" philosophy isn't good?
References: <1181368143.874341.273140@r19g2000prf.googlegroups.com>
<mailman.8868.1181374855.32031.python-list@python.org>
<slrnf6q9ah.cf9.apardon@rcpc42.vub.ac.be>
<mailman.8967.1181601630.32031.python-list@python.org>
<lc4pl9gc88.fsf@gaffa.mit.edu>
<mailman.9142.1181964145.32031.python-list@python.org>
<lcvedlf3t8.fsf@gaffa.mit.edu>
<mailman.9232.1182267434.32031.python-list@python.org>
<lcr6o7g7zf.fsf@gaffa.mit.edu>
<slrnf7g6tq.1f4.horpner@FIAD06.norwich.edu>
<lcodjbfwhw.fsf@gaffa.mit.edu>
<pan.2007.06.20.00.01.11.589422@REMOVE.THIS.cybersource.com.au>
<7x3b0nmkk6.fsf@ruckus.brouhaha.com>
<pan.2007.06.20.10.29.58@REMOVE.THIS.cybersource.com.au>
<lc8xaefhgh.fsf@gaffa.mit.edu>
<pan.2007.06.21.10.19.47@REMOVE.THIS.cybersource.com.au>
<mailman.9370.1182470826.32031.python-list@python.org>
<lcy7ibj1xo.fsf@gaffa.mit.edu>
<1182608015.004758.49060@w5g2000hsg.googlegroups.com>
Message-ID: <7xk5tur99l.fsf@ruckus.brouhaha.com>

Michele Simionato <michele.simionato at gmail.com> writes:
BTW, there are already Python-like languages with macros
(i.e. logix) and still nobody use them, including people with a
Scheme/Lisp background. That should be telling you something.
What about Dylan?

From http Sat Jun 23 17:17:29 2007
From: http (Paul Rubin)
Date: 23 Jun 2007 08:17:29 -0700
Subject: Python's "only one way to do it" philosophy isn't good?
References: <1181368143.874341.273140@r19g2000prf.googlegroups.com>
<mailman.8868.1181374855.32031.python-list@python.org>
<slrnf6q9ah.cf9.apardon@rcpc42.vub.ac.be>
<mailman.8967.1181601630.32031.python-list@python.org>
<lc4pl9gc88.fsf@gaffa.mit.edu>
<mailman.9142.1181964145.32031.python-list@python.org>
<lcvedlf3t8.fsf@gaffa.mit.edu>
<mailman.9232.1182267434.32031.python-list@python.org>
<lcr6o7g7zf.fsf@gaffa.mit.edu>
<slrnf7g6tq.1f4.horpner@FIAD06.norwich.edu>
<lcodjbfwhw.fsf@gaffa.mit.edu>
<pan.2007.06.20.00.01.11.589422@REMOVE.THIS.cybersource.com.au>
<7x3b0nmkk6.fsf@ruckus.brouhaha.com>
<pan.2007.06.20.10.29.58@REMOVE.THIS.cybersource.com.au>
<lc8xaefhgh.fsf@gaffa.mit.edu>
<pan.2007.06.21.10.19.47@REMOVE.THIS.cybersource.com.au>
<lcfy4ljej2.fsf@gaffa.mit.edu>
<pan.2007.06.22.06.17.15@REMOVE.THIS.cybersource.com.au>
<lc1wg3kh7o.fsf@gaffa.mit.edu>
<1182609058.566839.210870@n2g2000hse.googlegroups.com>
Message-ID: <7xfy4ir986.fsf@ruckus.brouhaha.com>

Michele Simionato <michele.simionato at gmail.com> writes:
Really powerful languages (say Haskell, just not to be too
Python-centric) do not need macros.
http://www.haskell.org/th/

From http Sat Jun 23 17:22:38 2007
From: http (Paul Rubin)
Date: 23 Jun 2007 08:22:38 -0700
Subject: SIMD powered Python
References: <1182554657.444684.268050@i13g2000prf.googlegroups.com>
<pan.2007.06.23.07.26.29.417160@gmx.net>
<1182607699.214626.85230@u2g2000hsc.googlegroups.com>
<pan.2007.06.23.15.03.48.57757@gmx.net>
Message-ID: <7xbqf6r8zl.fsf@ruckus.brouhaha.com>

Marc 'BlackJack' Rintsch <bj_666 at gmx.net> writes:
True... But maybe in NumPy arrays that would be more feasible...?
Yes but that's in external libraries and not in the Python interpreter.
So it won't speed up Python code like list comprehensions but "just" calls
to external functions written in C, Fortran or assembler if those make use
of SIMD instructions.
Right, Python has such poor control over side effects that it has not
much chance of parallelizing stuff like list comprehensions in
general. Maybe there's some chance of doing it for some special cases
with RPython.

See http://www.google.com/search?q="nested+data+parallelism"
for what's happening with some other languages.

Search Discussions

  • Graham Dumpleton at Jun 25, 2007 at 12:19 am

    On Jun 24, 1:13 am, Eduardo Dobay wrote:
    Hello, I've been playing around withmod_pythonthese days (using
    Publisher and PSP), and it has been working smoothly under Windows XP
    (using Apache 2.2). But when I installed PSE and went to use it withmod_python, it didn't work. The error I get whenever I try to load a
    PSE page is:

    Traceback (most recent call last):

    File "C:\Python25\lib\site-packages\mod_python\importer.py", line
    1537, in HandlerDispatch
    default=default_handler, arg=req, silent=hlist.silent)

    File "C:\Python25\lib\site-packages\mod_python\importer.py", line
    1229, in _process_target
    result = _execute_target(config, req, object, arg)

    File "C:\Python25\lib\site-packages\mod_python\importer.py", line
    1128, in _execute_target
    result = object(arg)

    TypeError: 'module' object is not callable

    I thought it could be some incompatibility issue between PSE andmod_python, but I tried both installing the PSE binary and building
    the sources, and it didn't make a difference. Has anyone out there had
    success using PSE under Windows?

    (Just for the record, I did install matching versions, at least for
    Apache (2.2.3), Python (2.5) andmod_python(3.3.1). PSE doesn't seem
    to have a strict version requirement.)
    What do you have PythonHandler set to and what does it identify? The
    error above suggests that whatever you identify as the handler is not
    a callable object like a function. Are you perhaps identifying some
    sort of PSE template object as target when you shouldn't be? Post your
    handler code so we can see it.

    Graham
  • Eduardo Dobay at Jun 26, 2007 at 9:50 pm

    On 24 jun, 21:19, Graham Dumpleton wrote:
    What do you have PythonHandler set to and what does it identify? The
    error above suggests that whatever you identify as the handler is not
    a callable object like a function. Are you perhaps identifying some
    sort of PSE template object as target when you shouldn't be? Post your
    handler code so we can see it.

    Graham
    Hello, thanks for the answer. I just found the problem. I had written
    in my Apache conf
    PythonHandler pse_handler
    because I had seen it in PSE manual. But now I tried to google some
    more and found this wiki page <http://trac.gerf.org/pse/wiki/
    PSE4Setup> that says that I should instead write
    PythonHandler pse_handler::mp_handler

    Apparently this behaviour changed in 4.0 beta (I found no mention to
    it in PSE's official site), but I'm almost sure the same error
    happened when I installed 3.0.6 and tried to run a test script.
    Anyway, I think that's it for now.

    Eduardo

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppython-list @
categoriespython
postedJun 23, '07 at 3:13p
activeJun 26, '07 at 9:50p
posts3
users2
websitepython.org

2 users in discussion

Eduardo Dobay: 2 posts Graham Dumpleton: 1 post

People

Translate

site design / logo © 2022 Grokbase