473,324 Members | 2,531 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

mod_python json

Hi All,
I am trying to create json (dictionary) in java script and sending it mod_python by ajax. How would i able to access this json by request object. Please see example.

javascript send dict as

var obj1 = {'EMP': [{'MGR': 7839, 'JOB': 'CLERK', 'DEPTNO': 10, 'EMPNO': 7934, 'SAL': 1000.0}, {'MGR': 7839, 'JOB': 'CLERK', 'DEPTNO': 10, 'EMPNO': 7934, 'SAL': 1000.0}, {'MGR': 7839, 'JOB': 'CLERK', 'DEPTNO': 10, 'EMPNO': 7934, 'SAL': 1000.0}, {'MGR': 7839, 'JOB': 'CLERK', 'DEPTNO': 10, 'EMPNO': 7934, 'SAL': 1000.0}, {'MGR': 7839, 'JOB': 'CLERK', 'DEPTNO': 10, 'EMPNO': 7934, 'SAL': 1000.0}, {'MGR': 7839, 'JOB': 'CLERK', 'DEPTNO': 10, 'EMPNO': 7934, 'SAL': 1000.0}, {'MGR': 7839, 'JOB': 'CLERK', 'DEPTNO': 10, 'EMPNO': 7934, 'SAL': 1000.0}, {'MGR': 7839, 'JOB': 'CLERK', 'DEPTNO': 10, 'EMPNO': 7934, 'SAL': 1000.0}, {'MGR': 7839, 'JOB': 'CLERK', 'DEPTNO': 10, 'EMPNO': 7934, 'SAL': 1000.0}, {'MGR': 7839, 'JOB': 'CLERK', 'DEPTNO': 10, 'EMPNO': 7934, 'SAL': 1000.0}, {'MGR': 7839, 'JOB': 'CLERK', 'DEPTNO': 10, 'EMPNO': 7934, 'SAL': 1000.0}, {'MGR': 7839, 'JOB': 'CLERK', 'DEPTNO': 10, 'EMPNO': 7934, 'SAL': 1000.0}, {'MGR': 7839, 'JOB': 'CLERK', 'DEPTNO': 10, 'EMPNO': 7934, 'SAL': 1000.0}, {'MGR': 7839, 'JOB': 'CLERK', 'DEPTNO': 10, 'EMPNO': 7934, 'SAL': 1000.0}]};

xmlhttpRequest.send("para1"=obj1)

in the python function

def x(req):
t=req.form["para1"]
v=t["EMP"][0]["JOB"]

this doe not work
Feb 22 '08 #1
0 772

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: wolf | last post by:
i would like to briefly share my experiences with installing mod_python on a w2000 box. i must say that i believe the installation process to be unnecessarily complicated by the simple fact that...
2
by: Robert J. Hansen | last post by:
I'm not entirely certain comp.lang.python is the proper newsgroup for mod_python questions, but "comp.lang.python.web" doesn't seem to exist, so... my apologies in advance if this is considered...
0
by: Python_it | last post by:
I'm going to work with mod_python. I install mod_python 3.2.2b for python 2.4. If i test my install with mptest.py see this link:...
6
by: Anthony L. | last post by:
I am writing a web application that is comparable to a content management system used in blogging. I really want to use Python after having done some evaluation coding using Python 2.3.5 with...
1
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):...
2
by: exhuma.twn | last post by:
Hi again, as soon as I try to make use of the "session" object inside a psp-template file, I get the following error: Mod_python error: "PythonHandler mod_python.publisher" Traceback (most...
5
by: m.banaouas | last post by:
Hi, bonjour, witch versions are suitable to use for apache & mod_python ? Can i install and use "Apache 2.2.3" & "mod_python 3.2.10" (most recent versions) without facing any known major...
3
by: Michael | last post by:
Hey everyone, Is it possible to automatically insert headers/footers using mod_python? I will be not be using PSP's, so I cannot use the PSP/include solution. Furthermore, the header will be...
0
by: cparora | last post by:
Hi All, Java script send json object to mod_python as request object. I want access this object in my python program . Could someone help me how to do this? Thanks in advance CP
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.