I could get the data with of_json.
And everything is ok, except for one thing.
I would like to get the data and see if it was valid so i tryied to make the
following in the .liq
--------------------------------------------------------------------------
#!/usr/local/bin/liquidsoap
print("Starting radio");
#gets a single line of the proccess
params=get_process_output("python ./teste.py")
print(params);
#parsing the string to an other type
data=of_json(default=[("error","fail")],params)
if data["error"]!=null then
output.icecast(%vorbis,host=data["host"],port=data["port"],password=data["pass"],mount=data["mount"],mksafe(playlist("/home/fabio/Desktop/play.pls")))
else
print("Error in the starting of this stream")
end
----------------------------------------------------------------------------------------
the data["host"] and etcetera works fine, i just don't know how to make the
comparison of null.
How do i check for nothingness?
Em 30 de agosto de 2011 09:00, Fábio Costa <[email protected]>escreveu:
> Ok thanks a lot david.
> will try to install it, thanks for your quick responses.
>
> Em 30 de agosto de 2011 03:30, David Baelde <[email protected]>escreveu:
>
> Hi Fabio,
>>
>> We can't treat json-wheel like other libraries from PACKAGES, because
>> it's not made and shipped by us. You need to install it separately; on
>> debian it's libjson-wheel-ocaml-dev. Also if you're on Debian, we have
>> pretty recent packages in the official distribution, and Romain also
>> maintains daily builds (sometimes broken, but worth looking at:
>> http://savonet.sourceforge.net/download.html).
>>
>> Hope this helps,
>> --
>> David
>>
>
>
------------------------------------------------------------------------------
Special Offer -- Download ArcSight Logger for FREE!
Finally, a world-class log management solution at an even better
price-free! And you'll get a free "Love Thy Logs" t-shirt when you
download Logger. Secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsisghtdev2dev
_______________________________________________
Savonet-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-users