2011-02-09 8 views

답변

2

귀하의 질문은 매우 까다 롭습니다. 귀하의 요구 사항을 이해하지 못하면 읽지 않은 예제를 배치하기가 어렵습니다. 그러나 이것은 몇 가지 json을 얻는 간단한 예제입니다.

import urllib2 
import json 

req = urllib2.Request('http://127.0.0.1:8000/read') 
r = urllib2.urlopen(req) 
data = r.read() 
j = json.loads(data) 
node = j['node']['child_node'] 
for element in node: 
    print "Element node information: %s" % element['child_node'] 

#An example of saving information to send to your form 
form_text = j['parentnode']['copy']['formtext'] 
관련 문제