Ok, so I'm working on a project right now that is being done in psp
through apache. This is working fine, except that in every one of my
modules I had to use the mod_python function of apache.import_m odule
for its autoreload capability.
Now I cannot open or run any of my classes in the interpreter without
getting a "No module named _apache" error. I need to get this
working, as I am without unittesting right now.
I also tried making my unit test into a psp page, but then I get an
error about:
=============== =============== =============== =============== =============== =====
Mod_python error: "PythonHand ler mod_python.psp"
Traceback (most recent call last):
File "/usr/local/stow/Python-2.3.4/lib/python2.3/site-packages/mod_python/apache.py",
line 299, in HandlerDispatch
result = object(req)
File "/usr/local/stow/Python-2.3.4/lib/python2.3/site-packages/mod_python/psp.py",
line 297, in handler
p.run()
File "/usr/local/stow/Python-2.3.4/lib/python2.3/site-packages/mod_python/psp.py",
line 208, in run
exec code in global_scope
File "/export/eecs/htdocs/eecs3550/team1/proj/lib/unittests/testRequestCont ainer.psp",
line 77, in ?
unittest.main()
File "/usr/local/stow/Python-2.3.4/lib/python2.3/unittest.py", line
714, in __init__
argv = sys.argv
AttributeError: 'module' object has no attribute 'argv'
=============== =============== =============== =============== =============== =====
So that doesn't seem to work right for what I want either.
Does anybody know of a way to get both of these to coexist peacefully? 0 1358 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: scott |
last post by:
AIUI, global variables are supposed to be preserved within each Apache
thread/prcoess.
However, I'm importing and using MySQLdb within a class in a separate
module, which is in turn imported and used within a _function (ie. not
"published"). So, AFAICT, it's not supposed to be preseved.
But unless I specifically close() the database connection, it gets
stranded and I eventually run out of connections, even if I del the
connection and...
|
by: Christopher |
last post by:
I am running:
Fedora Core 1
Python 2.4
Apache 1.3.3
mod_python 2.7.11
When I try to access the test mptest.py file I receive:
> Internal Server Error
|
by: Mark |
last post by:
Hi, I've just installed the Win32 build of mod_python 3.1.4 for Python
2.4 and have setup my Apache config file with the LoadModule and
PythonHandler directives and then copied "mod_python.so" to my Apache
modules directory.
I restarted Apache and decided to do a quick cgi.test() and it shows
that mod_python listed under server software section.
OK, next I tried mptest.py, but I get an Internal Server Error. The
traceback recorded in...
|
by: treelife |
last post by:
I'm getting and internal server error when | run the following
mod_python script. I am actually trying to run Django.
Script:
from mod_python import apache
def handler(req):
req.content_type = 'text/plain'
req.write("Under Construction")
|
by: cyberco |
last post by:
And I thought this would be trivial...getting mod_python to run within
apache on windows XP.
=============
mod_python 3.2.8
apache 2.0.55
python2.4
winxp
=============
| |
by: durumdara |
last post by:
Hi !
I need to write documentation for my mod_python website, for the base
classes, functions, modules.
The problem, that mod_python is imported "apache" that not existing in
the normal, pythonic way (only in Apache).
If my source is containing a tag that use this module, or it's
submodule, the pydoc is not working.
|
by: NccWarp9 |
last post by:
Hello,
im using Apache HTTPD 2.2.8 with mod_python/3.3.1 Python/2.4.3 on
Windows and having truble starting pythone, any help would be
appreciated
..
Im getting this error:
make_obcallback: could not import
mod_python.apache.\n
|
by: Lawrence D'Oliveiro |
last post by:
In message <mailman.109.1216158151.922.python-list@python.org>, Cyril Bazin
wrote:
What's the error message? This should be in Apache's error_log file.
|
by: Aaron Scott |
last post by:
I've installed mod_python, and everything seems to be working, but it
fails when I try to import another file into the file that's actually
producing the output. I have these lines at the top of index.py:
from mod_python import apache
from storylab import *
.... and in the directory where index.py resides (/htdocs/python/), I
have a directory called "storylab". Inside that directory is
__init__.py. When I try to execute...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| | |