Ejemplo n.º 1
0
def get_wavecode(wid):
    """return the code from parameter wave's id"""
    from wirewave import WaveReader
    w = WaveReader()
    w.read(wid)
    code = w.get_root_text()
    logging.info(code)
    return code
Ejemplo n.º 2
0
def showcode(wid):
	w = WaveReader()
	if not w.read(wid):
		print "Wave is not accessible, or not public"
		return
	code = w.get_root_text()
	code = code.replace("\n","\r\n")
	print code
	(h,fn) = tempfile.mkstemp(".txt","wave")
	os.write(h,code.encode("UTF8"))
	os.close(h)
	os.startfile(fn)
	pass